Skip to content

Instantly share code, notes, and snippets.

Created May 26, 2012 03:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/2791874 to your computer and use it in GitHub Desktop.
files/radio_button.patch
--- clientgui/AdvancedFrame.cpp.old 2011-10-21 20:17:10.000000000 +0800
+++ clientgui/AdvancedFrame.cpp 2012-05-26 07:50:18.000000000 +0800
@@ -472,23 +472,11 @@
if (pDoc->state.have_nvidia || pDoc->state.have_ati) {
-#ifndef __WXGTK__
- menuActivity->AppendSeparator();
-#else
- // for some reason, the above radio items do not display the active
- // selection on linux (wxGtk library) with the separator here,
- // so we add a blank disabled menu item instead
- //
- wxMenuItem* pItem = menuActivity->Append(
- ID_MENUSEPARATOR1,
- (const wxChar *) wxT(" "),
- // wxEmptyString here causes a wxWidgets assertion when debugging
- wxEmptyString,
- wxITEM_NORMAL
- // wxITEM_SEPARATOR here causes a wxWidgets assertion when debugging
- );
- pItem->Enable(false); // disable this menu item
+ #ifdef __WXGTK__
+ // workaround for wxw ticket #8892 from huibert
+ menuActivity->Delete(menuActivity->Append(ID_MENUSEPARATOR1, wxT(" ")));
#endif
+ menuActivity->AppendSeparator();
menuActivity->AppendRadioItem(
ID_ADVACTIVITYGPUALWAYS,
@@ -507,23 +495,11 @@
);
}
-#ifndef __WXGTK__
- menuActivity->AppendSeparator();
-#else
- // for some reason, the above radio items do not display the active
- // selection on linux (wxGtk library) with the separator here,
- // so we add a blank disabled menu item instead
- //
- wxMenuItem* pItem = menuActivity->Append(
- ID_MENUSEPARATOR2,
- (const wxChar *) wxT(" "),
- // wxEmptyString here causes a wxWidgets assertion when debugging
- wxEmptyString,
- wxITEM_NORMAL
- // wxITEM_SEPARATOR here causes a wxWidgets assertion when debugging
- );
- pItem->Enable(false); // disable this menu item
-#endif
+#ifdef __WXGTK__
+ // workaround for wxw ticket #8892 from huibert
+ menuActivity->Delete(menuActivity->Append(ID_MENUSEPARATOR2, wxT(" ")));
+ #endif
+ menuActivity->AppendSeparator();
menuActivity->AppendRadioItem(
ID_ADVNETWORKRUNALWAYS,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment