Don't use the custom renders in the hotkeys editor on OS X

The standard controls aren't particularly usable, but the OS X
implementation of wxDVC doesn't actually support custom renderers and
not very usable is mildly better than entirely nonfunctional.
This commit is contained in:
Thomas Goyne 2013-05-05 20:55:10 -07:00
parent 4a7e31ea6d
commit 9bed1a2edc

View file

@ -396,8 +396,13 @@ Interface_Hotkeys::Interface_Hotkeys(wxTreebook *book, Preferences *parent)
dvc = new wxDataViewCtrl(this, -1); dvc = new wxDataViewCtrl(this, -1);
dvc->AssociateModel(model.get()); dvc->AssociateModel(model.get());
#ifndef __APPLE__
dvc->AppendColumn(new wxDataViewColumn("Hotkey", new HotkeyRenderer, 0, 125, wxALIGN_LEFT, wxCOL_SORTABLE | wxCOL_RESIZABLE)); dvc->AppendColumn(new wxDataViewColumn("Hotkey", new HotkeyRenderer, 0, 125, wxALIGN_LEFT, wxCOL_SORTABLE | wxCOL_RESIZABLE));
dvc->AppendColumn(new wxDataViewColumn("Command", new CommandRenderer, 1, 250, wxALIGN_LEFT, wxCOL_SORTABLE | wxCOL_RESIZABLE)); dvc->AppendColumn(new wxDataViewColumn("Command", new CommandRenderer, 1, 250, wxALIGN_LEFT, wxCOL_SORTABLE | wxCOL_RESIZABLE));
#else
dvc->AppendColumn(new wxDataViewColumn("Hotkey", new wxDataViewTextRenderer("string", wxDATAVIEW_CELL_EDITABLE), 0, 125, wxALIGN_LEFT, wxCOL_SORTABLE | wxCOL_RESIZABLE));
dvc->AppendColumn(new wxDataViewColumn("Command", new wxDataViewIconTextRenderer("wxDataViewIconText", wxDATAVIEW_CELL_EDITABLE), 1, 250, wxALIGN_LEFT, wxCOL_SORTABLE | wxCOL_RESIZABLE));
#endif
dvc->AppendTextColumn("Description", 2, wxDATAVIEW_CELL_INERT, 300, wxALIGN_LEFT, wxCOL_SORTABLE | wxCOL_RESIZABLE); dvc->AppendTextColumn("Description", 2, wxDATAVIEW_CELL_INERT, 300, wxALIGN_LEFT, wxCOL_SORTABLE | wxCOL_RESIZABLE);
wxSizer *buttons = new wxBoxSizer(wxHORIZONTAL); wxSizer *buttons = new wxBoxSizer(wxHORIZONTAL);