Re: Anjuta document manager using not existing bags.
- From: Michael Karcher <michael karcher dpk berlin fido de>
- To: gnome-devtools gnome org
- Subject: Re: Anjuta document manager using not existing bags.
- Date: Wed, 18 Dec 2002 15:13:46 +0100
On Sat, Dec 14, 2002 at 06:25:04AM +0100, JP Rosevear wrote:
> To actually commit yourself first, yes (which is a process). Just send
> the updated patch to the list.
[done in this mail -- sorry, no attachments possible from here, so inlined]
--- plugins/document-manager/anjuta-document.c.orig Mon Dec 16 13:58:55 2002
+++ plugins/document-manager/anjuta-document.c Mon Dec 16 14:01:49 2002
@@ -576,32 +576,36 @@
(document->control_frame, &ev);
g_assert (!BONOBO_EX (&ev));
- any = Bonobo_PropertyBag_getValue (bag, "dirty", &ev);
- if (BONOBO_USER_EX (&ev, "IDL:Bonobo/PropertyBag/NotFound:1.0")) {
+ if (bag == CORBA_OBJECT_NIL) {
document->priv->supports_modified = FALSE;
} else {
- Bonobo_EventSource source;
- BonoboListener *listener;
+ any = Bonobo_PropertyBag_getValue (bag, "dirty", &ev);
+ if (BONOBO_USER_EX (&ev, "IDL:Bonobo/PropertyBag/NotFound:1.0")) {
+ document->priv->supports_modified = FALSE;
+ } else {
+ Bonobo_EventSource source;
+ BonoboListener *listener;
- CORBA_free (any);
+ CORBA_free (any);
- source = Bonobo_Unknown_queryInterface (bag,
- "IDL:Bonobo/EventSource:1.0",
- &ev);
+ source = Bonobo_Unknown_queryInterface (bag,
+ "IDL:Bonobo/EventSource:1.0",
+ &ev);
- listener = bonobo_listener_new (anjuta_bonobo_document_dirty, document);
- g_object_set_data (G_OBJECT (document), "DirtyListener", listener);
+ listener = bonobo_listener_new (anjuta_bonobo_document_dirty, document);
+ g_object_set_data (G_OBJECT (document), "DirtyListener", listener);
- /* Register listener for "dirty" event. */
- if (!CORBA_Object_is_nil (source, &ev) && ev._major == CORBA_NO_EXCEPTION) {
- Bonobo_EventSource_addListenerWithMask (source,
- BONOBO_OBJREF (listener),
- "Bonobo/Property:change:dirty",
- &ev);
- g_assert (!BONOBO_EX (&ev));
- }
+ /* Register listener for "dirty" event. */
+ if (!CORBA_Object_is_nil (source, &ev) && ev._major == CORBA_NO_EXCEPTION) {
+ Bonobo_EventSource_addListenerWithMask (source,
+ BONOBO_OBJREF (listener),
+ "Bonobo/Property:change:dirty",
+ &ev);
+ g_assert (!BONOBO_EX (&ev));
+ }
- document->priv->supports_modified = TRUE;
+ document->priv->supports_modified = TRUE;
+ }
}
document->priv->current_component = component;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]