summaryrefslogtreecommitdiff
path: root/libnautilus
diff options
context:
space:
mode:
authorMichael Meeks <michael@ximian.com>2002-01-23 17:59:50 +0000
committerMichael Meeks <michael@src.gnome.org>2002-01-23 17:59:50 +0000
commite7c91ff2cf59c30c41c20a6b892675d8701d99bb (patch)
treebbd7e6c60c2135dbce9cce8f383678195abd1af3 /libnautilus
parent64477f6179790a286abdc39c36a430e74b10583c (diff)
downloadnautilus-e7c91ff2cf59c30c41c20a6b892675d8701d99bb.tar.gz
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.
Diffstat (limited to 'libnautilus')
-rw-r--r--libnautilus/nautilus-undo-transaction.c12
-rw-r--r--libnautilus/nautilus-view-standard-main.c4
-rw-r--r--libnautilus/nautilus-view.c64
3 files changed, 50 insertions, 30 deletions
diff --git a/libnautilus/nautilus-undo-transaction.c b/libnautilus/nautilus-undo-transaction.c
index b100612ec..e95af4a95 100644
--- a/libnautilus/nautilus-undo-transaction.c
+++ b/libnautilus/nautilus-undo-transaction.c
@@ -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);
diff --git a/libnautilus/nautilus-view-standard-main.c b/libnautilus/nautilus-view-standard-main.c
index 22e4d1332..10dafc458 100644
--- a/libnautilus/nautilus-view-standard-main.c
+++ b/libnautilus/nautilus-view-standard-main.c
@@ -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);
diff --git a/libnautilus/nautilus-view.c b/libnautilus/nautilus-view.c
index 1c13e85c3..112b24761 100644
--- a/libnautilus/nautilus-view.c
+++ b/libnautilus/nautilus-view.c
@@ -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);