diff options
author | JP Rosevear <jpr@novell.com> | 2004-05-18 21:33:40 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-05-18 21:33:40 +0800 |
commit | 8f8ecd25e13165724e6e4cc71af09a383d44d727 (patch) | |
tree | d0ef937163862fb6bab7b79c4a4ac8202fee6a05 /calendar/gui/alarm-notify/notify-main.c | |
parent | a2a2f0b03919f44d467d5a3ef30bda33d7ed28e8 (diff) | |
download | gsoc2013-evolution-8f8ecd25e13165724e6e4cc71af09a383d44d727.tar gsoc2013-evolution-8f8ecd25e13165724e6e4cc71af09a383d44d727.tar.gz gsoc2013-evolution-8f8ecd25e13165724e6e4cc71af09a383d44d727.tar.bz2 gsoc2013-evolution-8f8ecd25e13165724e6e4cc71af09a383d44d727.tar.lz gsoc2013-evolution-8f8ecd25e13165724e6e4cc71af09a383d44d727.tar.xz gsoc2013-evolution-8f8ecd25e13165724e6e4cc71af09a383d44d727.tar.zst gsoc2013-evolution-8f8ecd25e13165724e6e4cc71af09a383d44d727.zip |
just set up the alarm notify object
2004-05-18 JP Rosevear <jpr@novell.com>
* gui/alarm-notify/notify-main.c (init_alarm_service): just set
up
the alarm notify object
* gui/alarm-notify/alarm-notify.h: update proto
* gui/alarm-notify/alarm-notify.c (process_removal_in_hash):
process removals using the source list
(list_changed_cb): when the list changes, update
(load_calendars): initially load the calendars
(alarm_notify_init): load the calendars here and don't listen
for
a selection notification
(alarm_notify_add_calendar): get the source type when adding a
calendar
* gui/alarm-notify/notify-main.c (main): no need to
init/shutdown
gnome vfs
* gui/alarm-notify/config-data.h: new proto
* gui/alarm-notify/config-data.c
(config_data_get_notify_with_tray): routine to get schema value
* gui/alarm-notify/alarm.c (alarm_ready_cb): no timeout checking
here, setup_timeout does that
(queue_alarm): ditto
(setup_timeout): calculate the timeout better
* gui/alarm-notify/alarm-queue.c (query_objects_changed_cb):
tidy
(edit_component): clean up exception handling
(display_notification): don't show the tray icon if we aren't
notifying with the tray
* gui/apps_evolution_calendar.schemas.in.in: add
notify_with_tray
option
svn path=/trunk/; revision=25958
Diffstat (limited to 'calendar/gui/alarm-notify/notify-main.c')
-rw-r--r-- | calendar/gui/alarm-notify/notify-main.c | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index d6004ba5e9..91fc0c0bfe 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -113,40 +113,15 @@ alarm_notify_factory_fn (BonoboGenericFactory *factory, const char *component_id return BONOBO_OBJECT (alarm_notify_service); } -/* Loads the calendars that the alarm daemon has been told to load in the past */ +/* Creates the alarm notifier */ static gboolean -load_calendars (gpointer user_data) +init_alarm_service (gpointer user_data) { - GPtrArray *cals; - int i; - - alarm_queue_init (); - - /* create the alarm notification service */ if (!alarm_notify_service) { alarm_notify_service = alarm_notify_new (); g_assert (alarm_notify_service != NULL); } - - cals = config_data_get_calendars_to_load (); - if (!cals) { - g_message ("load_calendars(): Could not get the list of calendars to load"); - return TRUE; /* should we continue retrying? */; - } - - for (i = 0; i < cals->len; i++) { - ESource *source; - char *uri; - - source = cals->pdata[i]; - - uri = e_source_get_uri (source); - alarm_notify_add_calendar (alarm_notify_service, uri, FALSE); - g_free (uri); - } - - g_ptr_array_free (cals, TRUE); - + return FALSE; } @@ -163,9 +138,6 @@ main (int argc, char **argv) CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) g_error (_("Could not initialize Bonobo")); - if (!gnome_vfs_init ()) - g_error (_("Could not initialize gnome-vfs")); - glade_init (); gnome_sound_init ("localhost"); @@ -179,7 +151,7 @@ main (int argc, char **argv) init_session (); - g_idle_add ((GSourceFunc) load_calendars, NULL); + g_idle_add ((GSourceFunc) init_alarm_service, NULL); bonobo_main (); @@ -194,7 +166,6 @@ main (int argc, char **argv) e_passwords_shutdown (); gnome_sound_shutdown (); - gnome_vfs_shutdown (); return 0; } |