Browse Source

Fixed the hide override issue discussed in #91. We should also add override elsewhere when appropriate.

merge-requests/365/head
eidheim 10 years ago
parent
commit
1221fe1529
  1. 3
      src/cmake.cc
  2. 6
      src/filesystem.h
  3. 13
      src/window.cc
  4. 6
      src/window.h

3
src/cmake.cc

@ -2,7 +2,6 @@
#include "singletons.h"
#include "filesystem.h"
#include "dialogs.h"
#include <boost/regex.hpp>
#include <iostream> //TODO: remove
@ -268,7 +267,7 @@ std::vector<std::pair<boost::filesystem::path, std::vector<std::string> > > 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);

6
src/filesystem.h

@ -1,5 +1,5 @@
#ifndef JUCI_SOURCEFILE_H_
#define JUCI_SOURCEFILE_H_
#ifndef JUCI_FILESYSTEM_H_
#define JUCI_FILESYSTEM_H_
#include <vector>
#include <string>
#include <boost/filesystem.hpp>
@ -26,4 +26,4 @@ public:
static bool write(const boost::filesystem::path &path, Glib::RefPtr<Gtk::TextBuffer> text_buffer) { return write(path.string(), text_buffer); }
};
#endif // JUCI_SOURCEFILE_H_
#endif // JUCI_FILESYSTEM_H_

13
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;c<size;c++) {
if(!notebook.close_current_page())
return;
return true;
}
Singleton::terminal->kill_async_executes();
Gtk::Window::hide();
return false;
}
void Window::search_and_replace_entry() {

6
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();

Loading…
Cancel
Save