summaryrefslogtreecommitdiff
path: root/src/nautilus-navigation-window.c
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2002-01-24 21:52:34 +0000
committerDarin Adler <darin@src.gnome.org>2002-01-24 21:52:34 +0000
commit5db444dcb41a76284531525d6d414955c2a0232d (patch)
tree7a2ad259953ec7b9d21fffffb6b41150c334f750 /src/nautilus-navigation-window.c
parent85f29cd7a728c97d9cbde48709d93bae0363a181 (diff)
downloadnautilus-5db444dcb41a76284531525d6d414955c2a0232d.tar.gz
GNOME2_CONVERSION_COMPLETE eradication campaign
* components/hardware/nautilus-hardware-view.c: (nautilus_hardware_view_init): Re-enable the property bag. * components/image-viewer/Makefile.am: Remove io-png.[ch]. * components/image-viewer/io-png.c: Remove. * components/image-viewer/io-png.h: Remove. * components/image-viewer/nautilus-image-view.c: (save_image_to_stream): Not implemented. * libnautilus-private/nautilus-directory-metafile.c: (nautilus_directory_register_metadata_monitor), (nautilus_directory_unregister_metadata_monitor): Wipe out some bonobo_object_corba_objref calls. * src/nautilus-window.h: Make the throbber private. * src/nautilus-window-private.h: Make the throbber private. Use a listener object now, not a listener ID. * src/nautilus-window-toolbars.c: (nautilus_window_initialize_toolbars): Move the throbber into details. * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_unrealize): Use the new listener calls that use an object, not an ID. (nautilus_window_allow_stop): Move the throbber into details.
Diffstat (limited to 'src/nautilus-navigation-window.c')
-rw-r--r--src/nautilus-navigation-window.c66
1 files changed, 31 insertions, 35 deletions
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 36e356b24..adbecdbdc 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -531,8 +531,6 @@ set_initial_window_geometry (NautilusWindow *window)
max_height_for_screen));
}
-#if GNOME2_CONVERSION_COMPLETE
-
static gboolean
location_change_at_idle_callback (gpointer callback_data)
{
@@ -555,11 +553,11 @@ location_change_at_idle_callback (gpointer callback_data)
/* handle bonobo events from the throbber -- since they can come in at
any time right in the middle of things, defer until idle */
static void
-throbber_location_change_request_callback (BonoboListener *listener,
- char *event_name,
- CORBA_any *arg,
- CORBA_Environment *ev,
- gpointer callback_data)
+throbber_callback (BonoboListener *listener,
+ const char *event_name,
+ const CORBA_any *arg,
+ CORBA_Environment *ev,
+ gpointer callback_data)
{
NautilusWindow *window;
@@ -574,8 +572,6 @@ throbber_location_change_request_callback (BonoboListener *listener,
}
}
-#endif
-
/* Add a dummy menu with a "View as ..." item when we first create the
* view_as_option_menu -- without this the menu draws empty and shrunk,
* once we populate it it grows and forces the toolbar and all the other
@@ -746,16 +742,15 @@ nautilus_window_constructed (NautilusWindow *window)
window->details->ui_pending_initialize_menus_part_2 = TRUE;
/* watch for throbber location changes, too */
- if (window->throbber != CORBA_OBJECT_NIL) {
+ if (window->details->throbber != CORBA_OBJECT_NIL) {
CORBA_exception_init (&ev);
- property_bag = Bonobo_Control_getProperties (window->throbber, &ev);
+ property_bag = Bonobo_Control_getProperties (window->details->throbber, &ev);
if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) {
-#if GNOME2_CONVERSION_COMPLETE
- window->details->throbber_location_change_request_listener_id =
- bonobo_event_source_client_add_listener
- (property_bag, throbber_location_change_request_callback,
- "Bonobo/Property:change:location", NULL, window);
-#endif
+ window->details->throbber_listener =
+ bonobo_event_source_client_add_listener_full
+ (property_bag,
+ g_cclosure_new (G_CALLBACK (throbber_callback), window, NULL),
+ "Bonobo/Property:change:location", NULL);
bonobo_object_release_unref (property_bag, NULL);
}
CORBA_exception_free (&ev);
@@ -851,23 +846,25 @@ nautilus_window_unrealize (GtkWidget *widget)
/* Get rid of the throbber explicitly before it self-destructs
* (which it will do when the control frame goes away.
*/
- if (window->throbber != CORBA_OBJECT_NIL) {
- CORBA_exception_init (&ev);
- property_bag = Bonobo_Control_getProperties (window->throbber, &ev);
- if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) {
-#if GNOME2_CONVERSION_COMPLETE
- bonobo_event_source_client_remove_listener
- (property_bag,
- window->details->throbber_location_change_request_listener_id,
- &ev);
-#endif
- bonobo_object_release_unref (property_bag, NULL);
- }
- CORBA_exception_free (&ev);
+ if (window->details->throbber != CORBA_OBJECT_NIL) {
+ if (window->details->throbber_listener != CORBA_OBJECT_NIL) {
+ CORBA_exception_init (&ev);
+
+ property_bag = Bonobo_Control_getProperties (window->details->throbber, &ev);
+ if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) {
+ bonobo_event_source_client_remove_listener
+ (property_bag, window->details->throbber_listener, NULL);
+ bonobo_object_release_unref (property_bag, NULL);
+ }
- bonobo_object_release_unref (window->throbber, NULL);
+ CORBA_Object_release (window->details->throbber_listener, &ev);
+ window->details->throbber_listener = CORBA_OBJECT_NIL;
- window->throbber = CORBA_OBJECT_NIL;
+ CORBA_exception_free (&ev);
+ }
+
+ bonobo_object_release_unref (window->details->throbber, NULL);
+ window->details->throbber = CORBA_OBJECT_NIL;
}
EEL_CALL_PARENT (GTK_WIDGET_CLASS, unrealize, (widget));
@@ -1720,10 +1717,9 @@ nautilus_window_allow_stop (NautilusWindow *window, gboolean allow)
nautilus_bonobo_set_sensitive (window->details->shell_ui,
NAUTILUS_COMMAND_STOP, allow);
- if (window->throbber != CORBA_OBJECT_NIL) {
+ if (window->details->throbber != CORBA_OBJECT_NIL) {
CORBA_exception_init (&ev);
- property_bag = Bonobo_Control_getProperties (window->throbber, &ev);
-
+ property_bag = Bonobo_Control_getProperties (window->details->throbber, &ev);
if (!BONOBO_EX (&ev) && property_bag != CORBA_OBJECT_NIL) {
bonobo_pbclient_set_boolean (property_bag, "throbbing", allow, &ev);
bonobo_object_release_unref (property_bag, NULL);