Browse Source

removed all stock gtk bindings.

merge-requests/365/head
tedjk 11 years ago
parent
commit
08bf0cf806
  1. 14
      juci/config.json
  2. 17
      juci/notebook.cc

14
juci/config.json

@ -31,16 +31,22 @@
] ]
}, },
"keybindings": { "keybindings": {
"split_window": "<control><alt>s",
"new_file": "<control>n", "new_file": "<control>n",
"new_h_file": "<control><alt>h", "new_h_file": "<control><alt>h",
"new_cc_file": "<alt>c", "new_cc_file": "<control><alt>c",
"close_tab": "<control>w",
"open_folder": "<control><alt>o", "open_folder": "<control><alt>o",
"open_file": "<control>o", "open_file": "<control>o",
"edit_undo": "<control>z",
"save": "<control>s", "save": "<control>s",
"save_as": "<control><shift>s", "save_as": "<control><shift>s",
"split_window": "<control><alt>s",
"close_tab": "<control>w",
"edit_copy": "<control>c",
"edit_cut": "<control>x",
"edit_paste": "<control>v",
"edit_undo": "<control>z",
"edit_find": "<control>f",
"compile_and_run": "<control><alt>r", "compile_and_run": "<control><alt>r",
"compile": "<control>r" "compile": "<control>r"
}, },

17
juci/notebook.cc

@ -78,7 +78,9 @@ void Notebook::Controller::CreateKeybindings(Keybindings::Controller
}); });
keybindings.action_group_menu()-> keybindings.action_group_menu()->
add(Gtk::Action::create("EditFind", add(Gtk::Action::create("EditFind",
Gtk::Stock::FIND), "Find"),
Gtk::AccelKey(keybindings.config_
.key_map()["edit_find"]),
[this]() { [this]() {
is_new_file_ = false; is_new_file_ = false;
OnEditSearch(); OnEditSearch();
@ -86,19 +88,26 @@ void Notebook::Controller::CreateKeybindings(Keybindings::Controller
}); });
keybindings.action_group_menu()-> keybindings.action_group_menu()->
add(Gtk::Action::create("EditCopy", add(Gtk::Action::create("EditCopy",
Gtk::Stock::COPY), "Copy"),
Gtk::AccelKey(keybindings.config_
.key_map()["edit_copy"]),
[this]() { [this]() {
OnEditCopy(); OnEditCopy();
}); });
keybindings.action_group_menu()-> keybindings.action_group_menu()->
add(Gtk::Action::create("EditCut", add(Gtk::Action::create("EditCut",
Gtk::Stock::CUT), "Cut"),
Gtk::AccelKey(keybindings.config_
.key_map()["edit_cut"]),
[this]() { [this]() {
OnEditCut(); OnEditCut();
}); });
keybindings.action_group_menu()-> keybindings.action_group_menu()->
add(Gtk::Action::create("EditPaste", add(Gtk::Action::create("EditPaste",
Gtk::Stock::PASTE), "Paste"),
Gtk::AccelKey(keybindings.config_
.key_map()["edit_paste"]),
[this]() { [this]() {
OnEditPaste(); OnEditPaste();
}); });

Loading…
Cancel
Save