[gthumb] do not save the size if the window is maximized
- From: Paolo Bacchilega <paobac src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gthumb] do not save the size if the window is maximized
 
- Date: Sat,  7 Aug 2010 14:26:39 +0000 (UTC)
 
commit 7d011c71398d594f0fc33894238fe9e90b947480
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Aug 7 12:33:18 2010 +0200
    do not save the size if the window is maximized
 gthumb/gth-browser.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index b4c15f4..e196fd0 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -2195,8 +2195,13 @@ _gth_browser_real_set_current_page (GthWindow *window,
 	_gth_browser_hide_infobar (browser);
 
 	if (prev_page >= 0) {
-		gtk_window_get_size (GTK_WINDOW (window), &width, &height);
-		gth_window_save_page_size (GTH_WINDOW (window), prev_page, width, height);
+		GdkWindowState state;
+
+		state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (browser)));
+		if ((state & GDK_WINDOW_STATE_MAXIMIZED) == 0) { /* ! maximized */
+			gtk_window_get_size (GTK_WINDOW (window), &width, &height);
+			gth_window_save_page_size (GTH_WINDOW (window), prev_page, width, height);
+		}
 	}
 	gth_window_apply_saved_size (GTH_WINDOW (window), page);
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]