From 293d8bb35f3b28197db163197b71b78219a97df1 Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 1 Jan 2016 10:52:48 +0100 Subject: [PATCH] Should now compile on Ubuntu 14 --- src/window.cc | 9 +++++++-- src/window.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/window.cc b/src/window.cc index 388cb07..8284e4e 100644 --- a/src/window.cc +++ b/src/window.cc @@ -49,7 +49,12 @@ Window::Window() : compiling(false), debugging(false) { terminal_vbox.pack_start(terminal_scrolled_window); info_and_status_hbox.pack_start(notebook.info, Gtk::PACK_SHRINK); +#if GTK_VERSION_GE(3, 12) info_and_status_hbox.set_center_widget(debug_status_label); +#else + debug_status_label.set_halign(Gtk::Align::ALIGN_CENTER); + info_and_status_hbox.pack_start(debug_status_label); +#endif info_and_status_hbox.pack_end(notebook.status, Gtk::PACK_SHRINK); terminal_vbox.pack_end(info_and_status_hbox, Gtk::PACK_SHRINK); vpaned.pack2(terminal_vbox, true, true); @@ -120,7 +125,7 @@ Window::Window() : compiling(false), debugging(false) { debug_stop_mutex.lock(); for(int c=0;cfile_path==debug_last_stop.first) { + if(view->file_path==debug_last_stop_file_path) { view->get_source_buffer()->remove_source_marks(view->get_buffer()->begin(), view->get_buffer()->end(), "debug_stop"); break; } @@ -131,7 +136,7 @@ Window::Window() : compiling(false), debugging(false) { if(view->file_path==debug_stop.first) { if(debug_stop.second.first-1get_buffer()->get_line_count()) { view->get_source_buffer()->create_source_mark("debug_stop", view->get_buffer()->get_iter_at_line(debug_stop.second.first-1)); - debug_last_stop=debug_stop; + debug_last_stop_file_path=debug_stop.first; } view->get_buffer()->place_cursor(view->get_buffer()->get_insert()->get_iter()); break; diff --git a/src/window.h b/src/window.h index 2c8b535..d210c76 100644 --- a/src/window.h +++ b/src/window.h @@ -36,9 +36,9 @@ private: std::atomic debugging; Gtk::Label debug_status_label; - std::pair > debug_last_stop; std::pair > debug_stop; + boost::filesystem::path debug_last_stop_file_path; std::mutex debug_stop_mutex; Glib::Dispatcher debug_update_stop; std::string debug_status;