summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2002-03-02 00:30:55 +0000
committerDarin Adler <darin@src.gnome.org>2002-03-02 00:30:55 +0000
commit6bc9c3fcdaef37fdb2cc3344e2e66c7191873383 (patch)
tree1593789849f3ceb106ba8c4d05c1931ea78aa2f0 /components
parent114ba8327529b7047f23db62946cfdc7d1657cfa (diff)
downloadnautilus-6bc9c3fcdaef37fdb2cc3344e2e66c7191873383.tar.gz
Use eel_add_weak_pointer, since it's more foolproof than
* components/throbber/nautilus-throbber.c: (nautilus_throbber_instance_init), (nautilus_throbber_finalize): * src/file-manager/fm-directory-view.c: (fm_directory_view_finalize), (real_merge_menus): * src/nautilus-window-menus.c: (help_menu_about_nautilus_callback): Use eel_add_weak_pointer, since it's more foolproof than g_object_add_weak_pointer. Also fix the about case so that it only adds the weak pointer once per created window.
Diffstat (limited to 'components')
-rw-r--r--components/throbber/nautilus-throbber.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/components/throbber/nautilus-throbber.c b/components/throbber/nautilus-throbber.c
index 116fd5c0d..b0f860ea5 100644
--- a/components/throbber/nautilus-throbber.c
+++ b/components/throbber/nautilus-throbber.c
@@ -225,8 +225,7 @@ nautilus_throbber_instance_init (NautilusThrobber *throbber)
/* make the bonobo control */
throbber->details->control = BONOBO_OBJECT (bonobo_control_new (widget));
- g_object_add_weak_pointer (G_OBJECT (throbber->details->control),
- (gpointer *) &throbber->details->control);
+ eel_add_weak_pointer (&throbber->details->control);
/* attach a property bag with the configure property */
throbber->details->property_bag = bonobo_property_bag_new (get_bonobo_properties,
@@ -655,10 +654,7 @@ nautilus_throbber_finalize (GObject *object)
bonobo_object_unref (throbber->details->property_bag);
- if (throbber->details->control != NULL) {
- g_object_remove_weak_pointer (G_OBJECT (throbber->details->control),
- (gpointer *) &throbber->details->control);
- }
+ eel_remove_weak_pointer (&throbber->details->control);
g_free (throbber->details);