Commit 5db444dc authored by Darin Adler's avatar Darin Adler

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.
parent 85f29cd7
2002-01-24 Darin Adler <darin@bentspoon.com>
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.
2002-01-24 Darin Adler <darin@bentspoon.com>
* src/nautilus-bookmarks-window.c: (create_bookmarks_window):
......
......@@ -153,16 +153,15 @@ static void
nautilus_hardware_view_init (NautilusHardwareView *hardware_view)
{
EelBackground *background;
hardware_view->details = g_new0 (NautilusHardwareViewDetails, 1);
hardware_view->details->nautilus_view = nautilus_view_new (GTK_WIDGET (hardware_view));
g_signal_connect (hardware_view->details->nautilus_view,
"load_location",
G_CALLBACK (hardware_view_load_location_callback),
hardware_view);
hardware_view->details->form = NULL;
"load_location",
G_CALLBACK (hardware_view_load_location_callback),
hardware_view);
background = eel_get_widget_background (GTK_WIDGET (hardware_view));
eel_background_set_color (background, HARDWARE_DEFAULT_BACKGROUND_COLOR);
......@@ -173,14 +172,13 @@ nautilus_hardware_view_init (NautilusHardwareView *hardware_view)
hardware_dnd_target_table, G_N_ELEMENTS (hardware_dnd_target_table), GDK_ACTION_COPY);
/* allocate a property bag to specify the name of the icon for this component */
hardware_view->details->property_bag = bonobo_property_bag_new (get_bonobo_properties, set_bonobo_properties, hardware_view);
#ifdef GNOME2_CONVERSION_COMPLETE
bonobo_control_set_properties (nautilus_view_get_bonobo_control (hardware_view->details->nautilus_view), hardware_view->details->property_bag);
#endif
hardware_view->details->property_bag = bonobo_property_bag_new (get_bonobo_properties, set_bonobo_properties, hardware_view);
bonobo_property_bag_add (hardware_view->details->property_bag, "icon_name", ICON_NAME, BONOBO_ARG_STRING, NULL,
_("name of icon for the hardware view"), 0);
bonobo_property_bag_add (hardware_view->details->property_bag, "summary_info", COMPONENT_INFO, BONOBO_ARG_STRING, NULL,
_("summary of hardware info"), 0);
bonobo_control_set_properties (nautilus_view_get_bonobo_control (hardware_view->details->nautilus_view),
BONOBO_OBJREF (hardware_view->details->property_bag), NULL);
/* add the timer task to update the uptime */
hardware_view->details->timer_task = gtk_timeout_add (60000, update_uptime_text, hardware_view);
......
......@@ -2,10 +2,7 @@ NULL =
bin_PROGRAMS = nautilus-image-view
nautilus_image_view_SOURCES = \
nautilus-image-view.c \
io-png.c \
io-png.h
nautilus_image_view_SOURCES = nautilus-image-view.c
INCLUDES = \
-I$(top_srcdir) \
......
/*
* io-png.c by David Welton <davidw@linuxcare.com>. Most of the code
* borrowed from Imlib, Bonobo Stream API by Michael Meeks <mmeeks@gnu.org>
*/
#include <config.h>
#include "io-png.h"
#include <bonobo/bonobo-stream-client.h>
#include <png.h>
typedef struct {
Bonobo_Stream stream;
CORBA_Environment *ev;
} BStreamData;
#ifdef GNOME2_CONVERSION_COMPLETE
static void
png_write_data_fn (png_structp png_ptr, png_bytep data, png_size_t len)
{
BStreamData *sd = png_get_io_ptr (png_ptr);
if (sd->ev->_major != CORBA_NO_EXCEPTION)
return;
bonobo_stream_client_write (sd->stream, data, len, sd->ev);
}
static void
png_flush_fn (png_structp png_ptr)
{
g_warning ("Flush nothing");
}
#endif
void
image_save (Bonobo_Stream stream, GdkPixbuf *pixbuf,
CORBA_Environment *ev)
{
g_warning ("Save image unimplemented");
#ifdef GNOME2_CONVERSION_COMPLETE
/* Use Eog */
png_structp png_ptr;
png_infop info_ptr;
guint8 *ptr;
int x, y, j;
png_bytep row_ptr;
volatile png_bytep data = NULL;
png_color_8 sig_bit;
int w, h, rowstride;
int has_alpha;
int bpc;
BStreamData sdata;
bpc = gdk_pixbuf_get_bits_per_sample (pixbuf);
w = gdk_pixbuf_get_width (pixbuf);
h = gdk_pixbuf_get_height (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
has_alpha = gdk_pixbuf_get_has_alpha (pixbuf);
png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING,
NULL, NULL, NULL);
if (!png_ptr)
goto png_err;
sdata.stream = stream;
sdata.ev = ev;
png_set_write_fn (png_ptr, &sdata, png_write_data_fn, png_flush_fn);
info_ptr = png_create_info_struct (png_ptr);
if (!info_ptr ||
setjmp (png_ptr->jmpbuf)) {
png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
goto png_err;
}
if (has_alpha) {
png_set_IHDR (png_ptr, info_ptr, w, h, bpc,
PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
#ifdef WORDS_BIGENDIAN
png_set_swap_alpha (png_ptr);
#else
png_set_bgr (png_ptr);
#endif
} else {
png_set_IHDR (png_ptr, info_ptr, w, h, bpc,
PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
data = g_malloc (w * 3 * sizeof(char));
}
sig_bit.red = bpc;
sig_bit.green = bpc;
sig_bit.blue = bpc;
sig_bit.alpha = bpc;
png_set_sBIT (png_ptr, info_ptr, &sig_bit);
png_write_info (png_ptr, info_ptr);
png_set_shift (png_ptr, &sig_bit);
png_set_packing (png_ptr);
ptr = gdk_pixbuf_get_pixels (pixbuf);
for (y = 0; y < h; y++) {
if (has_alpha)
row_ptr = (png_bytep)ptr;
else {
for (j = 0, x = 0; x < w; x++)
memcpy (&(data [x * 3]), &(ptr [x * 3]), 3);
row_ptr = (png_bytep)data;
}
png_write_rows (png_ptr, &row_ptr, 1);
ptr += rowstride;
}
g_free (data);
png_write_end (png_ptr, info_ptr);
png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
return;
png_err:
g_free (data);
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_Bonobo_Stream_IOError, NULL);
#endif
return;
}
#ifndef IO_PNG_H
#define IO_PNG_H
#include <bonobo/Bonobo.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
void image_save (Bonobo_Stream stream,
GdkPixbuf *pixbuf,
CORBA_Environment *ev);
#endif /* IO_PNG_H */
......@@ -35,8 +35,6 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
#include "io-png.h"
#define LOAD_BUFFER_SIZE 65536
/*
......@@ -449,13 +447,7 @@ save_image_to_stream (BonoboPersistStream *ps, Bonobo_Stream stream,
Bonobo_Persist_ContentType type, void *data,
CORBA_Environment *ev)
{
bonobo_object_data_t *bod = data;
if (bod->pixbuf == NULL) {
return;
}
image_save (stream, bod->pixbuf, ev);
g_warning ("save not implemented");
}
/*
......
......@@ -558,7 +558,7 @@ nautilus_directory_register_metadata_monitor (NautilusDirectory *directory)
Nautilus_Metafile_register_monitor
(metafile,
bonobo_object_corba_objref (BONOBO_OBJECT (directory->details->metafile_monitor)),
BONOBO_OBJREF (directory->details->metafile_monitor),
&ev);
/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
......@@ -581,7 +581,7 @@ nautilus_directory_unregister_metadata_monitor (NautilusDirectory *directory)
Nautilus_Metafile_unregister_monitor
(metafile,
bonobo_object_corba_objref (BONOBO_OBJECT (directory->details->metafile_monitor)),
BONOBO_OBJREF (directory->details->metafile_monitor),
&ev);
/* FIXME bugzilla.gnome.org 46664: examine ev for errors */
......
......@@ -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);
......
......@@ -98,7 +98,6 @@ struct NautilusWindow {
/* Widgets to keep track of (for state changes, etc) */
GtkWidget *zoom_control;
Bonobo_Unknown throbber;
/* Pending changes */
NautilusViewFrame *new_content_view;
......
......@@ -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);
......
......@@ -98,7 +98,6 @@ struct NautilusWindow {
/* Widgets to keep track of (for state changes, etc) */
GtkWidget *zoom_control;
Bonobo_Unknown throbber;
/* Pending changes */
NautilusViewFrame *new_content_view;
......
......@@ -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);
......
......@@ -98,7 +98,6 @@ struct NautilusWindow {
/* Widgets to keep track of (for state changes, etc) */
GtkWidget *zoom_control;
Bonobo_Unknown throbber;
/* Pending changes */
NautilusViewFrame *new_content_view;
......
......@@ -82,7 +82,8 @@ struct NautilusWindowDetails
NautilusViewIdentifier *extra_viewer;
/* Throbber. */
Bonobo_EventSource_ListenerId throbber_location_change_request_listener_id;
Bonobo_Control throbber;
Bonobo_Listener throbber_listener;
/* Deferred location change. */
char *location_to_change_to_at_idle;
......
......@@ -398,7 +398,7 @@ nautilus_window_initialize_toolbars (NautilusWindow *window)
CORBA_Environment ev;
char *exception_as_text;
CORBA_exception_init (&ev);
nautilus_window_ui_freeze (window);
/* FIXME bugzilla.gnome.org 41243:
* We should use inheritance instead of these special cases
......@@ -412,23 +412,20 @@ nautilus_window_initialize_toolbars (NautilusWindow *window)
* desktop window.
*/
if (!NAUTILUS_IS_DESKTOP_WINDOW (window)) {
window->throbber = bonobo_get_object ("OAFIID:nautilus_throbber", "IDL:Bonobo/Control:1.0", &ev);
CORBA_exception_init (&ev);
window->details->throbber = bonobo_get_object ("OAFIID:nautilus_throbber", "IDL:Bonobo/Control:1.0", &ev);
if (BONOBO_EX (&ev)) {
exception_as_text = bonobo_exception_get_text (&ev);
g_warning ("Throbber Activation exception '%s'",
exception_as_text);
g_warning ("Throbber activation exception '%s'", exception_as_text);
g_free (exception_as_text);
window->throbber = CORBA_OBJECT_NIL;
window->details->throbber = CORBA_OBJECT_NIL;
} else if (window->details->throbber != CORBA_OBJECT_NIL) {
bonobo_ui_component_object_set (window->details->shell_ui, "/Toolbar/ThrobberWrapper",
window->details->throbber, NULL);
}
CORBA_exception_free (&ev);
}
nautilus_window_ui_freeze (window);
bonobo_ui_component_object_set (window->details->shell_ui,
"/Toolbar/ThrobberWrapper",
window->throbber,
&ev);
CORBA_exception_free (&ev);
window->details->back_button_item = create_back_or_forward_toolbar_item
(window, _("Back"), "/Toolbar/BackWrapper");
......
......@@ -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