diff --git a/juci/api_ext.cc b/juci/api_ext.cc index e69de29..9b8b1ba 100644 --- a/juci/api_ext.cc +++ b/juci/api_ext.cc @@ -0,0 +1,15 @@ +#include "api.h" + +BOOST_PYTHON_MODULE(juci_to_python_api) { + using namespace boost::python; + // plugin inclusion + def("addMenuElement", &libjuci::AddMenuElement); + def("addSubMenuElement", &libjuci::AddSubMenuElement); + def("loadPlugin", &libjuci::LoadPlugin); + def("initPlugin", &libjuci::InitPlugin); + + // text editing + def("replaceLine", &libjuci::ReplaceLine); + def("replaceWord", &libjuci::ReplaceWord); + def("getWord", &libjuci::GetWord); + } // module::juci_to_python_api diff --git a/juci/config.json b/juci/config.json index ca3fa5c..8a557f7 100644 --- a/juci/config.json +++ b/juci/config.json @@ -32,10 +32,12 @@ }, "keybindings": { "split_window": "s", + "new_file": "n", "new_h_file": "h", "new_cc_file": "c", "close_tab": "w", "open_folder": "o", + "open_file": "o", "edit_undo": "z", "save": "s", "save_as": "s", diff --git a/juci/menu.cc b/juci/menu.cc index 4fba192..0f09906 100644 --- a/juci/menu.cc +++ b/juci/menu.cc @@ -15,7 +15,7 @@ Menu::Controller::Controller(Keybindings::Controller& keybindings) : menu_view_(Gtk::ORIENTATION_VERTICAL), keybindings_(keybindings) { keybindings_.action_group_menu()->add(Gtk::Action::create("FileNew", - Gtk::Stock::FILE)); + "New File")); keybindings_.action_group_menu()->add(Gtk::Action::create("EditMenu", Gtk::Stock::EDIT)); keybindings_.action_group_menu()->add(Gtk::Action::create("WindowMenu", diff --git a/juci/menu.xml b/juci/menu.xml index eb7bd04..dbe4b12 100644 --- a/juci/menu.xml +++ b/juci/menu.xml @@ -6,7 +6,7 @@ - + diff --git a/juci/notebook.cc b/juci/notebook.cc index 6992658..14ed7b8 100644 --- a/juci/notebook.cc +++ b/juci/notebook.cc @@ -42,17 +42,17 @@ void Notebook::Controller::CreateKeybindings(Keybindings::Controller Gtk::Stock::FILE)); keybindings.action_group_menu()-> - add(Gtk::Action::create("FileNewStandard", - Gtk::Stock::NEW, - "New empty file", - "Create a new file"), + add(Gtk::Action::create("FileNewStandard", + "New empty file"), + Gtk::AccelKey(keybindings.config_ + .key_map()["new_file"]), [this]() { is_new_file_ = true; OnFileNewEmptyfile(); }); keybindings.action_group_menu()-> add(Gtk::Action::create("FileNewCC", - "New cc file"), + "New source file"), Gtk::AccelKey(keybindings.config_ .key_map()["new_cc_file"]), [this]() { @@ -61,7 +61,7 @@ void Notebook::Controller::CreateKeybindings(Keybindings::Controller }); keybindings.action_group_menu()-> add(Gtk::Action::create("FileNewH", - "New h file"), + "New header file"), Gtk::AccelKey(keybindings.config_ .key_map()["new_h_file"]), [this]() { diff --git a/juci/window.cc b/juci/window.cc index 201d4bc..7504fb7 100644 --- a/juci/window.cc +++ b/juci/window.cc @@ -21,7 +21,9 @@ Window::Window() : OnWindowHide(); }); keybindings_.action_group_menu()->add(Gtk::Action::create("FileOpenFile", - Gtk::Stock::OPEN), + "Open file"), + Gtk::AccelKey(keybindings_.config_ + .key_map()["open_file"]), [this]() { OnOpenFile(); }); @@ -42,7 +44,7 @@ Window::Window() : }); keybindings_.action_group_menu()->add(Gtk::Action::create("FileSave", - "Save"), + "Save file"), Gtk::AccelKey(keybindings_.config_ .key_map()["save"]), [this]() {