From 7be97464046c9c10c6e9bf4eaedd37265dd4cda9 Mon Sep 17 00:00:00 2001 From: Hombre Date: Tue, 5 Oct 2010 23:42:41 +0200 Subject: [PATCH] Correction of a small bug ; now the window remember it's (un)maximized state --- rtgui/rtwindow.cc | 3 ++- rtgui/rtwindow.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 0fd85a304..c36049925 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -44,6 +44,7 @@ RTWindow::RTWindow () { else unmaximize(); property_destroy_with_parent().set_value(false); + signal_window_state_event().connect( sigc::mem_fun(*this, &RTWindow::on_window_state_event) ); mainNB = Gtk::manage (new Gtk::Notebook ()); mainNB->set_scrollable (true); @@ -114,7 +115,7 @@ void RTWindow::on_realize () { cursorManager.init (get_window()); } -bool RTWindow::on_my_window_state_event(GdkEventWindowState* event) { +bool RTWindow::on_window_state_event(GdkEventWindowState* event) { if (!event->new_window_state) { // Window mode options.windowMaximized = false; diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index aa0db4048..68e072ac9 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -52,7 +52,7 @@ class RTWindow : public Gtk::Window, public rtengine::ProgressListener{ bool keyPressed (GdkEventKey* event); bool on_delete_event(GdkEventAny* event); - bool on_my_window_state_event(GdkEventWindowState* event); + bool on_window_state_event(GdkEventWindowState* event); void on_mainNB_switch_page(GtkNotebookPage* page, guint page_num); void imageDeveloped (Glib::ustring fname); // called by the batchqueue when it finishes an image