diff options
author | Ramiro Estrugo <ramiro@src.gnome.org> | 2001-03-31 11:52:37 +0000 |
---|---|---|
committer | Ramiro Estrugo <ramiro@src.gnome.org> | 2001-03-31 11:52:37 +0000 |
commit | bb8afb01b90e0e0d363248c713409d6ddda8fb7a (patch) | |
tree | 40f564947a807935121f890c3373e78dde2a7a3c /src | |
parent | 270d2b506fe1bd5935ac194734fe65528972f234 (diff) | |
download | nautilus-bb8afb01b90e0e0d363248c713409d6ddda8fb7a.tar.gz |
Fix a bug introduced by my last checkin. No longer need to remove callback
* src/nautilus-window.c: (nautilus_window_initialize),
(nautilus_window_destroy):
Fix a bug introduced by my last checkin. No longer need to remove
callback for builtin bookmark menu, as this is done
automatically. This was causing a preferences critical.
Also changed the other preference callback to be automatically
removed.
Diffstat (limited to 'src')
-rw-r--r-- | src/nautilus-navigation-window.c | 13 | ||||
-rw-r--r-- | src/nautilus-object-window.c | 13 | ||||
-rw-r--r-- | src/nautilus-spatial-window.c | 13 | ||||
-rw-r--r-- | src/nautilus-window.c | 13 |
4 files changed, 16 insertions, 36 deletions
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index 50a464bca..7ac56d1a3 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -193,9 +193,10 @@ nautilus_window_initialize (NautilusWindow *window) gtk_quit_add_destroy (1, GTK_OBJECT (window)); /* Keep track of any sidebar panel changes */ - nautilus_preferences_add_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, - sidebar_panels_changed_callback, - window); + nautilus_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, + sidebar_panels_changed_callback, + window, + GTK_OBJECT (window)); /* Keep the main event loop alive as long as the window exists */ nautilus_main_event_loop_register (GTK_OBJECT (window)); @@ -882,12 +883,6 @@ nautilus_window_destroy (GtkObject *object) /* Get rid of all callbacks. */ cancel_view_as_callback (window); - nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, - sidebar_panels_changed_callback, - window); - nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, - nautilus_window_bookmarks_preference_changed_callback, - window); nautilus_window_remove_bookmarks_menu_callback (window); nautilus_window_remove_go_menu_callback (window); nautilus_window_toolbar_remove_theme_callback (window); diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c index 50a464bca..7ac56d1a3 100644 --- a/src/nautilus-object-window.c +++ b/src/nautilus-object-window.c @@ -193,9 +193,10 @@ nautilus_window_initialize (NautilusWindow *window) gtk_quit_add_destroy (1, GTK_OBJECT (window)); /* Keep track of any sidebar panel changes */ - nautilus_preferences_add_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, - sidebar_panels_changed_callback, - window); + nautilus_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, + sidebar_panels_changed_callback, + window, + GTK_OBJECT (window)); /* Keep the main event loop alive as long as the window exists */ nautilus_main_event_loop_register (GTK_OBJECT (window)); @@ -882,12 +883,6 @@ nautilus_window_destroy (GtkObject *object) /* Get rid of all callbacks. */ cancel_view_as_callback (window); - nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, - sidebar_panels_changed_callback, - window); - nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, - nautilus_window_bookmarks_preference_changed_callback, - window); nautilus_window_remove_bookmarks_menu_callback (window); nautilus_window_remove_go_menu_callback (window); nautilus_window_toolbar_remove_theme_callback (window); diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index 50a464bca..7ac56d1a3 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -193,9 +193,10 @@ nautilus_window_initialize (NautilusWindow *window) gtk_quit_add_destroy (1, GTK_OBJECT (window)); /* Keep track of any sidebar panel changes */ - nautilus_preferences_add_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, - sidebar_panels_changed_callback, - window); + nautilus_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, + sidebar_panels_changed_callback, + window, + GTK_OBJECT (window)); /* Keep the main event loop alive as long as the window exists */ nautilus_main_event_loop_register (GTK_OBJECT (window)); @@ -882,12 +883,6 @@ nautilus_window_destroy (GtkObject *object) /* Get rid of all callbacks. */ cancel_view_as_callback (window); - nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, - sidebar_panels_changed_callback, - window); - nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, - nautilus_window_bookmarks_preference_changed_callback, - window); nautilus_window_remove_bookmarks_menu_callback (window); nautilus_window_remove_go_menu_callback (window); nautilus_window_toolbar_remove_theme_callback (window); diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 50a464bca..7ac56d1a3 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -193,9 +193,10 @@ nautilus_window_initialize (NautilusWindow *window) gtk_quit_add_destroy (1, GTK_OBJECT (window)); /* Keep track of any sidebar panel changes */ - nautilus_preferences_add_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, - sidebar_panels_changed_callback, - window); + nautilus_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, + sidebar_panels_changed_callback, + window, + GTK_OBJECT (window)); /* Keep the main event loop alive as long as the window exists */ nautilus_main_event_loop_register (GTK_OBJECT (window)); @@ -882,12 +883,6 @@ nautilus_window_destroy (GtkObject *object) /* Get rid of all callbacks. */ cancel_view_as_callback (window); - nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_SIDEBAR_PANELS_NAMESPACE, - sidebar_panels_changed_callback, - window); - nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, - nautilus_window_bookmarks_preference_changed_callback, - window); nautilus_window_remove_bookmarks_menu_callback (window); nautilus_window_remove_go_menu_callback (window); nautilus_window_toolbar_remove_theme_callback (window); |