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.

Updates #1589.
This commit is contained in:
Thomas Goyne 2013-05-05 20:55:10 -07:00
parent 2db687cc31
commit 95d773ebc9

View file

@ -392,8 +392,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);