From 294ca271decb4567cb0f4bfa1cbfe2365a7a236d Mon Sep 17 00:00:00 2001 From: Shakti Sen Date: Wed, 24 Aug 2005 10:10:10 +0000 Subject: Getting list of mail-ids instead of a single mail-id. Added support for 2005-08-24 Shakti Sen * exchange-permissions-dialog.c (add_clicked): Getting list of mail-ids instead of a single mail-id. * exchange-user-dialog.[c/h] (e2k_user_dialog_get_user_list): Added support for adding multiple IDs. Fixes bug #313919. svn path=/trunk/; revision=30239 --- plugins/exchange-operations/exchange-user-dialog.c | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'plugins/exchange-operations/exchange-user-dialog.c') diff --git a/plugins/exchange-operations/exchange-user-dialog.c b/plugins/exchange-operations/exchange-user-dialog.c index a9c78cc493..da80a1244c 100644 --- a/plugins/exchange-operations/exchange-user-dialog.c +++ b/plugins/exchange-operations/exchange-user-dialog.c @@ -223,6 +223,42 @@ e2k_user_dialog_new (GtkWidget *parent_window, return GTK_WIDGET (dialog); } +/** + * e2k_user_dialog_get_user_list: + * @dialog: the dialog + * + * Gets the email addresses of the selected user from the dialog. + * + * Return value: the email addresses. + **/ +GList * +e2k_user_dialog_get_user_list (E2kUserDialog *dialog) +{ + E2kUserDialogPrivate *priv; + EDestinationStore *destination_store; + GList *destinations; + GList *l; + GList *email_list = NULL; + EDestination *destination; + + g_return_val_if_fail (E2K_IS_USER_DIALOG (dialog), NULL); + + priv = dialog->priv; + + destination_store = e_name_selector_entry_peek_destination_store (E_NAME_SELECTOR_ENTRY (priv->entry)); + destinations = e_destination_store_list_destinations (destination_store); + if (!destinations) + return NULL; + + for (l = destinations; l; l = g_list_next (l)) { + destination = l->data; + email_list = g_list_prepend (email_list, g_strdup (e_destination_get_email (destination))); + } + g_list_free (destinations); + + return email_list; +} + /** * e2k_user_dialog_get_user: * @dialog: the dialog -- cgit v1.2.3