diff options
author | Bharath Acharya <abharath@novell.com> | 2008-12-29 14:58:27 +0800 |
---|---|---|
committer | Bharath Acharya <abharath@src.gnome.org> | 2008-12-29 14:58:27 +0800 |
commit | 53f720559f88591612f0a76e18e01505d0ed2078 (patch) | |
tree | 1948917f4ce3d5e379e73989554ed6470b952ae4 /calendar | |
parent | c028a63bd84beb861d6f0df143acef1334dcd281 (diff) | |
download | gsoc2013-evolution-53f720559f88591612f0a76e18e01505d0ed2078.tar.gz gsoc2013-evolution-53f720559f88591612f0a76e18e01505d0ed2078.tar.zst gsoc2013-evolution-53f720559f88591612f0a76e18e01505d0ed2078.zip |
** Fix for bug #446285 (bnc)
2008-12-29 Bharath Acharya <abharath@novell.com>
** Fix for bug #446285 (bnc)
* gui/e-select-names-editable.c:
(e_select_names_editable_get_emails),
(e_select_names_editable_get_names): Traverse all the entries in
the added list.
svn path=/trunk/; revision=36943
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 9 | ||||
-rw-r--r-- | calendar/gui/e-select-names-editable.c | 64 |
2 files changed, 43 insertions, 30 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index d9c7f764f2..8b85dbfd77 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,14 @@ 2008-12-29 Bharath Acharya <abharath@novell.com> + ** Fix for bug #446285 (bnc) + + * gui/e-select-names-editable.c: + (e_select_names_editable_get_emails), + (e_select_names_editable_get_names): Traverse all the entries in the + added list. + +2008-12-29 Bharath Acharya <abharath@novell.com> + ** Fix for bug #439998 (bnc) * gui/dialogs/comp-editor.c: (remove_event_dialog), diff --git a/calendar/gui/e-select-names-editable.c b/calendar/gui/e-select-names-editable.c index 5ec94a0fc6..dea9dd469d 100644 --- a/calendar/gui/e-select-names-editable.c +++ b/calendar/gui/e-select-names-editable.c @@ -129,7 +129,7 @@ GList * e_select_names_editable_get_emails (ESelectNamesEditable *esne) { EDestinationStore *destination_store; - GList *destinations; + GList *destinations, *l; EDestination *destination; GList *result = NULL; @@ -140,25 +140,27 @@ e_select_names_editable_get_emails (ESelectNamesEditable *esne) if (!destinations) return NULL; - destination = destinations->data; - if (e_destination_is_evolution_list (destination)) { - const GList *list_dests, *l; - - list_dests = e_destination_list_get_dests (destination); - for (l = list_dests; l != NULL; l = g_list_next (l)) { - result = g_list_append (result, g_strdup (e_destination_get_email (l->data))); + for (l = destinations; l != NULL; l = l->next) { + destination = l->data; + if (e_destination_is_evolution_list (destination)) { + const GList *list_dests, *l; + + list_dests = e_destination_list_get_dests (destination); + for (l = list_dests; l != NULL; l = g_list_next (l)) { + result = g_list_append (result, g_strdup (e_destination_get_email (l->data))); + } + } else { + /* check if the contact is contact list, it does not contain all the email ids */ + /* we dont expand it currently, TODO do we need to expand it by getting it from addressbook*/ + if (e_destination_get_contact (destination) && + e_contact_get (e_destination_get_contact (destination), E_CONTACT_IS_LIST)) { + /* If its a contact_list which is not expanded, it wont have a email id, + so we can use the name as the email id */ + + result = g_list_append (result, g_strdup (e_destination_get_name (destination))); + } else + result = g_list_append (result, g_strdup (e_destination_get_email (destination))); } - } else { - /* check if the contact is contact list, it does not contain all the email ids */ - /* we dont expand it currently, TODO do we need to expand it by getting it from addressbook*/ - if (e_destination_get_contact (destination) && - e_contact_get (e_destination_get_contact (destination), E_CONTACT_IS_LIST)) { - /* If its a contact_list which is not expanded, it wont have a email id, - so we can use the name as the email id */ - - result = g_list_append (result, g_strdup (e_destination_get_name (destination))); - } else - result = g_list_append (result, g_strdup (e_destination_get_email (destination))); } g_list_free (destinations); @@ -191,7 +193,7 @@ GList * e_select_names_editable_get_names (ESelectNamesEditable *esne) { EDestinationStore *destination_store; - GList *destinations; + GList *destinations, *l; EDestination *destination; GList *result = NULL; @@ -202,18 +204,20 @@ e_select_names_editable_get_names (ESelectNamesEditable *esne) if (!destinations) return NULL; - destination = destinations->data; - if (e_destination_is_evolution_list (destination)) { - const GList *list_dests, *l; - - list_dests = e_destination_list_get_dests (destination); - for (l = list_dests; l != NULL; l = g_list_next (l)) { - result = g_list_append (result, g_strdup (e_destination_get_name (l->data))); + for (l = destinations; l != NULL; l = l->next) { + destination = l->data; + if (e_destination_is_evolution_list (destination)) { + const GList *list_dests, *l; + + list_dests = e_destination_list_get_dests (destination); + for (l = list_dests; l != NULL; l = g_list_next (l)) { + result = g_list_append (result, g_strdup (e_destination_get_name (l->data))); + } + } else { + result = g_list_append (result, g_strdup (e_destination_get_name (destination))); } - } else { - result = g_list_append (result, g_strdup (e_destination_get_name (destination))); } - + g_list_free (destinations); return result; |