Commit 95c54a99 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Save spatial geometry on window close, not slot close. Slot close is to

2008-10-09  Alexander Larsson  <alexl@redhat.com>

        * src/nautilus-spatial-window.c:
        (real_window_close):
        (nautilus_spatial_window_class_init):
	Save spatial geometry on window close, not slot close.
	Slot close is to late in the close by window destry case,
	as the windows have then been unrealized.



svn path=/trunk/; revision=14714
parent e017923a
2008-10-09 Alexander Larsson <alexl@redhat.com>
* src/nautilus-spatial-window.c:
(real_window_close):
(nautilus_spatial_window_class_init):
Save spatial geometry on window close, not slot close.
Slot close is to late in the close by window destry case,
as the windows have then been unrealized.
2008-10-09 Alexander Larsson <alexl@redhat.com> 2008-10-09 Alexander Larsson <alexl@redhat.com>
* src/nautilus-main.c (main): * src/nautilus-main.c (main):
......
...@@ -460,17 +460,24 @@ real_open_slot (NautilusWindow *window, ...@@ -460,17 +460,24 @@ real_open_slot (NautilusWindow *window,
} }
static void static void
real_close_slot (NautilusWindow *window, real_window_close (NautilusWindow *window)
NautilusWindowSlot *slot)
{ {
g_assert (g_list_length (window->details->slots) == 1); NautilusWindowSlot *slot;
nautilus_spatial_window_save_geometry (slot); /* We're closing the window, save the geometry. */
nautilus_spatial_window_save_scroll_position (slot); /* Note that we do this in window close, not slot close, because slot
nautilus_spatial_window_save_show_hidden_files_mode (slot); close is too late, by then the widgets have been unrealized. */
if (window->details->slots != NULL) {
slot = window->details->slots->data;
nautilus_spatial_window_save_geometry (slot);
nautilus_spatial_window_save_scroll_position (slot);
nautilus_spatial_window_save_show_hidden_files_mode (slot);
}
EEL_CALL_PARENT (NAUTILUS_WINDOW_CLASS, EEL_CALL_PARENT (NAUTILUS_WINDOW_CLASS,
close_slot, (window, slot)); close, (window));
} }
static void static void
...@@ -1039,7 +1046,7 @@ nautilus_spatial_window_class_init (NautilusSpatialWindowClass *class) ...@@ -1039,7 +1046,7 @@ nautilus_spatial_window_class_init (NautilusSpatialWindowClass *class)
real_set_allow_up; real_set_allow_up;
NAUTILUS_WINDOW_CLASS (class)->open_slot = real_open_slot; NAUTILUS_WINDOW_CLASS (class)->open_slot = real_open_slot;
NAUTILUS_WINDOW_CLASS (class)->close_slot = real_close_slot; NAUTILUS_WINDOW_CLASS (class)->close = real_window_close;
binding_set = gtk_binding_set_by_class (class); binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_SHIFT_MASK, gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_SHIFT_MASK,
......
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