nautilus r14715 - in branches/gnome-2-24: . src
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14715 - in branches/gnome-2-24: . src
- Date: Thu, 9 Oct 2008 12:50:08 +0000 (UTC)
Author: alexl
Date: Thu Oct 9 12:50:08 2008
New Revision: 14715
URL: http://svn.gnome.org/viewvc/nautilus?rev=14715&view=rev
Log:
2008-10-09 Alexander Larsson <alexl redhat com>
Merged from trunk:
* 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.
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/src/nautilus-spatial-window.c
Modified: branches/gnome-2-24/src/nautilus-spatial-window.c
==============================================================================
--- branches/gnome-2-24/src/nautilus-spatial-window.c (original)
+++ branches/gnome-2-24/src/nautilus-spatial-window.c Thu Oct 9 12:50:08 2008
@@ -460,17 +460,24 @@
}
static void
-real_close_slot (NautilusWindow *window,
- NautilusWindowSlot *slot)
+real_window_close (NautilusWindow *window)
{
- g_assert (g_list_length (window->details->slots) == 1);
-
- nautilus_spatial_window_save_geometry (slot);
- nautilus_spatial_window_save_scroll_position (slot);
- nautilus_spatial_window_save_show_hidden_files_mode (slot);
+ NautilusWindowSlot *slot;
+ /* We're closing the window, save the geometry. */
+ /* Note that we do this in window close, not slot close, because 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,
- close_slot, (window, slot));
+ close, (window));
}
static void
@@ -1039,7 +1046,7 @@
real_set_allow_up;
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);
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_SHIFT_MASK,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]