aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-01-12 12:13:36 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-01-12 12:13:36 +0800
commitf3c94fc0f415a4025add6debe451ca3e9e449d83 (patch)
treedc34dc1c3fe8e9afd27c999db8ead150d92f2b2f /calendar/cal.c
parent550233b97a86b9b1458fc30a658d431a42ebcea2 (diff)
downloadgsoc2013-evolution-f3c94fc0f415a4025add6debe451ca3e9e449d83.tar
gsoc2013-evolution-f3c94fc0f415a4025add6debe451ca3e9e449d83.tar.gz
gsoc2013-evolution-f3c94fc0f415a4025add6debe451ca3e9e449d83.tar.bz2
gsoc2013-evolution-f3c94fc0f415a4025add6debe451ca3e9e449d83.tar.lz
gsoc2013-evolution-f3c94fc0f415a4025add6debe451ca3e9e449d83.tar.xz
gsoc2013-evolution-f3c94fc0f415a4025add6debe451ca3e9e449d83.tar.zst
gsoc2013-evolution-f3c94fc0f415a4025add6debe451ca3e9e449d83.zip
Removed the CORBA listener methods, adjusted for the new IDL.
2000-01-11 Federico Mena Quintero <federico@helixcode.com> * cal.c: Removed the CORBA listener methods, adjusted for the new IDL. * cal-listener.c (cal_listener_init): Create the private structure. In it we hold a reference to the calendar the listener is watching. (cal_listener_destroy): Destroy the private structure and unref the calendar. (Listener_cal_loaded): Stuff the calendar into our private data. (Listener_obj_added): Adjusted for new IDL. (Listener_obj_removed): Likewise. svn path=/trunk/; revision=1560
Diffstat (limited to 'calendar/cal.c')
-rw-r--r--calendar/cal.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/calendar/cal.c b/calendar/cal.c
index 44b9361398..3394ead5d8 100644
--- a/calendar/cal.c
+++ b/calendar/cal.c
@@ -130,8 +130,10 @@ cal_destroy (GtkObject *object)
CORBA_exception_init (&ev);
- for (l = priv->listeners; l; l = l->next)
+ for (l = priv->listeners; l; l = l->next) {
+ GNOME_Unknown_unref (l->data, &ev);
CORBA_Object_release (l->data, &ev);
+ }
g_list_free (priv->listeners);
@@ -160,30 +162,6 @@ Cal_get_uri (PortableServer_Servant servant,
return CORBA_string_dup (priv->uri);
}
-/* Cal::add_listener method */
-static void
-Cal_add_listener (PortableServer_Servant servant,
- GNOME_Calendar_Listener listener,
- CORBA_Environment *ev)
-{
- Cal *cal;
-
- cal = CAL (gnome_object_from_servant (servant));
- cal_add_listener (cal, listener);
-}
-
-/* Cal::remove_listener method */
-static void
-Cal_remove_listener (PortableServer_Servant servant,
- GNOME_Calendar_Listener listener,
- CORBA_Environment *ev)
-{
- Cal *cal;
-
- cal = CAL (gnome_object_from_servant (servant));
- cal_remove_listener (cal, listener);
-}
-
/**
* cal_get_epv:
* @void:
@@ -199,8 +177,6 @@ cal_get_epv (void)
epv = g_new0 (POA_GNOME_Calendar_Cal__epv, 1);
epv->get_uri = Cal_get_uri;
- epv->add_listener = Cal_add_listener;
- epv->remove_listener = Cal_remove_listener;
return epv;
}
@@ -244,10 +220,10 @@ cal_construct (Cal *cal, GNOME_Calendar_Cal corba_cal)
/**
* cal_corba_object_create:
* @object: #GnomeObject that will wrap the CORBA object.
- *
+ *
* Creates and activates the CORBA object that is wrapped by the specified
* calendar @object.
- *
+ *
* Return value: An activated object reference or #CORBA_OBJECT_NIL in case of
* failure.
**/
@@ -334,6 +310,7 @@ cal_remove_listener (Cal *cal, GNOME_Calendar_Listener listener)
for (l = priv->listeners; l; l = l->next)
if (CORBA_Object_is_equivalent (listener, l->data)) {
GNOME_Unknown_unref (listener, &ev);
+ CORBA_Object_release (listener, &ev);
priv->listeners = g_list_remove_link (priv->listeners, l);
g_list_free_1 (l);
break;