diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 1999-11-09 04:48:32 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 1999-11-09 04:48:32 +0800 |
commit | 643a3d01716e1904d44b2dffca69219286df9d87 (patch) | |
tree | 82a6ae88b198c68d8d7747891cf6ad24149417da /widgets/e-msg-composer-address-entry.c | |
parent | 0c3101c24a3bb76c57d545ba6071acee529ee3a8 (diff) | |
download | gsoc2013-evolution-643a3d01716e1904d44b2dffca69219286df9d87.tar gsoc2013-evolution-643a3d01716e1904d44b2dffca69219286df9d87.tar.gz gsoc2013-evolution-643a3d01716e1904d44b2dffca69219286df9d87.tar.bz2 gsoc2013-evolution-643a3d01716e1904d44b2dffca69219286df9d87.tar.lz gsoc2013-evolution-643a3d01716e1904d44b2dffca69219286df9d87.tar.xz gsoc2013-evolution-643a3d01716e1904d44b2dffca69219286df9d87.tar.zst gsoc2013-evolution-643a3d01716e1904d44b2dffca69219286df9d87.zip |
Added cut/copy/paste support to the address editing dialog.
svn path=/trunk/; revision=1371
Diffstat (limited to 'widgets/e-msg-composer-address-entry.c')
-rw-r--r-- | widgets/e-msg-composer-address-entry.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/widgets/e-msg-composer-address-entry.c b/widgets/e-msg-composer-address-entry.c index 071730eef2..be63c815f5 100644 --- a/widgets/e-msg-composer-address-entry.c +++ b/widgets/e-msg-composer-address-entry.c @@ -140,3 +140,36 @@ e_msg_composer_address_entry_get_addresses (EMsgComposerAddressEntry *entry) return g_list_reverse (list); } + +/** + * e_msg_composer_address_entry_set_list: + * @entry: An address entry + * @list: List of pointers to strings representing the addresses that must + * appear in the entry + * + * Set the address list from @list. + **/ +void +e_msg_composer_address_entry_set_list (EMsgComposerAddressEntry *entry, + GList *list) +{ + GString *string; + GList *p; + + g_return_if_fail (entry != NULL); + + if (list == NULL) { + gtk_editable_delete_text (GTK_EDITABLE (entry), -1, -1); + return; + } + + string = g_string_new (NULL); + for (p = list; p != NULL; p = p->next) { + if (string->str[0] != '\0') + g_string_append (string, ", "); + g_string_append (string, p->data); + } + + gtk_entry_set_text (GTK_ENTRY (entry), string->str); + g_string_free (string, TRUE); +} |