summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-bonobo-extensions.c
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2000-06-07 19:29:23 +0000
committerDarin Adler <darin@src.gnome.org>2000-06-07 19:29:23 +0000
commit032a0948439468cd977b6f7b591de7db4f1a7685 (patch)
tree275498d83a7e5d2f5977caae9794f3637f91d881 /libnautilus-private/nautilus-bonobo-extensions.c
parentc2420203e715831b3250874eff27b7789cac6ffa (diff)
downloadnautilus-032a0948439468cd977b6f7b591de7db4f1a7685.tar.gz
Updated code affected by destroy-notify addition to bonobo. Requires new
Updated code affected by destroy-notify addition to bonobo. Requires new bonobo. * libnautilus-extensions/nautilus-bonobo-extensions.c: (nautilus_bonobo_ui_handler_menu_set_toggle_appearance): Save and restore the destroy notify function as well as the callback. This requires using the new function bonobo_ui_handler_menu_remove_callback_no_notify to do right. * src/file-manager/fm-directory-view.c: (application_launch_parameters_new), (application_launch_parameters_free): Ref and unref the directory view object now that we correctly free this as needed. (viewer_launch_parameters_new), (viewer_launch_parameters_free): Ref and unref the directory view object now that we correctly free this as needed. (add_open_with_bonobo_menu_item): Add a destroy-notify function parameters and apply it using bonobo_ui_handler_menu_set_callback. (add_application_to_bonobo_menu): Free the launch parmaeters using a destroy-notify function. (add_component_to_bonobo_menu): Free the launch parmaeters using a destroy-notify function. * src/nautilus-window-menus.c: (append_bookmark_to_menu): Use a destroy-notify function to destroy the bookmark holder. (clear_appended_bookmark_items): Get rid of the code that gets the callback data and destroys it explicitly. * libnautilus/nautilus-clipboard.c: (add_menu_item): * src/file-manager/fm-directory-view.c: (insert_bonobo_menu_item), (fm_directory_view_real_merge_menus): * src/file-manager/fm-icon-view.c: (append_bonobo_menu_item), (fm_icon_view_merge_menus): Rename BonoboUIHandlerCallbackFunc -> BonoboUIHandlerCallback. * HACKING: Some reformatting.
Diffstat (limited to 'libnautilus-private/nautilus-bonobo-extensions.c')
-rw-r--r--libnautilus-private/nautilus-bonobo-extensions.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libnautilus-private/nautilus-bonobo-extensions.c b/libnautilus-private/nautilus-bonobo-extensions.c
index 52c129068..3244450b2 100644
--- a/libnautilus-private/nautilus-bonobo-extensions.c
+++ b/libnautilus-private/nautilus-bonobo-extensions.c
@@ -27,7 +27,6 @@
#include <config.h>
#include "nautilus-bonobo-extensions.h"
-
/**
* nautilus_bonobo_ui_handler_menu_toggle_appearance
*
@@ -43,14 +42,17 @@ nautilus_bonobo_ui_handler_menu_set_toggle_appearance (BonoboUIHandler *uih,
const char *path,
gboolean new_value)
{
- BonoboUIHandlerCallbackFunc saved_callback;
+ BonoboUIHandlerCallback saved_callback;
gpointer saved_callback_data;
+ GDestroyNotify saved_destroy_notify;
/* Temporarily clear out callback and data so when we
* set the toggle state the callback isn't called.
*/
- bonobo_ui_handler_menu_get_callback (uih, path, &saved_callback, &saved_callback_data);
- bonobo_ui_handler_menu_set_callback (uih, path, NULL, NULL);
+ bonobo_ui_handler_menu_get_callback (uih, path, &saved_callback,
+ &saved_callback_data, &saved_destroy_notify);
+ bonobo_ui_handler_menu_remove_callback_no_notify (uih, path);
bonobo_ui_handler_menu_set_toggle_state (uih, path, new_value);
- bonobo_ui_handler_menu_set_callback (uih, path, saved_callback, saved_callback_data);
+ bonobo_ui_handler_menu_set_callback (uih, path, saved_callback,
+ saved_callback_data, saved_destroy_notify);
}