nautilus r13964 - in branches/multiview: . src
- From: cneumair svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r13964 - in branches/multiview: . src
- Date: Fri, 21 Mar 2008 16:19:19 +0000 (GMT)
Author: cneumair
Date: Fri Mar 21 16:19:18 2008
New Revision: 13964
URL: http://svn.gnome.org/viewvc/nautilus?rev=13964&view=rev
Log:
2007-03-21 Christian Neumair <cneumair gnome org>
* src/nautilus-window-manage-views.[ch]:
* src/nautilus-window.[ch]:
Disconnect location change code when closing slot, rather than at
window finalization time. Also assert() that all views are destroyed in
finalize(), since the window's close() function must have run.
Modified:
branches/multiview/ChangeLog
branches/multiview/src/nautilus-navigation-window.c
branches/multiview/src/nautilus-window-manage-views.c
branches/multiview/src/nautilus-window-manage-views.h
branches/multiview/src/nautilus-window.c
Modified: branches/multiview/src/nautilus-navigation-window.c
==============================================================================
--- branches/multiview/src/nautilus-navigation-window.c (original)
+++ branches/multiview/src/nautilus-navigation-window.c Fri Mar 21 16:19:18 2008
@@ -201,14 +201,9 @@
g_assert (widget != NULL);
/* find slot corresponding to the target page */
- for (l = nautilus_window->details->slots; l != NULL; l = l->next) {
- slot = NAUTILUS_WINDOW_SLOT (l->data);
- if (slot->content_box == widget) {
- break;
- }
- }
-
+ slot = nautilus_window_get_slot_for_content_box (widget);
g_assert (slot != NULL);
+
nautilus_window_set_active_slot (nautilus_window, slot);
return FALSE;
Modified: branches/multiview/src/nautilus-window-manage-views.c
==============================================================================
--- branches/multiview/src/nautilus-window-manage-views.c (original)
+++ branches/multiview/src/nautilus-window-manage-views.c Fri Mar 21 16:19:18 2008
@@ -2135,17 +2135,12 @@
}
void
-nautilus_window_manage_views_finalize (NautilusWindow *window)
+nautilus_window_manage_views_close_slot (NautilusWindow *window,
+ NautilusWindowSlot *slot)
{
- NautilusWindowSlot *slot;
- GList *l;
-
- for (l = window->details->slots; l != NULL; l = l->next) {
- slot = l->data;
- free_location_change (slot);
- cancel_viewed_file_changed_callback (slot);
- }
+ free_location_change (slot);
+ cancel_viewed_file_changed_callback (slot);
}
void
Modified: branches/multiview/src/nautilus-window-manage-views.h
==============================================================================
--- branches/multiview/src/nautilus-window-manage-views.h (original)
+++ branches/multiview/src/nautilus-window-manage-views.h Fri Mar 21 16:19:18 2008
@@ -31,7 +31,9 @@
#include "nautilus-navigation-window.h"
void nautilus_window_manage_views_destroy (NautilusWindow *window);
-void nautilus_window_manage_views_finalize (NautilusWindow *window);
+
+void nautilus_window_manage_views_close_slot (NautilusWindow *window,
+ NautilusWindowSlot *slot);
void nautilus_navigation_window_set_sidebar_panels (NautilusNavigationWindow *window,
GList *view_identifier_list);
Modified: branches/multiview/src/nautilus-window.c
==============================================================================
--- branches/multiview/src/nautilus-window.c (original)
+++ branches/multiview/src/nautilus-window.c Fri Mar 21 16:19:18 2008
@@ -646,21 +646,11 @@
nautilus_window_destroy (GtkObject *object)
{
NautilusWindow *window;
- NautilusWindowSlot *slot;
- GList *l;
window = NAUTILUS_WINDOW (object);
-
nautilus_window_manage_views_destroy (window);
- for (l = window->details->slots; l != NULL; l = l->next) {
- slot = l->data;
-
- cancel_view_as_callback (slot);
- g_object_unref (slot);
- }
-
GTK_OBJECT_CLASS (nautilus_window_parent_class)->destroy (object);
}
@@ -668,22 +658,15 @@
nautilus_window_finalize (GObject *object)
{
NautilusWindow *window;
- NautilusWindowSlot *slot;
- GList *l;
-
+
window = NAUTILUS_WINDOW (object);
nautilus_window_remove_bookmarks_menu_callback (window);
-
- nautilus_window_manage_views_finalize (window);
free_stored_viewers (window);
- for (l = window->details->slots; l != NULL; l = l->next) {
- slot = NAUTILUS_WINDOW_SLOT (l->data);
- g_object_unref (G_OBJECT (slot));
- }
-
+ /* nautilus_window_close() should have run */
+ g_assert (window->details->slots == NULL);
g_object_unref (window->details->ui_manager);
@@ -785,6 +768,8 @@
real_close_slot (NautilusWindow *window,
NautilusWindowSlot *slot)
{
+ nautilus_window_manage_views_close_slot (window, slot);
+ cancel_view_as_callback (slot);
g_object_unref (slot);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]