diff options
author | Jon Trowbridge <trow@src.gnome.org> | 2001-10-30 13:00:24 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-10-30 13:00:24 +0800 |
commit | d53c4d6ed3e2863c1b4ffceb5fcf06aab4fef55c (patch) | |
tree | 44289bc8f9e0417044dedc8f7e8bc4bd5e978cd7 /addressbook/gui/widgets | |
parent | 7155631237185520db0831d0d6ddc4e59c5c25ec (diff) | |
download | gsoc2013-evolution-d53c4d6ed3e2863c1b4ffceb5fcf06aab4fef55c.tar.gz gsoc2013-evolution-d53c4d6ed3e2863c1b4ffceb5fcf06aab4fef55c.tar.zst gsoc2013-evolution-d53c4d6ed3e2863c1b4ffceb5fcf06aab4fef55c.zip |
2001-10-29 Jon Trowbridge <trow@ximian.com.
* gui/widgets/e-minicard.c (add_field): Five characters, not four!
* gui/widgets/e-addressbook-table-adapter.c
(addressbook_value_at): Convert xml-ified destinations into proper
addresses.
svn path=/trunk/; revision=14426
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-table-adapter.c | 12 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 980e0adbcc..f055b34a03 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -111,10 +111,22 @@ addressbook_value_at (ETableModel *etc, int col, int row) EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(etc); EAddressbookTableAdapterPrivate *priv = adapter->priv; const char *value; + if ( col >= COLS || row >= e_addressbook_model_card_count (priv->model) ) return NULL; value = e_card_simple_get_const(priv->simples[row], col); + + if (value && !strncmp (value, "<?xml", 5)) { + EDestination *dest = e_destination_import (value); + if (dest) { + g_free ((gchar *) value); + value = g_strdup (e_destination_get_address (dest)); + gtk_object_unref (GTK_OBJECT (dest)); + } + } + + return (void *)(value ? value : ""); } diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 0fd4428a0e..d8e34577b2 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -732,7 +732,7 @@ add_field (EMinicard *e_minicard, ECardSimpleField field, gdouble left_width) string = e_card_simple_get(e_minicard->simple, field); /* Magically convert embedded XML into an address. */ - if (!strncmp (string, "<?xml", 4)) { + if (!strncmp (string, "<?xml", 5)) { EDestination *dest = e_destination_import (string); if (dest != NULL) { gchar *new_string = g_strdup (e_destination_get_address (dest)); |