Commit e7c91ff2 authored by Michael Meeks's avatar Michael Meeks Committed by Michael Meeks
Browse files

re-remove the per display IID creation scheme - it's broken.

2002-01-23  Michael Meeks  <michael@ximian.com>

	* libnautilus/nautilus-view-standard-main.c
	(nautilus_view_standard_main_multi): re-remove the
	per display IID creation scheme - it's broken.

	* components/throbber/nautilus-throbber.c
	(nautilus_throbber_draw): kill, no draw methods
	in gtk 2.0
	(draw_throbber_image): remove bonobo bug
	workaround, if it still exists it should be fixed
	in bonobo and fold into
	(nautilus_throbber_expose): here
	(draw_pixbuf): fold into
	(nautilus_throbber_expose): here, and fix
	rendering bugs.
	(nautilus_throbber_size_allocate): kill bogus
	sizing logic.
	(nautilus_throbber_button_release_event): do
	conversion.
	(nautilus_throbber_destroy): remove
	force_destroy_later.

2002-01-21  Michael Meeks  <michael@ximian.com>

	* src/nautilus-window.c,
	* src/nautilus-application.c,
	* src/nautilus-view-frame.c,
	* libnautilus-private/nautilus-undo-manager.c,
	* libnautilus-private/nautilus-metafile-factory.c,
	* libnautilus/nautilus-undo-transaction.c,
	s/bonobo_object_corba_objref/BONOBO_OBJREF/

	* libnautilus-private/nautilus-directory-metafile.c
	(get_factory): update referencing.

	* libnautilus/nautilus-view.c
	(nautilus_view_get_view_frame): impl. helper to
	reduce sync CORBA traffic.
	(view_frame_call_end, view_frame_call_begin): upd.
	(nautilus_view_dispose): release the CORBA ref. if we
	took it.
	(nautilus_view_set_frame): unset the frame if we
	loose it.

	* libnautilus-private/nautilus-bonobo-extensions.c
	(add_numbered_menu_item_internal): kill the label encoding.
	(nautilus_bonobo_add_submenu): ditto.
	(nautilus_bonobo_set_icon): kill unused.

	* components/adaptor/bonobo-stream-vfs.[ch]: remove, now
	inside gnome-vfs.
