mirror of https://github.com/odrling/Aegisub
Don't pointlessly store a copy of the default hotkeys json in memory
Originally committed to SVN as r5510.
This commit is contained in:
parent
8e975941b7
commit
263d161d26
|
@ -70,11 +70,10 @@ Hotkey::~Hotkey() {
|
||||||
|
|
||||||
Hotkey::Hotkey(const std::string &file, const std::string &default_config)
|
Hotkey::Hotkey(const std::string &file, const std::string &default_config)
|
||||||
: config_file(file)
|
: config_file(file)
|
||||||
, config_default(default_config)
|
|
||||||
{
|
{
|
||||||
LOG_D("hotkey/init") << "Generating hotkeys.";
|
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;
|
json::Object object = hotkey_root;
|
||||||
|
|
||||||
for (json::Object::const_iterator index(object.Begin()); index != object.End(); index++) {
|
for (json::Object::const_iterator index(object.Begin()); index != object.End(); index++) {
|
||||||
|
|
|
@ -118,7 +118,6 @@ private:
|
||||||
HotkeyMap str_map; ///< String representation -> Combo
|
HotkeyMap str_map; ///< String representation -> Combo
|
||||||
HotkeyMap cmd_map; ///< Command name -> Combo
|
HotkeyMap cmd_map; ///< Command name -> Combo
|
||||||
const std::string config_file; ///< Default user config location.
|
const std::string config_file; ///< Default user config location.
|
||||||
const std::string config_default; ///< Default config.
|
|
||||||
|
|
||||||
/// Build hotkey map.
|
/// Build hotkey map.
|
||||||
/// @param context Context being parsed.
|
/// @param context Context being parsed.
|
||||||
|
|
|
@ -209,7 +209,6 @@ Interface_Colours::Interface_Colours(wxTreebook *book, Preferences *parent): Opt
|
||||||
|
|
||||||
/// Interface Hotkeys preferences subpage
|
/// Interface Hotkeys preferences subpage
|
||||||
Interface_Hotkeys::Interface_Hotkeys(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _("Hotkeys"), PAGE_SUB) {
|
Interface_Hotkeys::Interface_Hotkeys(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _("Hotkeys"), PAGE_SUB) {
|
||||||
|
|
||||||
wxFlexGridSizer *hotkeys = PageSizer(_("Hotkeys"));
|
wxFlexGridSizer *hotkeys = PageSizer(_("Hotkeys"));
|
||||||
hotkeys->Add(new wxStaticText(this, wxID_ANY, _T("To be added after hotkey rewrite.")), 0, wxALL, 5);
|
hotkeys->Add(new wxStaticText(this, wxID_ANY, _T("To be added after hotkey rewrite.")), 0, wxALL, 5);
|
||||||
SetSizerAndFit(sizer);
|
SetSizerAndFit(sizer);
|
||||||
|
|
Loading…
Reference in New Issue