I'm a bit confused about how to add another page of properties to the settings dialog and have been trying all day.
I added to StringDefs.cpp, PropertiesDlg.cpp, and made my own AdvPage.cpp & AdvPage.h.
Now when I try to open the settings dialog, either through the file menu or the toolbar button, just nothing happens. When I comment out my "pages[6] = new AdvPage(s);" from PropertiesDlg.cpp then the dialog opens again but of course without my new tab.
New tab for settings dialog
Moderator: Moderators
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
These are my changes to the PropertiesDialog files:
The rest will depend entirely on how well you copied an existing property page for use as your own.
Code: Select all
--- windows\propertiesdlg.cpp Tue Apr 15 07:58:04 2003
+++ ..\..\mine\0.251\windows\propertiesdlg.cpp Mon May 26 20:04:50 2003
@@ -28,6 +28,7 @@
#include "AppearancePage.h"
#include "AdvancedPage.h"
#include "Advanced2Page.h"
+#include "GargoyleMTPage.h"
ResourceManager::Strings titles[] = {
ResourceManager::SETTINGS_GENERAL,
@@ -35,7 +36,8 @@
ResourceManager::SETTINGS_UPLOADS,
ResourceManager::SETTINGS_APPEARANCE,
ResourceManager::SETTINGS_LOGS,
- ResourceManager::SETTINGS_ADVANCED
+ ResourceManager::SETTINGS_ADVANCED,
+ ResourceManager::SETTINGS_GARGOYLEMT
};
PropertiesDlg::PropertiesDlg(SettingsManager *s) : CPropertySheet("Settings")
@@ -46,6 +48,7 @@
pages[3] = new AppearancePage(s);
pages[4] = new Advanced2Page(s);
pages[5] = new AdvancedPage(s);
+ pages[6] = new GargoyleMTPage(s);
for(int i=0; i<numPages; i++) {
pages[i]->setTitle(ResourceManager::getInstance()->getString(titles[i]));
--- windows\propertiesdlg.h Tue Apr 15 07:58:04 2003
+++ ..\..\mine\0.251\windows\propertiesdlg.h Sat Apr 19 23:09:55 2003
@@ -28,7 +28,7 @@
class PropertiesDlg : public CPropertySheet
{
public:
- enum { numPages = 6 };
+ enum { numPages = 7 };
BEGIN_MSG_MAP(PropertiesDlg)
COMMAND_HANDLER(IDOK, BN_CLICKED, onOK)
The rest will depend entirely on how well you copied an existing property page for use as your own.
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Who is online
Users browsing this forum: Google [Bot] and 0 guests