diff --git a/juci/api.cc b/juci/api.cc index 14acce7..4cf9242 100644 --- a/juci/api.cc +++ b/juci/api.cc @@ -3,13 +3,13 @@ #include "singletons.h" Menu* PluginApi::menu_=nullptr; -Notebook::Controller* PluginApi::notebook_=nullptr; +Notebook* PluginApi::notebook=nullptr; ///////////////////////////// //// API ServiceProvider //// ///////////////////////////// -PluginApi::PluginApi() { +PluginApi::PluginApi(Notebook* notebook) { DEBUG("Adding pointers for the API"); - notebook_ = Singleton::notebook(); + this->notebook = notebook; menu_ = Singleton::menu(); DEBUG("Initiating plugins(from plugins.py).."); #ifndef __APPLE__ @@ -211,7 +211,7 @@ void libjuci::IterToWordEnd(Gtk::TextIter &iter) { } Glib::RefPtr libjuci::BufferFromNotebook() { - return Glib::RefPtr(PluginApi::notebook_ + return Glib::RefPtr(PluginApi::notebook ->CurrentSourceView()->get_buffer()); } diff --git a/juci/api.h b/juci/api.h index 3f97710..6292c07 100644 --- a/juci/api.h +++ b/juci/api.h @@ -12,9 +12,9 @@ //////////////////// class PluginApi { public: - PluginApi(); + PluginApi(Notebook* notebook); static Menu* menu_; - static Notebook::Controller* notebook_; + static Notebook* notebook; static void InitPlugins(); static std::string ProjectPath(); // for Python module: 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