Patch #2629 2009-01-06 13:59
mmkider
Initialization sequence for xrc- Download
- 2629-Initialization.patch (5.1 KB)
Index: sdk/editorconfigurationdlg.cpp
===================================================================
--- sdk/editorconfigurationdlg.cpp (revision 5381)
+++ sdk/editorconfigurationdlg.cpp (working copy)
@@ -83,7 +83,6 @@
EVT_CHECKBOX(XRCID("chkHighlightOccurrences"), EditorConfigurationDlg::OnHighlightOccurrences)
EVT_BUTTON(XRCID("btnHighlightColour"), EditorConfigurationDlg::OnChooseColour)
- EVT_LISTBOOK_PAGE_CHANGED(XRCID("nbMain"), EditorConfigurationDlg::OnPageChanged)
END_EVENT_TABLE()
EditorConfigurationDlg::EditorConfigurationDlg(wxWindow* parent)
@@ -264,6 +263,7 @@
// make sure everything is laid out properly
GetSizer()->SetSizeHints(this);
+ Connect( XRCID("nbMain"),wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED,wxListbookEventHandler(EditorConfigurationDlg::OnPageChanged));
}
EditorConfigurationDlg::~EditorConfigurationDlg()
Index: sdk/finddlg.cpp
===================================================================
--- sdk/finddlg.cpp (revision 5381)
+++ sdk/finddlg.cpp (working copy)
@@ -33,7 +33,6 @@
cbProject* g_LastUsedProject = 0;
BEGIN_EVENT_TABLE(FindDlg, wxDialog)
- EVT_NOTEBOOK_PAGE_CHANGED(XRCID("nbFind"), FindDlg::OnFindChange)
EVT_CHECKBOX(XRCID("chkRegEx1"), FindDlg::OnRegEx)
EVT_BUTTON(XRCID("btnBrowsePath"), FindDlg::OnBrowsePath)
EVT_RADIOBOX(XRCID("rbScope2"), FindDlg::OnRadioBox)
@@ -108,6 +107,7 @@
XRCCTRL(*this, "nbFind", wxNotebook)->SetSelection(1); // Search->Find in Files was selected
XRCCTRL(*this, "cmbFind2", wxComboBox)->SetFocus();
}
+ Connect( XRCID("nbFind"),wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,wxNotebookEventHandler(FindDlg::OnFindChange));
}
FindDlg::~FindDlg()
Index: sdk/replacedlg.cpp
===================================================================
--- sdk/replacedlg.cpp (revision 5381)
+++ sdk/replacedlg.cpp (working copy)
@@ -27,7 +27,6 @@
#define CONF_GROUP _T("/replace_options")
BEGIN_EVENT_TABLE(ReplaceDlg, wxDialog)
- EVT_NOTEBOOK_PAGE_CHANGED(XRCID("nbReplace"), ReplaceDlg::OnFindChange)
EVT_CHECKBOX(XRCID("chkRegEx1"), ReplaceDlg::OnRegEx)
EVT_ACTIVATE( ReplaceDlg::OnActivate)
END_EVENT_TABLE()
@@ -78,6 +77,7 @@
XRCCTRL(*this, "nbReplace", wxNotebook)->SetSelection(1); // Search->Replace in Files was selected
XRCCTRL(*this, "cmbFind2", wxComboBox)->SetFocus();
}
+ Connect( XRCID("nbReplace"),wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,wxNotebookEventHandler(ReplaceDlg::OnFindChange));
}
ReplaceDlg::~ReplaceDlg()
Index: src/compilersettingsdlg.cpp
===================================================================
--- src/compilersettingsdlg.cpp (revision 5381)
+++ src/compilersettingsdlg.cpp (working copy)
@@ -36,11 +36,6 @@
};
const int IMAGES_COUNT = sizeof(base_imgs) / sizeof(wxString);
-BEGIN_EVENT_TABLE(CompilerSettingsDlg, wxDialog)
- EVT_LISTBOOK_PAGE_CHANGING(XRCID("nbMain"), CompilerSettingsDlg::OnPageChanging)
- EVT_LISTBOOK_PAGE_CHANGED(XRCID("nbMain"), CompilerSettingsDlg::OnPageChanged)
-END_EVENT_TABLE()
-
// This dialog initially contains only the batch-build settings.
// So we 'll add all compiler-related configuration before it
// and all debugger-related after it...
@@ -102,6 +97,8 @@
// make sure everything is laid out properly
GetSizer()->SetSizeHints(this);
CentreOnParent();
+ Connect( XRCID("nbMain"),wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING,wxListbookEventHandler(CompilerSettingsDlg::OnPageChanging));
+ Connect( XRCID("nbMain"),wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED,wxListbookEventHandler(CompilerSettingsDlg::OnPageChanged));
}
CompilerSettingsDlg::~CompilerSettingsDlg()
Index: src/compilersettingsdlg.h
===================================================================
--- src/compilersettingsdlg.h (revision 5381)
+++ src/compilersettingsdlg.h (working copy)
@@ -24,7 +24,7 @@
void AddPluginPanels();
void UpdateListbookImages();
ConfigurationPanelsArray m_PluginPanels;
- DECLARE_EVENT_TABLE()
+
};
#endif // COMPILERSETTINGSDLG_H
Index: src/environmentsettingsdlg.cpp
===================================================================
--- src/environmentsettingsdlg.cpp (revision 5381)
+++ src/environmentsettingsdlg.cpp (working copy)
@@ -76,8 +76,6 @@
EVT_CHECKBOX(XRCID("chkI18N"), EnvironmentSettingsDlg::OnI18NCheck)
EVT_RADIOBOX(XRCID("rbSettingsIconsSize"), EnvironmentSettingsDlg::OnSettingsIconsSize)
- EVT_LISTBOOK_PAGE_CHANGING(XRCID("nbMain"), EnvironmentSettingsDlg::OnPageChanging)
- EVT_LISTBOOK_PAGE_CHANGED(XRCID("nbMain"), EnvironmentSettingsDlg::OnPageChanged)
END_EVENT_TABLE()
EnvironmentSettingsDlg::EnvironmentSettingsDlg(wxWindow* parent, wxAuiDockArt* art)
@@ -214,6 +212,8 @@
// make sure everything is laid out properly
GetSizer()->SetSizeHints(this);
CentreOnParent();
+ Connect( XRCID("nbMain"),wxEVT_COMMAND_LIS
download for full patch...
History
I test results of Initialization sequence for xrc that If codeblocks load xrc(using wxXmlResource::Get()->LoadDialog), EVT_LISTBOOK_PAGE_CHANGING and EVT_LISTBOOK_PAGE_CHANGED will be called.
But Now most of the image not loading program.
So need change Initialization sequence.
For example
- EVT_LISTBOOK_PAGE_CHANGING(XRCID("nbMain"), EnvironmentSettingsDlg::OnPageChanging)
- EVT_LISTBOOK_PAGE_CHANGED(XRCID("nbMain"), EnvironmentSettingsDlg::OnPageChanged)
need be to
+ Connect( XRCID("nbMain"),wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING,wxListbookEventHandler(EnvironmentSettingsDlg::OnPageChanging));
+ Connect( XRCID("nbMain"),wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED,wxListbookEventHandler(EnvironmentSettingsDlg::OnPageChanged));
Does this still apply?