parent 64477f61
2002-01-23 Michael Meeks <michael@ximian.com>
* libnautilus/nautilus-view-standard-main.c
(nautilus_view_standard_main_multi): re-remove the
per display IID creation scheme - it's broken.
* components/throbber/nautilus-throbber.c
(nautilus_throbber_draw): kill, no draw methods
in gtk 2.0
(draw_throbber_image): remove bonobo bug
workaround, if it still exists it should be fixed
in bonobo and fold into
(nautilus_throbber_expose): here
(draw_pixbuf): fold into
(nautilus_throbber_expose): here, and fix
rendering bugs.
(nautilus_throbber_size_allocate): kill bogus
sizing logic.
(nautilus_throbber_button_release_event): do
conversion.
(nautilus_throbber_destroy): remove
force_destroy_later.
2002-01-21 Michael Meeks <michael@ximian.com>
* src/nautilus-window.c,
* src/nautilus-application.c,
* src/nautilus-view-frame.c,
* libnautilus-private/nautilus-undo-manager.c,
* libnautilus-private/nautilus-metafile-factory.c,
* libnautilus/nautilus-undo-transaction.c,
s/bonobo_object_corba_objref/BONOBO_OBJREF/
* libnautilus-private/nautilus-directory-metafile.c
(get_factory): update referencing.
* libnautilus/nautilus-view.c
(nautilus_view_get_view_frame): impl. helper to
reduce sync CORBA traffic.
(view_frame_call_end, view_frame_call_begin): upd.
(nautilus_view_dispose): release the CORBA ref. if we
took it.
(nautilus_view_set_frame): unset the frame if we
loose it.
* libnautilus-private/nautilus-bonobo-extensions.c
(add_numbered_menu_item_internal): kill the label encoding.
(nautilus_bonobo_add_submenu): ditto.
(nautilus_bonobo_set_icon): kill unused.
* components/adaptor/bonobo-stream-vfs.[ch]: remove, now
inside gnome-vfs.
2002-01-23 jacob berkman <jacob@ximian.com> 2002-01-23 jacob berkman <jacob@ximian.com>
* icons/default/Makefile.am (SUBDIRS): remove since automake * icons/default/Makefile.am (SUBDIRS): remove since automake
......
...@@ -161,9 +161,7 @@ static void ...@@ -161,9 +161,7 @@ static void
nautilus_throbber_destroy (GtkObject *object) nautilus_throbber_destroy (GtkObject *object)
{ {
NautilusThrobber *throbber = NAUTILUS_THROBBER (object); NautilusThrobber *throbber = NAUTILUS_THROBBER (object);
#ifdef GNOME2_CONVERSION_COMPLETE
nautilus_bonobo_object_force_destroy_later (throbber->details->control);
#endif
nautilus_throbber_remove_update_callback (throbber); nautilus_throbber_remove_update_callback (throbber);
nautilus_throbber_unload_images (throbber); nautilus_throbber_unload_images (throbber);
...@@ -304,18 +302,6 @@ nautilus_throbber_theme_changed (gpointer user_data) ...@@ -304,18 +302,6 @@ nautilus_throbber_theme_changed (gpointer user_data)
gtk_widget_queue_resize ( GTK_WIDGET (throbber)); gtk_widget_queue_resize ( GTK_WIDGET (throbber));
} }
/* utility to simplify drawing */
static void
draw_pixbuf (GdkPixbuf *pixbuf, GdkDrawable *drawable, int x, int y)
{
gdk_pixbuf_render_to_drawable_alpha (pixbuf, drawable, 0, 0, x, y,
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
GDK_PIXBUF_ALPHA_BILEVEL, 128, GDK_RGB_DITHER_MAX,
0, 0);
}
/* here's the routine that selects the image to draw, based on the throbber's state */ /* here's the routine that selects the image to draw, based on the throbber's state */
static GdkPixbuf * static GdkPixbuf *
...@@ -336,38 +322,29 @@ select_throbber_image (NautilusThrobber *throbber) ...@@ -336,38 +322,29 @@ select_throbber_image (NautilusThrobber *throbber)
return g_object_ref (element->data); return g_object_ref (element->data);
} }
/* draw the throbber into the passed-in rectangle */ /* handle expose events */
static void static int
draw_throbber_image (GtkWidget *widget, GdkRectangle *box) nautilus_throbber_expose (GtkWidget *widget, GdkEventExpose *event)
{ {
NautilusThrobber *throbber; NautilusThrobber *throbber;
GdkPixbuf *pixbuf, *massaged_pixbuf; GdkPixbuf *pixbuf, *massaged_pixbuf;
int window_width, window_height; int x_offset, y_offset, width, height;
int x_offset, y_offset; GdkRectangle pix_area, dest;
g_return_val_if_fail (NAUTILUS_IS_THROBBER (widget), FALSE);
throbber = NAUTILUS_THROBBER (widget); throbber = NAUTILUS_THROBBER (widget);
if (!throbber->details->ready) { if (!throbber->details->ready) {
return; return FALSE;
}
/* clear the entire gdk window to avoid messing up gradient themes due to bonobo bug */
/* only do this once per cycle to minimize flashing */
gdk_window_get_size (widget->window, &window_width, &window_height);
if (throbber->details->current_frame == 0) {
gdk_window_clear_area (widget->window,
0,
0,
window_width,
window_height);
} }
pixbuf = select_throbber_image (throbber); pixbuf = select_throbber_image (throbber);
if (pixbuf == NULL) { if (pixbuf == NULL) {
return; return FALSE;
} }
/* Get the right tint on the image */
if (throbber->details->button_in) { if (throbber->details->button_in) {
if (throbber->details->button_down) { if (throbber->details->button_down) {
massaged_pixbuf = eel_create_darkened_pixbuf (pixbuf, 0.8 * 255, 0.8 * 255); massaged_pixbuf = eel_create_darkened_pixbuf (pixbuf, 0.8 * 255, 0.8 * 255);
...@@ -377,42 +354,35 @@ draw_throbber_image (GtkWidget *widget, GdkRectangle *box) ...@@ -377,42 +354,35 @@ draw_throbber_image (GtkWidget *widget, GdkRectangle *box)
g_object_unref (pixbuf); g_object_unref (pixbuf);
pixbuf = massaged_pixbuf; pixbuf = massaged_pixbuf;
} }
/* center the throbber image in the gdk window */
x_offset = (window_width - gdk_pixbuf_get_width (pixbuf)) / 2;
y_offset = (window_height - gdk_pixbuf_get_height (pixbuf)) / 2;
draw_pixbuf (pixbuf, widget->window, box->x + x_offset, box->y + y_offset);
g_object_unref (pixbuf);
}
#ifdef GNOME2_CONVERSION_COMPLETE width = gdk_pixbuf_get_width (pixbuf);
static void height = gdk_pixbuf_get_height (pixbuf);
nautilus_throbber_draw (GtkWidget *widget, GdkRectangle *box)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (NAUTILUS_IS_THROBBER (widget));
draw_throbber_image (widget, box);
}
#endif
/* handle expose events */ /* Compute the offsets for the image centered on our allocation */
x_offset = widget->allocation.x + (widget->allocation.width - width) / 2;
y_offset = widget->allocation.y + (widget->allocation.height - height) / 2;
static int pix_area.x = x_offset;
nautilus_throbber_expose (GtkWidget *widget, GdkEventExpose *event) pix_area.y = y_offset;
{ pix_area.width = width;
GdkRectangle box; pix_area.height = height;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (NAUTILUS_IS_THROBBER (widget), FALSE);
box.x = 0; box.y = 0;
box.width = widget->allocation.width;
box.height = widget->allocation.height;
draw_throbber_image (widget, &box); if (!gdk_rectangle_intersect (&event->area, &pix_area, &dest)) {
g_object_unref (pixbuf);
return FALSE;
}
gdk_pixbuf_render_to_drawable_alpha (
pixbuf, widget->window,
dest.x - x_offset, dest.y - y_offset,
dest.x, dest.y,
dest.width, dest.height,
GDK_PIXBUF_ALPHA_BILEVEL, 128,
GDK_RGB_DITHER_MAX,
0, 0);
g_object_unref (pixbuf);
return FALSE; return FALSE;
} }
...@@ -660,11 +630,11 @@ nautilus_throbber_button_release_event (GtkWidget *widget, GdkEventButton *event ...@@ -660,11 +630,11 @@ nautilus_throbber_button_release_event (GtkWidget *widget, GdkEventButton *event
location = nautilus_theme_get_theme_data ("throbber", "url"); location = nautilus_theme_get_theme_data ("throbber", "url");
if (location != NULL) { if (location != NULL) {
location_arg = bonobo_arg_new (BONOBO_ARG_STRING); location_arg = bonobo_arg_new (BONOBO_ARG_STRING);
BONOBO_ARG_SET_STRING (location_arg, location); BONOBO_ARG_SET_STRING (location_arg, location);
#ifdef GNOME2_CONVERSION_COMPLETE bonobo_event_source_notify_listeners_full (
bonobo_property_bag_notify_listeners throbber->details->property_bag->es,
(throbber->details->property_bag, "location", location_arg, NULL); "Bonobo/Property", "change", "location",
#endif location_arg, NULL);
bonobo_arg_release (location_arg); bonobo_arg_release (location_arg);
g_free (location); g_free (location);
} }
...@@ -694,22 +664,7 @@ nautilus_throbber_set_small_mode (NautilusThrobber *throbber, gboolean new_mode) ...@@ -694,22 +664,7 @@ nautilus_throbber_set_small_mode (NautilusThrobber *throbber, gboolean new_mode)
} }
/* handle setting the size */ /* handle setting the size */
static void
nautilus_throbber_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
int throbber_width, throbber_height;
NautilusThrobber *throbber = NAUTILUS_THROBBER (widget);
GNOME_CALL_PARENT (GTK_WIDGET_CLASS, size_allocate, (widget, allocation));
get_throbber_dimensions (throbber, &throbber_width, &throbber_height);
/* allocate some extra margin so we don't butt up against toolbar edges */
widget->allocation.width = throbber_width + 8;
widget->allocation.height = throbber_height;
}
/* handle setting the size */
static void static void
nautilus_throbber_size_request (GtkWidget *widget, GtkRequisition *requisition) nautilus_throbber_size_request (GtkWidget *widget, GtkRequisition *requisition)
{ {
...@@ -720,7 +675,7 @@ nautilus_throbber_size_request (GtkWidget *widget, GtkRequisition *requisition) ...@@ -720,7 +675,7 @@ nautilus_throbber_size_request (GtkWidget *widget, GtkRequisition *requisition)
/* allocate some extra margin so we don't butt up against toolbar edges */ /* allocate some extra margin so we don't butt up against toolbar edges */
requisition->width = throbber_width + 8; requisition->width = throbber_width + 8;
requisition->height = throbber_height; requisition->height = throbber_height;
} }
static void static void
...@@ -736,7 +691,6 @@ nautilus_throbber_class_init (NautilusThrobberClass *throbber_class) ...@@ -736,7 +691,6 @@ nautilus_throbber_class_init (NautilusThrobberClass *throbber_class)
widget_class->button_release_event = nautilus_throbber_button_release_event; widget_class->button_release_event = nautilus_throbber_button_release_event;
widget_class->enter_notify_event = nautilus_throbber_enter_notify_event; widget_class->enter_notify_event = nautilus_throbber_enter_notify_event;
widget_class->leave_notify_event = nautilus_throbber_leave_notify_event; widget_class->leave_notify_event = nautilus_throbber_leave_notify_event;
widget_class->size_allocate = nautilus_throbber_size_allocate;
widget_class->size_request = nautilus_throbber_size_request; widget_class->size_request = nautilus_throbber_size_request;
widget_class->map = nautilus_throbber_map; widget_class->map = nautilus_throbber_map;
} }
...@@ -251,7 +251,7 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui, ...@@ -251,7 +251,7 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui,
const char *radio_group_name) const char *radio_group_name)
{ {
char *xml_item, *xml_command; char *xml_item, *xml_command;
char *encoded_label, *command_name; char *command_name;
char *item_name, *pixbuf_data; char *item_name, *pixbuf_data;
g_assert (BONOBO_IS_UI_COMPONENT (ui)); g_assert (BONOBO_IS_UI_COMPONENT (ui));
...@@ -261,35 +261,29 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui, ...@@ -261,35 +261,29 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui,
g_assert (type == NUMBERED_MENU_ITEM_RADIO || radio_group_name == NULL); g_assert (type == NUMBERED_MENU_ITEM_RADIO || radio_group_name == NULL);
g_assert (type != NUMBERED_MENU_ITEM_RADIO || radio_group_name != NULL); g_assert (type != NUMBERED_MENU_ITEM_RADIO || radio_group_name != NULL);
/* Because we are constructing the XML ourselves, we need to
* encode the label.
*/
encoded_label = bonobo_ui_util_encode_str (label);
item_name = get_numbered_menu_item_name item_name = get_numbered_menu_item_name
(ui, container_path, index); (ui, container_path, index);
command_name = nautilus_bonobo_get_numbered_menu_item_command command_name = nautilus_bonobo_get_numbered_menu_item_command
(ui, container_path, index); (ui, container_path, index);
switch (type) { switch (type) {
case NUMBERED_MENU_ITEM_TOGGLE: case NUMBERED_MENU_ITEM_TOGGLE:
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" id=\"%s\" type=\"toggle\"/>\n", xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" id=\"%s\" type=\"toggle\"/>\n",
item_name, encoded_label, command_name); item_name, label, command_name);
break; break;
case NUMBERED_MENU_ITEM_RADIO: case NUMBERED_MENU_ITEM_RADIO:
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" id=\"%s\" type=\"radio\" group=\"%s\"/>\n", xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" id=\"%s\" type=\"radio\" group=\"%s\"/>\n",
item_name, encoded_label, command_name, radio_group_name); item_name, label, command_name, radio_group_name);
break; break;
case NUMBERED_MENU_ITEM_PLAIN: case NUMBERED_MENU_ITEM_PLAIN:
if (pixbuf != NULL) { if (pixbuf != NULL) {
pixbuf_data = bonobo_ui_util_pixbuf_to_xml (pixbuf); pixbuf_data = bonobo_ui_util_pixbuf_to_xml (pixbuf);
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" verb=\"%s\" pixtype=\"pixbuf\" pixname=\"%s\"/>\n", xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" verb=\"%s\" pixtype=\"pixbuf\" pixname=\"%s\"/>\n",
item_name, encoded_label, command_name, pixbuf_data); item_name, label, command_name, pixbuf_data);
g_free (pixbuf_data); g_free (pixbuf_data);
} else { } else {
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" verb=\"%s\"/>\n", xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" verb=\"%s\"/>\n",
item_name, encoded_label, command_name); item_name, label, command_name);
} }
break; break;
default: default:
...@@ -297,7 +291,6 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui, ...@@ -297,7 +291,6 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui,
xml_item = NULL; /* keep compiler happy */ xml_item = NULL; /* keep compiler happy */
} }
g_free (encoded_label);
g_free (item_name); g_free (item_name);
bonobo_ui_component_set (ui, container_path, xml_item, NULL); bonobo_ui_component_set (ui, container_path, xml_item, NULL);
...@@ -330,7 +323,8 @@ nautilus_bonobo_add_numbered_menu_item (BonoboUIComponent *ui, ...@@ -330,7 +323,8 @@ nautilus_bonobo_add_numbered_menu_item (BonoboUIComponent *ui,
g_return_if_fail (container_path != NULL); g_return_if_fail (container_path != NULL);
g_return_if_fail (label != NULL); g_return_if_fail (label != NULL);
add_numbered_menu_item_internal (ui, container_path, index, label, NUMBERED_MENU_ITEM_PLAIN, pixbuf, NULL); add_numbered_menu_item_internal (ui, container_path, index, label,
NUMBERED_MENU_ITEM_PLAIN, pixbuf, NULL);
} }
/* Add a menu item specified by number into a given path. Used for /* Add a menu item specified by number into a given path. Used for
...@@ -348,7 +342,8 @@ nautilus_bonobo_add_numbered_toggle_menu_item (BonoboUIComponent *ui, ...@@ -348,7 +342,8 @@ nautilus_bonobo_add_numbered_toggle_menu_item (BonoboUIComponent *ui,
g_return_if_fail (container_path != NULL); g_return_if_fail (container_path != NULL);
g_return_if_fail (label != NULL); g_return_if_fail (label != NULL);
add_numbered_menu_item_internal (ui, container_path, index, label, NUMBERED_MENU_ITEM_TOGGLE, NULL, NULL); add_numbered_menu_item_internal (ui, container_path, index, label,
NUMBERED_MENU_ITEM_TOGGLE, NULL, NULL);
} }
/* Add a menu item specified by number into a given path. Used for /* Add a menu item specified by number into a given path. Used for
...@@ -367,7 +362,8 @@ nautilus_bonobo_add_numbered_radio_menu_item (BonoboUIComponent *ui, ...@@ -367,7 +362,8 @@ nautilus_bonobo_add_numbered_radio_menu_item (BonoboUIComponent *ui,
g_return_if_fail (container_path != NULL); g_return_if_fail (container_path != NULL);
g_return_if_fail (label != NULL); g_return_if_fail (label != NULL);
add_numbered_menu_item_internal (ui, container_path, index, label, NUMBERED_MENU_ITEM_RADIO, NULL, radio_group_name); add_numbered_menu_item_internal (ui, container_path, index, label,
NUMBERED_MENU_ITEM_RADIO, NULL, radio_group_name);
} }
void void
...@@ -375,12 +371,7 @@ nautilus_bonobo_add_submenu (BonoboUIComponent *ui, ...@@ -375,12 +371,7 @@ nautilus_bonobo_add_submenu (BonoboUIComponent *ui,
const char *path, const char *path,
const char *label) const char *label)
{ {
char *xml_string, *encoded_label, *name; char *xml_string, *name;
/* Because we are constructing the XML ourselves, we need to
* encode the label.
*/
encoded_label = bonobo_ui_util_encode_str (label);
/* Labels may contain characters that are illegal in names. So /* Labels may contain characters that are illegal in names. So
* we create the name by URI-encoding the label. * we create the name by URI-encoding the label.
...@@ -388,10 +379,9 @@ nautilus_bonobo_add_submenu (BonoboUIComponent *ui, ...@@ -388,10 +379,9 @@ nautilus_bonobo_add_submenu (BonoboUIComponent *ui,
name = gnome_vfs_escape_string (label); name = gnome_vfs_escape_string (label);
xml_string = g_strdup_printf ("<submenu name=\"%s\" label=\"%s\"/>\n", xml_string = g_strdup_printf ("<submenu name=\"%s\" label=\"%s\"/>\n",
name, encoded_label); name, label);
bonobo_ui_component_set (ui, path, xml_string, NULL); bonobo_ui_component_set (ui, path, xml_string, NULL);
g_free (encoded_label);
g_free (name); g_free (name);
g_free (xml_string); g_free (xml_string);
} }
...@@ -494,27 +484,6 @@ nautilus_bonobo_set_label_for_menu_item_and_command (BonoboUIComponent *ui, ...@@ -494,27 +484,6 @@ nautilus_bonobo_set_label_for_menu_item_and_command (BonoboUIComponent *ui,
g_free (label_no_underscore); g_free (label_no_underscore);
} }
void
nautilus_bonobo_set_icon (BonoboUIComponent *ui,
const char *path,
const char *icon_relative_path)
{
g_return_if_fail (BONOBO_IS_UI_COMPONENT (ui));
g_return_if_fail (path != NULL);
g_return_if_fail (icon_relative_path != NULL);
/* We don't do a get_prop here before setting since it just
* means more round-trip CORBA calls.
*/
bonobo_ui_component_set_prop (ui, path,
"pixname",
icon_relative_path, NULL);
bonobo_ui_component_set_prop (ui, path,
"pixtype",
"filename", NULL);
}
static void static void
activation_handle_done (NautilusBonoboActivationHandle *handle) activation_handle_done (NautilusBonoboActivationHandle *handle)
{ {
......
...@@ -97,20 +97,22 @@ get_factory (void) ...@@ -97,20 +97,22 @@ get_factory (void)
CORBA_Environment ev; CORBA_Environment ev;
if (factory == CORBA_OBJECT_NIL) { if (factory == CORBA_OBJECT_NIL) {
CORBA_exception_init (&ev);
if (get_factory_from_oaf) { if (get_factory_from_oaf) {
CORBA_exception_init (&ev);
factory = bonobo_activation_activate_from_id (METAFILE_FACTORY_IID, 0, NULL, &ev); factory = bonobo_activation_activate_from_id (METAFILE_FACTORY_IID, 0, NULL, &ev);
if (ev._major != CORBA_NO_EXCEPTION || factory == CORBA_OBJECT_NIL) { if (ev._major != CORBA_NO_EXCEPTION || factory == CORBA_OBJECT_NIL) {
die_on_failed_activation ("Nautilus_MetafileFactory", &ev); die_on_failed_activation ("Nautilus_MetafileFactory", &ev);
} }
CORBA_exception_free (&ev);
} else { } else {
instance = nautilus_metafile_factory_get_instance (); instance = nautilus_metafile_factory_get_instance ();
factory = bonobo_object_dup_ref (bonobo_object_corba_objref (BONOBO_OBJECT (instance)), NULL); factory = CORBA_Object_duplicate (BONOBO_OBJREF (instance), &ev);
bonobo_object_unref (BONOBO_OBJECT (instance));
} }
CORBA_exception_free (&ev);
eel_debug_call_at_shutdown (free_factory); eel_debug_call_at_shutdown (free_factory);
} }
......
...@@ -57,7 +57,10 @@ static NautilusMetafileFactory * ...@@ -57,7 +57,10 @@ static NautilusMetafileFactory *
nautilus_metafile_factory_new (void) nautilus_metafile_factory_new (void)
{ {
NautilusMetafileFactory *metafile_factory; NautilusMetafileFactory *metafile_factory;
metafile_factory = NAUTILUS_METAFILE_FACTORY (g_object_new (NAUTILUS_TYPE_METAFILE_FACTORY, NULL));
metafile_factory = NAUTILUS_METAFILE_FACTORY (
g_object_new (NAUTILUS_TYPE_METAFILE_FACTORY, NULL));
return metafile_factory; return metafile_factory;
} }
...@@ -77,10 +80,8 @@ nautilus_metafile_factory_get_instance (void) ...@@ -77,10 +80,8 @@ nautilus_metafile_factory_get_instance (void)
the_factory = nautilus_metafile_factory_new (); the_factory = nautilus_metafile_factory_new ();
eel_debug_call_at_shutdown (free_factory_instance); eel_debug_call_at_shutdown (free_factory_instance);
} }
bonobo_object_ref (BONOBO_OBJECT (the_factory)); return bonobo_object_ref (BONOBO_OBJECT (the_factory));
return the_factory;
} }
static Nautilus_Metafile static Nautilus_Metafile
...@@ -88,10 +89,11 @@ corba_open (PortableServer_Servant servant, ...@@ -88,10 +89,11 @@ corba_open (PortableServer_Servant servant,
const CORBA_char *directory, const CORBA_char *directory,
CORBA_Environment *ev) CORBA_Environment *ev)
{ {
BonoboObject *object; NautilusMetafile *metafile;
metafile = nautilus_metafile_get (directory);
object = BONOBO_OBJECT (nautilus_metafile_get (directory)); return CORBA_Object_duplicate (BONOBO_OBJREF (metafile), ev);
return CORBA_Object_duplicate (bonobo_object_corba_objref (object), ev);
} }
static void static void
......
...@@ -217,9 +217,8 @@ nautilus_undo_manager_attach (NautilusUndoManager *manager, GObject *target) ...@@ -217,9 +217,8 @@ nautilus_undo_manager_attach (NautilusUndoManager *manager, GObject *target)
g_return_if_fail (NAUTILUS_IS_UNDO_MANAGER (manager)); g_return_if_fail (NAUTILUS_IS_UNDO_MANAGER (manager));
g_return_if_fail (G_IS_OBJECT (target)); g_return_if_fail (G_IS_OBJECT (target));