diff options
author | Sean Gao <Sean.Gao@Sun.COM> | 2003-01-24 05:52:42 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2003-01-24 05:52:42 +0800 |
commit | 3cef144c507b7b51a02df43b7aea7499fa91924c (patch) | |
tree | a0058e88fcd881dbec8a5c09ffb44cac9ce8fd99 /addressbook | |
parent | eba0af0c6a80d2027eb443202f101149f607a5ea (diff) | |
download | gsoc2013-evolution-3cef144c507b7b51a02df43b7aea7499fa91924c.tar.gz gsoc2013-evolution-3cef144c507b7b51a02df43b7aea7499fa91924c.tar.zst gsoc2013-evolution-3cef144c507b7b51a02df43b7aea7499fa91924c.zip |
[ fixes bug #34898 ] handle modifications to email addresses in contact
2003-01-23 Sean Gao <Sean.Gao@Sun.COM>
[ fixes bug #34898 ]
* gui/widgets/e-minicard.c (field_changed): handle modifications
to email addresses in contact lists.
svn path=/trunk/; revision=19604
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 27 |
2 files changed, 33 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index af0c97460d..ef25e97f7a 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,11 @@ 2003-01-23 Sean Gao <Sean.Gao@Sun.COM> + [ fixes bug #34898 ] + * gui/widgets/e-minicard.c (field_changed): handle modifications + to email addresses in contact lists. + +2003-01-23 Sean Gao <Sean.Gao@Sun.COM> + [ fixes bug #36375 ] * backend/pas/pas-backend-ldap.c: use PHONE_OTHER_FAX instead of PHONE_OTHER for "other_fax". diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 4fa9ace991..dc679aad55 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -732,6 +732,8 @@ field_changed (EText *text, EMinicard *e_minicard) { ECardSimpleType type; char *string; + char *new_string; + gboolean is_list = FALSE; type = GPOINTER_TO_INT (g_object_get_data(G_OBJECT(text), @@ -739,6 +741,31 @@ field_changed (EText *text, EMinicard *e_minicard) g_object_get(text, "text", &string, NULL); + + /* + * If the card is coresponding with a contact list and the field be + * changed is e-mail address, should wrap it before write it back. + */ + new_string = (char*)e_card_simple_get_const (e_minicard->simple, + E_CARD_SIMPLE_FIELD_IS_LIST); + + is_list = (NULL != new_string); + + if (is_list && (E_CARD_SIMPLE_FIELD_EMAIL == type || + E_CARD_SIMPLE_FIELD_EMAIL_2 == type || + E_CARD_SIMPLE_FIELD_EMAIL_3 == type)) { + if (string && *string) { + EDestination *dest = e_destination_new (); + if (dest != NULL){ + e_destination_set_email (dest, string); + new_string = e_destination_export(dest); + g_free(string); + string=new_string; + gtk_object_unref (GTK_OBJECT (dest)); + } + } + } + e_card_simple_set(e_minicard->simple, type, string); |