[nautilus] files-view: move disconnect_signal calls to destroy



commit a142e2ae67ba8ff8bb08ae783a0756efcdbb1552
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Jan 13 18:51:11 2016 +0100

    files-view: move disconnect_signal calls to destroy
    
    So we have all the disconnection in one place and we avoid
    random callbacks while destroying.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759717

 src/nautilus-files-view.c |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index b2a6de1..885858a 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -2895,6 +2895,18 @@ nautilus_files_view_destroy (GtkWidget *object)
                 view->details->floating_bar_loading_timeout_id = 0;
         }
 
+        g_signal_handlers_disconnect_by_func (nautilus_preferences,
+                                              schedule_update_context_menus, view);
+        g_signal_handlers_disconnect_by_func (nautilus_preferences,
+                                              click_policy_changed_callback, view);
+        g_signal_handlers_disconnect_by_func (nautilus_preferences,
+                                              sort_directories_first_changed_callback, view);
+        g_signal_handlers_disconnect_by_func (gtk_filechooser_preferences,
+                                              show_hidden_files_changed_callback, view);
+        g_signal_handlers_disconnect_by_func (nautilus_window_state,
+                                              nautilus_files_view_display_selection_info, view);
+        g_signal_handlers_disconnect_by_func (gnome_lockdown_preferences,
+                                              schedule_update_context_menus, view);
 
         nautilus_file_unref (view->details->directory_as_file);
         view->details->directory_as_file = NULL;
@@ -2915,19 +2927,6 @@ nautilus_files_view_finalize (GObject *object)
 
         view = NAUTILUS_FILES_VIEW (object);
 
-        g_signal_handlers_disconnect_by_func (nautilus_preferences,
-                                              schedule_update_context_menus, view);
-        g_signal_handlers_disconnect_by_func (nautilus_preferences,
-                                              click_policy_changed_callback, view);
-        g_signal_handlers_disconnect_by_func (nautilus_preferences,
-                                              sort_directories_first_changed_callback, view);
-        g_signal_handlers_disconnect_by_func (gtk_filechooser_preferences,
-                                              show_hidden_files_changed_callback, view);
-        g_signal_handlers_disconnect_by_func (nautilus_window_state,
-                                              nautilus_files_view_display_selection_info, view);
-
-        g_signal_handlers_disconnect_by_func (gnome_lockdown_preferences,
-                                              schedule_update_context_menus, view);
         g_clear_object (&view->details->view_action_group);
         g_clear_object (&view->details->background_menu);
         g_clear_object (&view->details->selection_menu);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]