aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/gui/component/select-names/e-select-names-popup.c13
2 files changed, 18 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 0829040136..c1b470ac0c 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-08 Chris Toshok <toshok@ximian.com>
+
+ * gui/component/select-names/e-select-names-popup.c
+ (popup_menu_card): do the EDestination xml magic on email
+ addresses we put in the popup.
+
2001-08-27 Zbigniew Chyla <cyba@gnome.pl>
* gui/component/addressbook.c (addressbook_factory_new_control):
diff --git a/addressbook/gui/component/select-names/e-select-names-popup.c b/addressbook/gui/component/select-names/e-select-names-popup.c
index 124301ace4..ef73d79e8a 100644
--- a/addressbook/gui/component/select-names/e-select-names-popup.c
+++ b/addressbook/gui/component/select-names/e-select-names-popup.c
@@ -284,8 +284,18 @@ popup_menu_card (PopupInfo *info)
gchar *label = (gchar *)e_iterator_get (iterator);
if (label && *label) {
+ /* Magically convert embedded XML into an address. */
+ if (!strncmp (label, "<?xml", 4)) {
+ EDestination *dest = e_destination_import (label);
+ radioinfo[j].label = g_strdup (e_destination_get_address (dest));
+ gtk_object_unref (GTK_OBJECT (dest));
+
+ }
+ else {
+ radioinfo[j].label = g_strdup (label);
+ }
+
radioinfo[j].type = GNOME_APP_UI_ITEM;
- radioinfo[j].label = label;
radioinfo[j].moreinfo = change_email_num_cb;
++j;
}
@@ -334,6 +344,7 @@ popup_menu_card (PopupInfo *info)
gint j;
for (j=0; radioinfo[j].type != GNOME_APP_UI_ENDOFINFO; ++j) {
gtk_object_set_data (GTK_OBJECT (radioinfo[j].widget), "number", GINT_TO_POINTER (j));
+ g_free (radioinfo[j].label);
if (j == n)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (radioinfo[n].widget), TRUE);
}