Tiny patch for bonobo_ui_handler_menu_get_callback



This patch just allows the caller to pass NULL for return pointers that
they aren't interested in. I plan to check it in today.

Index: bonobo/bonobo-uih-menu.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-uih-menu.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 bonobo-uih-menu.c
--- bonobo/bonobo-uih-menu.c 2000/06/07 22:14:13 1.12
+++ bonobo/bonobo-uih-menu.c 2000/06/16 23:24:28
@@ -3534,9 +3534,15 @@ bonobo_ui_handler_menu_get_callback (Bon

  internal_cb = menu_local_get_item (uih, path);

- *callback      = internal_cb->callback;
- *callback_data = internal_cb->callback_data;
- *callback_data_destroy_notify =
internal_cb->callback_data_destroy_notify;
+ if (callback != NULL) {
+  *callback = internal_cb->callback;
+ }
+ if (callback_data != NULL) {
+  *callback_data = internal_cb->callback_data;
+ }
+ if (callback_data_destroy_notify != NULL) {
+  *callback_data_destroy_notify =
internal_cb->callback_data_destroy_notify;
+ }
 }

 /**






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