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

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>
* icons/default/Makefile.am (SUBDIRS): remove since automake
......
......@@ -161,9 +161,7 @@ static void
nautilus_throbber_destroy (GtkObject *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_unload_images (throbber);
......@@ -304,18 +302,6 @@ nautilus_throbber_theme_changed (gpointer user_data)
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 */
static GdkPixbuf *
......@@ -336,38 +322,29 @@ select_throbber_image (NautilusThrobber *throbber)
return g_object_ref (element->data);
}
/* draw the throbber into the passed-in rectangle */
/* handle expose events */
static void
draw_throbber_image (GtkWidget *widget, GdkRectangle *box)
static int
nautilus_throbber_expose (GtkWidget *widget, GdkEventExpose *event)
{
NautilusThrobber *throbber;
GdkPixbuf *pixbuf, *massaged_pixbuf;
int window_width, window_height;
int x_offset, y_offset;
int x_offset, y_offset, width, height;
GdkRectangle pix_area, dest;
g_return_val_if_fail (NAUTILUS_IS_THROBBER (widget), FALSE);
throbber = NAUTILUS_THROBBER (widget);
if (!throbber->details->ready) {
return;
}
/* 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);
return FALSE;
}
pixbuf = select_throbber_image (throbber);
if (pixbuf == NULL) {
return;
return FALSE;
}
/* Get the right tint on the image */
if (throbber->details->button_in) {
if (throbber->details->button_down) {
massaged_pixbuf = eel_create_darkened_pixbuf (pixbuf, 0.8 * 255, 0.8 * 255);
......@@ -377,42 +354,35 @@ draw_throbber_image (GtkWidget *widget, GdkRectangle *box)
g_object_unref (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
static void
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
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
/* 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
nautilus_throbber_expose (GtkWidget *widget, GdkEventExpose *event)
{
GdkRectangle box;
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;
pix_area.x = x_offset;
pix_area.y = y_offset;
pix_area.width = width;
pix_area.height = 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;
}
......@@ -660,11 +630,11 @@ nautilus_throbber_button_release_event (GtkWidget *widget, GdkEventButton *event
location = nautilus_theme_get_theme_data ("throbber", "url");
if (location != NULL) {
location_arg = bonobo_arg_new (BONOBO_ARG_STRING);
BONOBO_ARG_SET_STRING (location_arg, location);
#ifdef GNOME2_CONVERSION_COMPLETE
bonobo_property_bag_notify_listeners
(throbber->details->property_bag, "location", location_arg, NULL);
#endif
BONOBO_ARG_SET_STRING (location_arg, location);
bonobo_event_source_notify_listeners_full (
throbber->details->property_bag->es,
"Bonobo/Property", "change", "location",
location_arg, NULL);
bonobo_arg_release (location_arg);
g_free (location);
}
......@@ -694,22 +664,7 @@ nautilus_throbber_set_small_mode (NautilusThrobber *throbber, gboolean new_mode)
}
/* 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
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 */
requisition->width = throbber_width + 8;
requisition->height = throbber_height;
requisition->height = throbber_height;
}
static void
......@@ -736,7 +691,6 @@ nautilus_throbber_class_init (NautilusThrobberClass *throbber_class)
widget_class->button_release_event = nautilus_throbber_button_release_event;
widget_class->enter_notify_event = nautilus_throbber_enter_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->map = nautilus_throbber_map;
}
......@@ -251,7 +251,7 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui,
const char *radio_group_name)
{
char *xml_item, *xml_command;
char *encoded_label, *command_name;
char *command_name;
char *item_name, *pixbuf_data;
g_assert (BONOBO_IS_UI_COMPONENT (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);
/* 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
(ui, container_path, index);
command_name = nautilus_bonobo_get_numbered_menu_item_command
(ui, container_path, index);
switch (type) {
case NUMBERED_MENU_ITEM_TOGGLE:
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;
case NUMBERED_MENU_ITEM_RADIO:
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;
case NUMBERED_MENU_ITEM_PLAIN:
if (pixbuf != NULL) {
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",
item_name, encoded_label, command_name, pixbuf_data);
item_name, label, command_name, pixbuf_data);
g_free (pixbuf_data);
} else {
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;
default:
......@@ -297,7 +291,6 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui,
xml_item = NULL; /* keep compiler happy */
}
g_free (encoded_label);
g_free (item_name);
bonobo_ui_component_set (ui, container_path, xml_item, NULL);
......@@ -330,7 +323,8 @@ nautilus_bonobo_add_numbered_menu_item (BonoboUIComponent *ui,
g_return_if_fail (container_path != 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
......@@ -348,7 +342,8 @@ nautilus_bonobo_add_numbered_toggle_menu_item (BonoboUIComponent *ui,
g_return_if_fail (container_path != 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
......@@ -367,7 +362,8 @@ nautilus_bonobo_add_numbered_radio_menu_item (BonoboUIComponent *ui,
g_return_if_fail (container_path != 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
......@@ -375,12 +371,7 @@ nautilus_bonobo_add_submenu (BonoboUIComponent *ui,
const char *path,
const char *label)
{
char *xml_string, *encoded_label, *name;
/* Because we are constructing the XML ourselves, we need to
* encode the label.
*/
encoded_label = bonobo_ui_util_encode_str (label);
char *xml_string, *name;
/* Labels may contain characters that are illegal in names. So
* we create the name by URI-encoding the label.
......@@ -388,10 +379,9 @@ nautilus_bonobo_add_submenu (BonoboUIComponent *ui,
name = gnome_vfs_escape_string (label);
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);
g_free (encoded_label);
g_free (name);
g_free (xml_string);
}
......@@ -494,27 +484,6 @@ nautilus_bonobo_set_label_for_menu_item_and_command (BonoboUIComponent *ui,
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
activation_handle_done (NautilusBonoboActivationHandle *handle)
{
......
......@@ -97,20 +97,22 @@ get_factory (void)
CORBA_Environment ev;
if (factory == CORBA_OBJECT_NIL) {
CORBA_exception_init (&ev);
if (get_factory_from_oaf) {
CORBA_exception_init (&ev);
factory = bonobo_activation_activate_from_id (METAFILE_FACTORY_IID, 0, NULL, &ev);
if (ev._major != CORBA_NO_EXCEPTION || factory == CORBA_OBJECT_NIL) {
die_on_failed_activation ("Nautilus_MetafileFactory", &ev);
}
CORBA_exception_free (&ev);
} else {
instance = nautilus_metafile_factory_get_instance ();
factory = bonobo_object_dup_ref (bonobo_object_corba_objref (BONOBO_OBJECT (instance)), NULL);
bonobo_object_unref (BONOBO_OBJECT (instance));
factory = CORBA_Object_duplicate (BONOBO_OBJREF (instance), &ev);
}
CORBA_exception_free (&ev);
eel_debug_call_at_shutdown (free_factory);
}
......
......@@ -57,7 +57,10 @@ static NautilusMetafileFactory *
nautilus_metafile_factory_new (void)
{
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;
}
......@@ -77,10 +80,8 @@ nautilus_metafile_factory_get_instance (void)
the_factory = nautilus_metafile_factory_new ();
eel_debug_call_at_shutdown (free_factory_instance);
}
bonobo_object_ref (BONOBO_OBJECT (the_factory));
return the_factory;
return bonobo_object_ref (BONOBO_OBJECT (the_factory));
}
static Nautilus_Metafile
......@@ -88,10 +89,11 @@ corba_open (PortableServer_Servant servant,
const CORBA_char *directory,
CORBA_Environment *ev)
{
BonoboObject *object;
NautilusMetafile *metafile;
metafile = nautilus_metafile_get (directory);
object = BONOBO_OBJECT (nautilus_metafile_get (directory));
return CORBA_Object_duplicate (bonobo_object_corba_objref (object), ev);
return CORBA_Object_duplicate (BONOBO_OBJREF (metafile), ev);
}
static void
......
......@@ -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 (G_IS_OBJECT (target));
nautilus_undo_attach_undo_manager
(G_OBJECT (target),
bonobo_object_corba_objref (BONOBO_OBJECT (manager)));
nautilus_undo_attach_undo_manager (
G_OBJECT (target), BONOBO_OBJREF (manager));
}
void
......@@ -230,7 +229,7 @@ nautilus_undo_manager_add_interface (NautilusUndoManager *manager, BonoboObject
g_return_if_fail (NAUTILUS_IS_UNDO_MANAGER (manager));
g_return_if_fail (BONOBO_IS_OBJECT (object));
context = nautilus_undo_context_new (bonobo_object_corba_objref (BONOBO_OBJECT (manager)));
context = nautilus_undo_context_new (BONOBO_OBJREF (manager));
bonobo_object_add_interface (object, BONOBO_OBJECT (context));
}
......
......@@ -229,10 +229,8 @@ nautilus_undo_transaction_add_to_undo_manager (NautilusUndoTransaction *transact
CORBA_exception_init (&ev);
if (!CORBA_Object_is_nil (manager, &ev)) {
Nautilus_Undo_Manager_append
(manager,
bonobo_object_corba_objref (BONOBO_OBJECT (transaction)),
&ev);
Nautilus_Undo_Manager_append (
manager, BONOBO_OBJREF (transaction), &ev);
transaction->owner = CORBA_Object_duplicate (manager, &ev);
}
......@@ -268,10 +266,8 @@ remove_atoms (NautilusUndoTransaction *transaction,
* This may end up freeing the transaction.
*/
if (transaction->atom_list == NULL) {
Nautilus_Undo_Manager_forget
(transaction->owner,
bonobo_object_corba_objref (BONOBO_OBJECT (transaction)),
&ev);
Nautilus_Undo_Manager_forget (
transaction->owner, BONOBO_OBJREF (transaction), &ev);
}
CORBA_exception_free (&ev);
......
......@@ -214,7 +214,11 @@ nautilus_view_standard_main_multi (const char *executable_name,
callback_data.delayed_quit_timeout_id = 0;
/* Create the factory. */
#ifdef GNOME2_CONVERSION_COMPLETE
registration_id = bonobo_activation_make_registration_id (factory_iid, DisplayString (gdk_display));
#else
registration_id = g_strdup (factory_iid);
#endif
factory = bonobo_generic_factory_new (registration_id,
make_object,
&callback_data);
......
......@@ -59,6 +59,7 @@ static guint signals[LAST_SIGNAL];
struct NautilusViewDetails {
BonoboControl *control;
Nautilus_ViewFrame view_frame;
NautilusViewListenerMask listen_mask;
BonoboListener *listener;
......@@ -300,13 +301,6 @@ append_mask (GString *str, const char *mask_element)
g_string_append (str, mask_element);
}
/*
* FIXME: we should use this 'set_frame' method to keep
* a cached CORBA_Object_duplicated reference to the
* remote NautilusViewFrame, since this would save lots
* of remote QI / unref traffic in all the methods that
* use view_frame_call_begin.
*/
static void
nautilus_view_set_frame (NautilusView *view,
Bonobo_ControlFrame frame)
......@@ -317,12 +311,18 @@ nautilus_view_set_frame (NautilusView *view,
Bonobo_PropertyBag pbag;
GString *mask;
CORBA_exception_init (&ev);
if (frame == CORBA_OBJECT_NIL &&
view->details->view_frame != CORBA_OBJECT_NIL) {
CORBA_Object_release (view->details->view_frame, &ev);
view->details->view_frame = CORBA_OBJECT_NIL;
}
if (view->details->listen_mask == 0) { /* Defer until we need to */
return;
}
CORBA_exception_init (&ev);
if ((listener = view->details->listener) != NULL) {
view->details->listener = NULL;
......@@ -475,39 +475,59 @@ nautilus_view_dispose (GObject *object)
view = NAUTILUS_VIEW (object);
if (view->details->view_frame == CORBA_OBJECT_NIL) {
CORBA_Object_release (view->details->view_frame, NULL);
view->details->view_frame = CORBA_OBJECT_NIL;
}
nautilus_view_set_frame (view, CORBA_OBJECT_NIL);
GNOME_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
}
static Nautilus_ViewFrame
view_frame_call_begin (NautilusView *view, CORBA_Environment *ev)
nautilus_view_get_view_frame (NautilusView *view, CORBA_Environment *ev)
{
Nautilus_ViewFrame view_frame;
Bonobo_ControlFrame control_frame;
Nautilus_ViewFrame view_frame;
g_return_val_if_fail (NAUTILUS_IS_VIEW (view), CORBA_OBJECT_NIL);
CORBA_exception_init (ev);
control_frame = bonobo_control_get_control_frame (nautilus_view_get_bonobo_control (view), ev);
if (ev->_major != CORBA_NO_EXCEPTION || control_frame == CORBA_OBJECT_NIL) {
return CORBA_OBJECT_NIL;
}
if (view->details->view_frame == CORBA_OBJECT_NIL) {
view_frame = Bonobo_Unknown_queryInterface (control_frame, "IDL:Nautilus/ViewFrame:1.0", ev);
if (ev->_major != CORBA_NO_EXCEPTION) {
return CORBA_OBJECT_NIL;
control_frame = bonobo_control_get_control_frame (
nautilus_view_get_bonobo_control (view), ev);
if (ev->_major != CORBA_NO_EXCEPTION ||
control_frame == CORBA_OBJECT_NIL) {
view_frame = CORBA_OBJECT_NIL;
} else {
view_frame = Bonobo_Unknown_queryInterface (
control_frame, "IDL:Nautilus/ViewFrame:1.0", ev);
if (ev->_major != CORBA_NO_EXCEPTION) {
view_frame = CORBA_OBJECT_NIL;
}
}
view->details->view_frame = CORBA_Object_duplicate (view_frame, ev);
bonobo_object_release_unref (view_frame, ev);
}
return view_frame;
return CORBA_Object_duplicate (view->details->view_frame, ev);
}
static Nautilus_ViewFrame
view_frame_call_begin (NautilusView *view, CORBA_Environment *ev)
{
CORBA_exception_init (ev);
return nautilus_view_get_view_frame (view, ev);
}
static void
view_frame_call_end (Nautilus_ViewFrame frame, CORBA_Environment *ev)
{
if (frame != CORBA_OBJECT_NIL) {
bonobo_object_release_unref (frame, NULL);
CORBA_Object_release (frame, NULL);
}
CORBA_exception_free (ev);
......
......@@ -127,7 +127,7 @@ create_object (PortableServer_Servant servant,
return CORBA_OBJECT_NIL;
}
return CORBA_Object_duplicate (bonobo_object_corba_objref (object), ev);
return CORBA_Object_duplicate (BONOBO_OBJREF (object), ev);
}
GList *
......@@ -445,9 +445,9 @@ nautilus_application_startup (NautilusApplication *application,
/* Start up the factory. */
while (TRUE) {
/* Try to register the file manager view factory. */
result = bonobo_activation_active_server_register
(FACTORY_IID,
bonobo_object_corba_objref (BONOBO_OBJECT (application)));
result = bonobo_activation_active_server_register (
FACTORY_IID, BONOBO_OBJREF (application));
switch (result) {
case Bonobo_ACTIVATION_REG_SUCCESS:
/* We are registered and all is right with the world. */
......
......@@ -733,7 +733,7 @@ nautilus_window_constructed (NautilusWindow *window)
location_bar_wrapper = bonobo_control_new (location_bar_box);
bonobo_ui_component_object_set (window->details->shell_ui,
"/Location Bar/Wrapper",
bonobo_object_corba_objref (BONOBO_OBJECT (location_bar_wrapper)),
BONOBO_OBJREF (location_bar_wrapper),
NULL);
bonobo_ui_component_thaw (window->details->shell_ui, NULL);
bonobo_object_unref (BONOBO_OBJECT (location_bar_wrapper));
......@@ -2198,7 +2198,7 @@ nautilus_window_get_ui_container (NautilusWindow *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW (window), CORBA_OBJECT_NIL);
return bonobo_object_corba_objref (BONOBO_OBJECT (window->details->ui_container));
return BONOBO_OBJREF (window->details->ui_container);
}
void
......
......@@ -733,7 +733,7 @@ nautilus_window_constructed (NautilusWindow *window)
location_bar_wrapper = bonobo_control_new (location_bar_box);
bonobo_ui_component_object_set (window->details->shell_ui,
"/Location Bar/Wrapper",
bonobo_object_corba_objref (BONOBO_OBJECT (location_bar_wrapper)),
BONOBO_OBJREF (location_bar_wrapper),
NULL);
bonobo_ui_component_thaw (window->details->shell_ui, NULL);
bonobo_object_unref (BONOBO_OBJECT (location_bar_wrapper));
......@@ -2198,7 +2198,7 @@ nautilus_window_get_ui_container (NautilusWindow *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW (window), CORBA_OBJECT_NIL);
return bonobo_object_corba_objref (BONOBO_OBJECT (window->details->ui_container));
return BONOBO_OBJREF (window->details->ui_container);
}
void
......
......@@ -733,7 +733,7 @@ nautilus_window_constructed (NautilusWindow *window)
location_bar_wrapper = bonobo_control_new (location_bar_box);
bonobo_ui_component_object_set (window->details->shell_ui,
"/Location Bar/Wrapper",
bonobo_object_corba_objref (BONOBO_OBJECT (location_bar_wrapper)),
BONOBO_OBJREF (location_bar_wrapper),
NULL);
bonobo_ui_component_thaw (window->details->shell_ui, NULL);
bonobo_object_unref (BONOBO_OBJECT (location_bar_wrapper));
......@@ -2198,7 +2198,7 @@ nautilus_window_get_ui_container (NautilusWindow *window)
{
g_return_val_if_fail (NAUTILUS_IS_WINDOW (window), CORBA_OBJECT_NIL);
return bonobo_object_corba_objref (BONOBO_OBJECT (window->details->ui_container));
return BONOBO_OBJREF (window->details->ui_container);
}
void
......
......@@ -592,8 +592,8 @@ create_corba_objects (NautilusViewFrame *view)
control = Bonobo_Unknown_queryInterface
(view->details->view, "IDL:Bonobo/Control:1.0", &ev);
g_assert (ev._major == CORBA_NO_EXCEPTION);
view->details->control_frame = bonobo_control_frame_new
(bonobo_object_corba_objref (BONOBO_OBJECT (view->details->ui_container)));
view->details->control_frame = bonobo_control_frame_new (
BONOBO_OBJREF (view->details->ui_container));