Remove #ifs for older versions of wx
This commit is contained in:
parent
e9f2194ca6
commit
7c68c81ea3
3 changed files with 0 additions and 24 deletions
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue