98 lines
3.7 KiB
Diff
98 lines
3.7 KiB
Diff
Index: calendar/gui/e-select-names-editable.c
|
|
===================================================================
|
|
--- calendar/gui/e-select-names-editable.c (revision 36818)
|
|
+++ calendar/gui/e-select-names-editable.c (working copy)
|
|
@@ -129,7 +129,7 @@
|
|
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 @@
|
|
if (!destinations)
|
|
return NULL;
|
|
|
|
- destination = destinations->data;
|
|
- if (e_destination_is_evolution_list (destination)) {
|
|
- const GList *list_dests, *l;
|
|
+ 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)));
|
|
+ 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 @@
|
|
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 @@
|
|
if (!destinations)
|
|
return NULL;
|
|
|
|
- destination = destinations->data;
|
|
- if (e_destination_is_evolution_list (destination)) {
|
|
- const GList *list_dests, *l;
|
|
+ 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)));
|
|
+ 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;
|