diff options
author | JP Rosevear <jpr@ximian.com> | 2003-11-15 04:49:01 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2003-11-15 04:49:01 +0800 |
commit | 50a2665bff9c48dc25701194157802e836db9290 (patch) | |
tree | c437b9969f3549bf715a845df73d1861b8896494 /e-util/e-source-list.c | |
parent | 40711386d6bff4321c410f8dde035c2e1a8527df (diff) | |
download | gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.gz gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.bz2 gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.lz gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.xz gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.tar.zst gsoc2013-evolution-50a2665bff9c48dc25701194157802e836db9290.zip |
config accessor (calendar_config_set_calendars_selected): ditto
2003-11-14 JP Rosevear <jpr@ximian.com>
* gui/calendar-config.c (calendar_config_get_calendars_selected):
config accessor
(calendar_config_set_calendars_selected): ditto
(calendar_config_add_notification_calendars_selected): config
notification
* gui/calendar-config.h: add protos
* gui/calendar-config-keys.h: add new key
* gui/calendar-component.c (is_in_uids): util function
(update_uris_for_selection): save the selection in the
configuration
(update_selection): update the selection from the config info
(source_selection_changed_cb): only pass one param
(config_selection_changed_cb): listen for config changes
(impl_dispose): remove config notification
(impl_createControls): use bonobo_exception_set; add a config
notification
2003-11-14 JP Rosevear <jpr@ximian.com>
* test-source-list.c (on_idle_do_stuff): we only need the uid to
remove and peek at stuff
* e-source-list.h: update proto types
* e-source-list.c (e_source_list_peek_source_by_uid): allow peek
by uid only
(e_source_list_remove_source_by_uid): allow removal by uid only
svn path=/trunk/; revision=23362
Diffstat (limited to 'e-util/e-source-list.c')
-rw-r--r-- | e-util/e-source-list.c | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/e-util/e-source-list.c b/e-util/e-source-list.c index 565df8977e..abe2c63e04 100644 --- a/e-util/e-source-list.c +++ b/e-util/e-source-list.c @@ -398,20 +398,23 @@ e_source_list_peek_group_by_uid (ESourceList *list, ESource * e_source_list_peek_source_by_uid (ESourceList *list, - const char *group_uid, - const char *source_uid) + const char *uid) { - ESourceGroup *group; + GSList *p; g_return_val_if_fail (E_IS_SOURCE_LIST (list), NULL); - g_return_val_if_fail (group_uid != NULL, NULL); - g_return_val_if_fail (source_uid != NULL, NULL); + g_return_val_if_fail (uid != NULL, NULL); - group = e_source_list_peek_group_by_uid (list, group_uid); - if (group == NULL) - return NULL; + for (p = list->priv->groups; p != NULL; p = p->next) { + ESourceGroup *group = E_SOURCE_GROUP (p->data); + ESource *source; + + source = e_source_group_peek_source_by_uid (group, uid); + if (source) + return source; + } - return e_source_group_peek_source_by_uid (group, source_uid); + return NULL; } @@ -470,20 +473,23 @@ e_source_list_remove_group_by_uid (ESourceList *list, gboolean e_source_list_remove_source_by_uid (ESourceList *list, - const char *group_uid, - const char *source_uid) + const char *uid) { - ESourceGroup *group; - + GSList *p; + g_return_val_if_fail (E_IS_SOURCE_LIST (list), FALSE); - g_return_val_if_fail (group_uid != NULL, FALSE); - g_return_val_if_fail (source_uid != NULL, FALSE); + g_return_val_if_fail (uid != NULL, FALSE); - group = e_source_list_peek_group_by_uid (list, group_uid); - if (group== NULL) - return FALSE; + for (p = list->priv->groups; p != NULL; p = p->next) { + ESourceGroup *group = E_SOURCE_GROUP (p->data); + ESource *source; + + source = e_source_group_peek_source_by_uid (group, uid); + if (source) + return e_source_group_remove_source_by_uid (group, uid); + } - return e_source_group_remove_source_by_uid (group, source_uid); + return FALSE; } |