diff --git a/src/cmake.cc b/src/cmake.cc index 0a9afdb..0501921 100644 --- a/src/cmake.cc +++ b/src/cmake.cc @@ -2,7 +2,6 @@ #include "singletons.h" #include "filesystem.h" #include "dialogs.h" - #include #include //TODO: remove @@ -268,7 +267,7 @@ std::vector > > CMak const boost::regex function_regex("^ *"+name+" *\\( *(.*)\\) *$"); boost::smatch sm; if(boost::regex_match(line, sm, function_regex)) { - auto data=sm[1].str(); + auto data=sm[1].str(); while(data.size()>0 && data.back()==' ') data.pop_back(); auto parameters=get_function_parameters(data); diff --git a/src/filesystem.h b/src/filesystem.h index 46bcc67..10d51bb 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -1,5 +1,5 @@ -#ifndef JUCI_SOURCEFILE_H_ -#define JUCI_SOURCEFILE_H_ +#ifndef JUCI_FILESYSTEM_H_ +#define JUCI_FILESYSTEM_H_ #include #include #include @@ -26,4 +26,4 @@ public: static bool write(const boost::filesystem::path &path, Glib::RefPtr text_buffer) { return write(path.string(), text_buffer); } }; -#endif // JUCI_SOURCEFILE_H_ +#endif // JUCI_FILESYSTEM_H_ diff --git a/src/window.cc b/src/window.cc index aa29431..559e853 100644 --- a/src/window.cc +++ b/src/window.cc @@ -147,7 +147,7 @@ void Window::set_menu_actions() { notebook.open(Singleton::config->juci_home_path()/"config"/"config.json"); }); menu->add_action("quit", [this]() { - hide(); + close(); }); menu->add_action("new_file", [this]() { @@ -677,19 +677,14 @@ bool Window::on_key_press_event(GdkEventKey *event) { return Gtk::Window::on_key_press_event(event); } -bool Window::on_delete_event (GdkEventAny *event) { - hide(); - return true; -} - -void Window::hide() { +bool Window::on_delete_event(GdkEventAny *event) { auto size=notebook.size(); for(int c=0;ckill_async_executes(); - Gtk::Window::hide(); + return false; } void Window::search_and_replace_entry() { diff --git a/src/window.h b/src/window.h index 957b44d..d02f23c 100644 --- a/src/window.h +++ b/src/window.h @@ -11,9 +11,8 @@ public: Window(); Notebook notebook; -protected: - bool on_key_press_event(GdkEventKey *event); - bool on_delete_event (GdkEventAny *event); + bool on_key_press_event(GdkEventKey *event) override; + bool on_delete_event(GdkEventAny *event) override; private: Gtk::VPaned vpaned; @@ -29,7 +28,6 @@ private: void configure(); void set_menu_actions(); void activate_menu_items(bool activate=true); - void hide(); void search_and_replace_entry(); void set_tab_entry(); void goto_line_entry();