From c92e095a8530bb8bf6d5db4aacd68a9c739d7d6a Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 28 Jul 2015 12:09:17 +0200 Subject: [PATCH 1/7] Gtk::Stock is depricated, so removed these. Cut/Paste/Copy now also works in entries. Redo now has key binding shift-control-z, which is most common. Also keys now use instead of and thus is more platform independent. --- juci/config.cc | 5 ----- juci/config.json | 38 +++++++++++++++++++------------------- juci/entrybox.cc | 2 +- juci/entrybox.h | 1 + juci/menu.cc | 6 +++--- juci/notebook.cc | 33 ++++++++++++++++++++++++--------- 6 files changed, 48 insertions(+), 37 deletions(-) diff --git a/juci/config.cc b/juci/config.cc index 7302984..a4fc63a 100644 --- a/juci/config.cc +++ b/juci/config.cc @@ -84,11 +84,6 @@ void MainConfig::GenerateKeybindings() { boost::property_tree::ptree keys_json = cfg_.get_child("keybindings"); for (auto &i : keys_json) { auto key=i.second.get_value(); -#ifdef __APPLE__ - auto pos=key.find(""); - if(pos!=std::string::npos) - key.replace(pos, 9, ""); -#endif menu->key_map[i.first] = key; } DEBUG("Keybindings fetched"); diff --git a/juci/config.json b/juci/config.json index 6587e57..0c85f6d 100644 --- a/juci/config.json +++ b/juci/config.json @@ -43,25 +43,25 @@ "tab_char": "" }, "keybindings": { - "new_file": "n", - "open_folder": "o", - "open_file": "o", - "save": "s", - "save_as": "s", - "quit": "q", - "split_window": "s", - "close_tab": "w", - "edit_copy": "c", - "edit_cut": "x", - "edit_paste": "v", - "edit_undo": "z", - "edit_redo": "y", - "edit_find": "f", - "source_goto_declaration": "d", - "source_goto_method": "m", - "source_rename": "r", - "compile_and_run": "Return", - "compile": "Return" + "new_file": "n", + "open_folder": "o", + "open_file": "o", + "save": "s", + "save_as": "s", + "quit": "q", + "split_window": "s", + "close_tab": "w", + "edit_copy": "c", + "edit_cut": "x", + "edit_paste": "v", + "edit_undo": "z", + "edit_redo": "z", + "edit_find": "f", + "source_goto_declaration": "d", + "source_goto_method": "m", + "source_rename": "r", + "compile_and_run": "Return", + "compile": "Return" }, "directoryfilter": { "ignore": [ diff --git a/juci/entrybox.cc b/juci/entrybox.cc index 05e5986..d221393 100644 --- a/juci/entrybox.cc +++ b/juci/entrybox.cc @@ -40,7 +40,7 @@ EntryBox::EntryBox() : Gtk::Box(Gtk::ORIENTATION_VERTICAL), upper_box(Gtk::ORIEN } void EntryBox::clear() { - hide(); + Gtk::Box::hide(); entries.clear(); buttons.clear(); toggle_buttons.clear(); diff --git a/juci/entrybox.h b/juci/entrybox.h index 06632e7..6ff40c1 100644 --- a/juci/entrybox.h +++ b/juci/entrybox.h @@ -33,6 +33,7 @@ public: Gtk::Box upper_box; Gtk::Box lower_box; void clear(); + void hide() {clear();} void show(); std::list entries; std::list