Commit 5bbc8307 authored by Cosimo Cecchi's avatar Cosimo Cecchi Committed by Cosimo Cecchi

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
parent 60328a43
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).
2008-04-27 Cosimo Cecchi <cosimoc@gnome.org>
* src/nautilus-window.c: (nautilus_window_key_press_event):
......
......@@ -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);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment