diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2008-04-27 18:16:40 +0000 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@src.gnome.org> | 2008-04-27 18:16:40 +0000 |
commit | 5bbc8307e1651de2ab2d13d08fdc601e089cb461 (patch) | |
tree | 5fd1560db987f3c64160b7e5aedb0941a3fc1c49 /src/nautilus-navigation-window.c | |
parent | 60328a4327cdbcd6c38b56bcc001f9a373db9320 (diff) | |
download | nautilus-5bbc8307e1651de2ab2d13d08fdc601e089cb461.tar.gz |
Always properly remember window size, also in the case the window is
2008-04-27 Cosimo Cecchi <cosimoc@gnome.org>
* src/nautilus-navigation-window.c:
(nautilus_navigation_window_save_geometry):
Always properly remember window size, also in the case the window is
closed being maximized. (#385176).
svn path=/trunk/; revision=14100
Diffstat (limited to 'src/nautilus-navigation-window.c')
-rw-r--r-- | src/nautilus-navigation-window.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index 0015cc582..b441a7ebc 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -1536,13 +1536,17 @@ static void nautilus_navigation_window_save_geometry (NautilusNavigationWindow *window) { char *geometry_string; + gboolean is_maximized; g_assert (NAUTILUS_IS_WINDOW (window)); if (GTK_WIDGET(window)->window) { geometry_string = eel_gtk_window_get_geometry_string (GTK_WINDOW (window)); + is_maximized = gdk_window_get_state (GTK_WIDGET (window)->window) + & GDK_WINDOW_STATE_MAXIMIZED; - if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_NAVIGATION_WINDOW_SAVED_GEOMETRY)) { + if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_NAVIGATION_WINDOW_SAVED_GEOMETRY) && + !is_maximized) { eel_preferences_set (NAUTILUS_PREFERENCES_NAVIGATION_WINDOW_SAVED_GEOMETRY, geometry_string); @@ -1552,7 +1556,7 @@ nautilus_navigation_window_save_geometry (NautilusNavigationWindow *window) if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_NAVIGATION_WINDOW_MAXIMIZED)) { eel_preferences_set_boolean (NAUTILUS_PREFERENCES_NAVIGATION_WINDOW_MAXIMIZED, - gdk_window_get_state (GTK_WIDGET (window)->window) & GDK_WINDOW_STATE_MAXIMIZED); + is_maximized); } } } |