diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-13 18:35:09 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-13 18:35:09 +0800 |
commit | b7fb796b9a02395277ebb3befda315c7ae5b61bc (patch) | |
tree | 864c6b192fcf5e7b02ae4c71bf8fd81e9b65b639 /calendar/gui | |
parent | 69c69f34daba5325c05bfb7f2f0721fec7492f6d (diff) | |
download | gsoc2013-evolution-b7fb796b9a02395277ebb3befda315c7ae5b61bc.tar gsoc2013-evolution-b7fb796b9a02395277ebb3befda315c7ae5b61bc.tar.gz gsoc2013-evolution-b7fb796b9a02395277ebb3befda315c7ae5b61bc.tar.bz2 gsoc2013-evolution-b7fb796b9a02395277ebb3befda315c7ae5b61bc.tar.lz gsoc2013-evolution-b7fb796b9a02395277ebb3befda315c7ae5b61bc.tar.xz gsoc2013-evolution-b7fb796b9a02395277ebb3befda315c7ae5b61bc.tar.zst gsoc2013-evolution-b7fb796b9a02395277ebb3befda315c7ae5b61bc.zip |
fixes #320101
svn path=/trunk/; revision=31165
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-select-names-editable.c | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/calendar/gui/e-select-names-editable.c b/calendar/gui/e-select-names-editable.c index bc4a754a8c..6be5ec9bf8 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,24 +140,26 @@ 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_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_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); @@ -182,6 +184,7 @@ e_select_names_editable_get_name (ESelectNamesEditable *esne) destination = destinations->data; result = g_strdup (e_destination_get_name (destination)); + g_list_free (destinations); return result; } @@ -201,18 +204,19 @@ 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; |