diff options
author | Chris Toshok <toshok@ximian.com> | 2001-05-14 08:46:29 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-05-14 08:46:29 +0800 |
commit | 9953071e22306fedaf852d018e0b5416496ababb (patch) | |
tree | 3be223f5b6f6b3f8b92e30ae4271eb0c5bcebcac /addressbook/backend/ebook/e-card.c | |
parent | 4e878bc6d47a427ec06032b5180245dd619678ae (diff) | |
download | gsoc2013-evolution-9953071e22306fedaf852d018e0b5416496ababb.tar.gz gsoc2013-evolution-9953071e22306fedaf852d018e0b5416496ababb.tar.zst gsoc2013-evolution-9953071e22306fedaf852d018e0b5416496ababb.zip |
add prototype for addressbook_expand_uri.
2001-05-13 Chris Toshok <toshok@ximian.com>
* gui/component/addressbook.h: add prototype for
addressbook_expand_uri.
* gui/component/addressbook-component.c
(destination_folder_handle_drop): create an EBook for
@physical_uri.
(dnd_drop_book_open_cb): actually add the dropped cards.
* gui/component/addressbook.c (addressbook_expand_uri): abstract
this code out from the set_prop method so we can use it in the
component.
(set_prop): call addressbook_expand_uri.
* backend/ebook/e-card.c (e_card_load_cards_from_string): new
function.
* backend/ebook/e-card.h: add prototype for
e_card_load_cards_from_string.
svn path=/trunk/; revision=9788
Diffstat (limited to 'addressbook/backend/ebook/e-card.c')
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c index 3845ac8227..55b91e26d7 100644 --- a/addressbook/backend/ebook/e-card.c +++ b/addressbook/backend/ebook/e-card.c @@ -2013,6 +2013,24 @@ e_card_load_cards_from_file(const char *filename) return list; } +GList * +e_card_load_cards_from_string(const char *str) +{ + VObject *vobj = Parse_MIME(str, strlen (str)); + GList *list = NULL; + while(vobj) { + VObject *next; + ECard *card = E_CARD(gtk_type_new(e_card_get_type())); + parse(card, vobj); + next = nextVObjectInList(vobj); + cleanVObject(vobj); + vobj = next; + list = g_list_prepend(list, card); + } + list = g_list_reverse(list); + return list; +} + void e_card_free_empty_lists (ECard *card) { |