diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2004-02-04 20:36:13 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-02-04 20:36:13 +0800 |
commit | 356697e42c851abc93a60534246e92b245e35d8a (patch) | |
tree | 9edeadba8fe1f0d475ef5ad1262840a1e2c0c653 /calendar/gui/alarm-notify/config-data.c | |
parent | c92c8d466dc18ea950965e476eb21bae95347eb8 (diff) | |
download | gsoc2013-evolution-356697e42c851abc93a60534246e92b245e35d8a.tar gsoc2013-evolution-356697e42c851abc93a60534246e92b245e35d8a.tar.gz gsoc2013-evolution-356697e42c851abc93a60534246e92b245e35d8a.tar.bz2 gsoc2013-evolution-356697e42c851abc93a60534246e92b245e35d8a.tar.lz gsoc2013-evolution-356697e42c851abc93a60534246e92b245e35d8a.tar.xz gsoc2013-evolution-356697e42c851abc93a60534246e92b245e35d8a.tar.zst gsoc2013-evolution-356697e42c851abc93a60534246e92b245e35d8a.zip |
Fixes #52970
2004-02-04 Rodrigo Moya <rodrigo@ximian.com>
Fixes #52970
* idl/evolution-calendar.idl: added back the AlarmNotify interface.
* gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.server.in.in:
changed to have the AlarmNotify component be created via a factory.
* gui/alarm-notify/alarm-notify.[ch]: converted to implement the
AlarmNotify interface.
* gui/alarm-notify/notify-main.c (main): register the factory with
bonobo_generic_factory_new, not the object itself. Removed redundant
call to bonobo_object_unref. Call e_passwords_shutdown on exit.
* gui/alarm-notify/config-data.c (config_data_get_calendars_to_load):
get only the selected calendars/task lists.
svn path=/trunk/; revision=24613
Diffstat (limited to 'calendar/gui/alarm-notify/config-data.c')
-rw-r--r-- | calendar/gui/alarm-notify/config-data.c | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c index afa8a8f7f4..bbc508577b 100644 --- a/calendar/gui/alarm-notify/config-data.c +++ b/calendar/gui/alarm-notify/config-data.c @@ -142,31 +142,44 @@ GPtrArray * config_data_get_calendars_to_load (void) { GPtrArray *cals; - GSList *groups, *gl, *sources, *sl; + GSList *uids_selected, *l; + ESource *source; ensure_inited (); /* create the array to be returned */ cals = g_ptr_array_new (); - /* process calendar sources */ - groups = e_source_list_peek_groups (calendar_source_list); - for (gl = groups; gl != NULL; gl = gl->next) { - sources = e_source_group_peek_sources (E_SOURCE_GROUP (gl->data)); - for (sl = sources; sl != NULL; sl = sl->next) { - g_ptr_array_add (cals, sl->data); - } + /* get selected calendars */ + uids_selected = gconf_client_get_list (conf_client, "/apps/evolution/calendar/display/selected_calendars", + GCONF_VALUE_STRING, NULL); + for (l = uids_selected; l != NULL; l = l->next) { + char *uid = l->data; + + source = e_source_list_peek_source_by_uid (calendar_source_list, uid); + if (source) + g_ptr_array_add (cals, source); + + g_free (uid); } - /* process tasks sources */ - groups = e_source_list_peek_groups (tasks_source_list); - for (gl = groups; gl != NULL; gl = gl->next) { - sources = e_source_group_peek_sources (E_SOURCE_GROUP (gl->data)); - for (sl = sources; sl != NULL; sl = sl->next) { - g_ptr_array_add (cals, sl->data); - } + g_slist_free (uids_selected); + + /* get selected tasks */ + uids_selected = gconf_client_get_list (conf_client, "/apps/evolution/calendar/tasks/selected_tasks", + GCONF_VALUE_STRING, NULL); + for (l = uids_selected; l != NULL; l = l->next) { + char *uid = l->data; + + source = e_source_list_peek_source_by_uid (calendar_source_list, uid); + if (source) + g_ptr_array_add (cals, source); + + g_free (uid); } + g_slist_free (uids_selected); + return cals; } |