diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2003-11-17 21:13:15 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-11-17 21:13:15 +0800 |
commit | 000e2ade56eb86a150a5a33e37bb685592e30186 (patch) | |
tree | 3b4c9b7e8e1283e3cf9bd1f554cc24cebbafedd7 /calendar/gui/alarm-notify/notify-main.c | |
parent | 6ac2fee6bcda6f8d2db7e0187d5a4216d603e0c3 (diff) | |
download | gsoc2013-evolution-000e2ade56eb86a150a5a33e37bb685592e30186.tar gsoc2013-evolution-000e2ade56eb86a150a5a33e37bb685592e30186.tar.gz gsoc2013-evolution-000e2ade56eb86a150a5a33e37bb685592e30186.tar.bz2 gsoc2013-evolution-000e2ade56eb86a150a5a33e37bb685592e30186.tar.lz gsoc2013-evolution-000e2ade56eb86a150a5a33e37bb685592e30186.tar.xz gsoc2013-evolution-000e2ade56eb86a150a5a33e37bb685592e30186.tar.zst gsoc2013-evolution-000e2ade56eb86a150a5a33e37bb685592e30186.zip |
remove the AlarmNotify service, no more need for it, since the alarm
2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
* idl/evolution-calendar.idl: remove the AlarmNotify service, no
more need for it, since the alarm daemon will listen for changes
on the GConf key.
* gui/gnome-cal.c (add_alarms): removed function to talk to the
alarm daemon.
(client_cal_opened_cb): don't call add_alarms().
* gui/alarm-notify/alarm-notify.[ch]: made it a basic GObject.
(AlarmNotify_addCalendar, AlarmNotify_removeCalendar): removed
AlarmNotify interface implementation.
(alarm_notify_class_init): no epv to initialize.
(alarm_notify_remove_calendar): new function, copied from the
CORBA method implementation.
(alarm_notify_factory_fn): return NULL, since there is no objects
that can be created via this factory now.
* gui/alarm-notify/notify-main.c (main): now the factory is the alarm
notification service itself.
(load_calendars): no need to use exceptions here.
* gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in:
now the factory is the alarm notification service itself.
* gui/main.c (launch_alarm_daemon_cb): dont use the AlarmNotify CORBA
types.
svn path=/trunk/; revision=23384
Diffstat (limited to 'calendar/gui/alarm-notify/notify-main.c')
-rw-r--r-- | calendar/gui/alarm-notify/notify-main.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index bed7de3653..8e492386fa 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -1,8 +1,10 @@ /* Evolution calendar - Alarm notification service main file * * Copyright (C) 2000 Ximian, Inc. + * Copyright (C) 2003 Novell, Inc. * - * Author: Federico Mena-Quintero <federico@ximian.com> + * Authors: Federico Mena-Quintero <federico@ximian.com> + * Rodrigo Moya <rodrigo@ximian.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public @@ -99,8 +101,7 @@ alarm_notify_factory_fn (BonoboGenericFactory *factory, const char *component_id g_assert (alarm_notify_service != NULL); } - bonobo_object_ref (BONOBO_OBJECT (alarm_notify_service)); - return BONOBO_OBJECT (alarm_notify_service); + return NULL; } /* Loads the calendars that the alarm daemon has been told to load in the past */ @@ -126,29 +127,10 @@ load_calendars (gpointer user_data) for (i = 0; i < uris->len; i++) { char *uri; - CORBA_Environment ev; uri = uris->pdata[i]; - CORBA_exception_init (&ev); - alarm_notify_add_calendar (alarm_notify_service, uri, FALSE, &ev); - - if (ev._major == CORBA_USER_EXCEPTION) { - char *ex_id; - - ex_id = CORBA_exception_id (&ev); - if (strcmp (ex_id, ex_GNOME_Evolution_Calendar_AlarmNotify_InvalidURI) == 0) - g_message ("load_calendars(): Invalid URI `%s'; will not load " - "that calendar.", uri); - else if (strcmp (ex_id, - ex_GNOME_Evolution_Calendar_AlarmNotify_BackendContactError) - == 0) - g_message ("load_calendars(): Could not contact the backend " - "while trying to load `%s'", uri); - } else if (ev._major != CORBA_NO_EXCEPTION) - g_message ("load_calendars(): Exception while loading calendar `%s'", uri); - - CORBA_exception_free (&ev); + alarm_notify_add_calendar (alarm_notify_service, uri, FALSE); g_free (uri); } @@ -178,7 +160,7 @@ main (int argc, char **argv) gnome_sound_init ("localhost"); - factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify_Factory", + factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", (BonoboFactoryCallback) alarm_notify_factory_fn, NULL); if (!factory) g_error (_("Could not create the alarm notify service factory")); |