Don't pointlessly store a copy of the default hotkeys json in memory

Originally committed to SVN as r5510.
This commit is contained in:
Thomas Goyne 2011-07-26 20:26:09 +00:00
parent 8e975941b7
commit 263d161d26
3 changed files with 1 additions and 4 deletions

View file

@ -70,11 +70,10 @@ Hotkey::~Hotkey() {
Hotkey::Hotkey(const std::string &file, const std::string &default_config)
: config_file(file)
, config_default(default_config)
{
LOG_D("hotkey/init") << "Generating hotkeys.";
json::UnknownElement hotkey_root = agi::json_util::file(config_file, config_default);
json::UnknownElement hotkey_root = agi::json_util::file(config_file, default_config);
json::Object object = hotkey_root;
for (json::Object::const_iterator index(object.Begin()); index != object.End(); index++) {

View file

@ -118,7 +118,6 @@ private:
HotkeyMap str_map; ///< String representation -> Combo
HotkeyMap cmd_map; ///< Command name -> Combo
const std::string config_file; ///< Default user config location.
const std::string config_default; ///< Default config.
/// Build hotkey map.
/// @param context Context being parsed.

View file

@ -209,7 +209,6 @@ Interface_Colours::Interface_Colours(wxTreebook *book, Preferences *parent): Opt
/// Interface Hotkeys preferences subpage
Interface_Hotkeys::Interface_Hotkeys(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _("Hotkeys"), PAGE_SUB) {
wxFlexGridSizer *hotkeys = PageSizer(_("Hotkeys"));
hotkeys->Add(new wxStaticText(this, wxID_ANY, _T("To be added after hotkey rewrite.")), 0, wxALL, 5);
SetSizerAndFit(sizer);