From 7c68c81ea34c93a8ed0499e1499c15d531b47c60 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 11 Dec 2013 18:09:46 -0800 Subject: [PATCH] Remove #ifs for older versions of wx --- aegisub/src/aegisublocale.cpp | 4 ---- aegisub/src/menu.cpp | 16 ---------------- aegisub/src/preferences.cpp | 4 ---- 3 files changed, 24 deletions(-) diff --git a/aegisub/src/aegisublocale.cpp b/aegisub/src/aegisublocale.cpp index fd801ce8f..8ef2e9ff0 100644 --- a/aegisub/src/aegisublocale.cpp +++ b/aegisub/src/aegisublocale.cpp @@ -106,11 +106,7 @@ wxString AegisubLocale::PickLanguage() { style |= wxCANCEL; wxSingleChoiceDialog dialog(nullptr, "Please choose a language:", "Language", langNames, -#if wxCHECK_VERSION(2, 9, 4) (void **)nullptr, -#else - 0, -#endif style); if (dialog.ShowModal() == wxID_OK) { int picked = dialog.GetSelection(); diff --git a/aegisub/src/menu.cpp b/aegisub/src/menu.cpp index 3d26741ea..10e2487cc 100644 --- a/aegisub/src/menu.cpp +++ b/aegisub/src/menu.cpp @@ -457,22 +457,6 @@ namespace menu { window->Bind(wxEVT_COMMAND_MENU_SELECTED, &CommandManager::OnMenuClick, &menu->cm); window->SetMenuBar(menu.get()); -#if defined(__WXGTK__) && !wxCHECK_VERSION(2, 9, 5) - // Older versions of wxGTK silently swallow keypresses for accelerators - // whose associated menu items are disabled. As we don't update the - // menu until it's opened, this means that conditional hotkeys don't - // work if the menu hasn't been opened since they became valid. - // - // To work around this, we completely disable accelerators from menu - // item. wxGTK doesn't expose any way to do this other that at wx - // compile time (SetAcceleratorTable is a no-op), so have some fun with - // the implementation details of undocumented methods. Detaching via - // wxMenuBar::Detach removes the accelerator table, and then - // wxMenuBarBase::Attch is used to avoid readding it. - menu->Detach(); - menu->wxMenuBarBase::Attach(window); -#endif - menu.release(); } diff --git a/aegisub/src/preferences.cpp b/aegisub/src/preferences.cpp index b044c8422..51afc21a0 100644 --- a/aegisub/src/preferences.cpp +++ b/aegisub/src/preferences.cpp @@ -370,11 +370,7 @@ public: }; static void edit_item(wxDataViewCtrl *dvc, wxDataViewItem item) { -#if wxCHECK_VERSION(2, 9, 4) dvc->EditItem(item, dvc->GetColumn(0)); -#else - dvc->StartEditor(item, 0); -#endif } /// Interface Hotkeys preferences subpage