Patch for alert when checking "Settings" -> "Environment"
Cause was SetSettingsIconsStyle in CB globals.cpp. (Code causing alert was Windows ONLY code.)
I have NOT tested patch under wxWidgets 2.8; only tested using wxWidgets truck (wx 3.0.0).
Edit: I have now tested the patch with wxWidgets 2.8 branch and it worked under Windows 7 32bit.
I also needed to patch CB file environmentsettingsdlg.cpp because loading the icons makes it default to displaying icons using wxWidgets truck (wx 3.0.0)
Tim S.
Index: src/sdk/globals.cpp
===================================================================
--- src/sdk/globals.cpp (revision 9381)
+++ src/sdk/globals.cpp (working copy)
@@ -1020,8 +1020,8 @@
long flags = lc->GetWindowStyleFlag();
switch (style)
{
- case sisNoIcons: flags = (flags & ~wxLC_ICON) | wxLC_SMALL_ICON; break;
- default: flags = (flags & ~wxLC_SMALL_ICON) | wxLC_ICON; break;
+ case sisNoIcons: flags = (flags & ~wxLC_MASK_TYPE) | wxLC_LIST; break;
+ default: flags = (flags & ~wxLC_MASK_TYPE) | wxLC_ICON; break;
}
lc->SetWindowStyleFlag(flags);
#endif
@@ -1032,7 +1032,7 @@
// this doesn't work under wxGTK...
#ifdef __WXMSW__
long flags = lc->GetWindowStyleFlag();
- if (flags & wxLC_SMALL_ICON)
+ if (flags & wxLC_LIST)
return sisNoIcons;
#endif
return sisLargeIcons;
Index: src/src/environmentsettingsdlg.cpp
===================================================================
--- src/src/environmentsettingsdlg.cpp (revision 9381)
+++ src/src/environmentsettingsdlg.cpp (working copy)
@@ -107,8 +109,8 @@
wxXmlResource::Get()->LoadObject(this, parent, _T("dlgEnvironmentSettings"),_T("wxScrollingDialog"));
int sel = cfg->ReadInt(_T("/environment/settings_size"), 0);
wxListbook* lb = XRCCTRL(*this, "nbMain", wxListbook);
+ LoadListbookImages();
SetSettingsIconsStyle(lb->GetListView(), (SettingsIconsStyle)sel);
- LoadListbookImages();
Connect(XRCID("nbMain"),wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING,wxListbookEventHandler(EnvironmentSettingsDlg::OnPageChanging));
Connect(XRCID("nbMain"),wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, wxListbookEventHandler(EnvironmentSettingsDlg::OnPageChanged ));