diff options
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-table-adapter.c | 11 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-treeview-adapter.c | 9 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 28 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-contact-display.c | 23 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 12 |
5 files changed, 12 insertions, 71 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index aec91ae329..c3fadfdf23 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -5,7 +5,6 @@ #include "e-addressbook-table-adapter.h" #include "eab-contact-merging.h" #include "eab-gui-util.h" -#include "util/eab-destination.h" #include <libxml/tree.h> #include <libxml/parser.h> #include <libxml/xmlmemory.h> @@ -92,16 +91,6 @@ addressbook_value_at (ETableModel *etc, int col, int row) value = e_contact_get_const((EContact*)eab_model_contact_at (priv->model, row), col); - if (value && !strncmp (value, "<?xml", 5)) { - EABDestination *dest = eab_destination_import (value); - if (dest) { - /* XXX blech, we leak this */ - value = g_strdup (eab_destination_get_textrep (dest, TRUE)); - g_object_unref (dest); - } - } - - return (void *)(value ? value : ""); } diff --git a/addressbook/gui/widgets/e-addressbook-treeview-adapter.c b/addressbook/gui/widgets/e-addressbook-treeview-adapter.c index 592f9d2b03..2d0c4b8c93 100644 --- a/addressbook/gui/widgets/e-addressbook-treeview-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-treeview-adapter.c @@ -379,15 +379,6 @@ adapter_get_value (GtkTreeModel *tree_model, v = e_card_simple_get_const(simple, column); - if (v && !strncmp (v, "<?xml", 5)) { - EABDestination *dest = eab_destination_import (v); - if (dest) { - /* XXX blech, we leak this */ - v = g_strdup (eab_destination_get_textrep (dest, TRUE)); - g_object_unref (dest); - } - } - g_value_init (value, G_TYPE_STRING); g_value_set_string (value, (v ? v : "")); } diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 36038eef48..fdaf1692ba 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -39,7 +39,7 @@ #include "e-minicard-label.h" #include "e-minicard-view.h" #include "e-contact-editor.h" -#include "util/eab-destination.h" +#include "util/e-destination.h" static void e_minicard_init (EMinicard *card); static void e_minicard_class_init (EMinicardClass *klass); @@ -537,12 +537,12 @@ activiate_editor(GnomeCanvasItem *item) if (e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST)) { EContactListEditor *editor = eab_show_contact_list_editor (book, e_minicard->contact, FALSE, e_minicard->editable); - e_minicard->editor = G_OBJECT (editor); + e_minicard->editor = EAB_EDITOR (editor); } else { EContactEditor *editor = eab_show_contact_editor (book, e_minicard->contact, FALSE, e_minicard->editable); - e_minicard->editor = G_OBJECT (editor); + e_minicard->editor = EAB_EDITOR (editor); } g_object_ref (e_minicard->editor); @@ -746,17 +746,6 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width) name = g_strdup_printf("%s:", e_contact_pretty_name (field)); string = e_contact_get (e_minicard->contact, field); - /* Magically convert embedded XML into an address. */ - if (!strncmp (string, "<?xml", 5)) { - EABDestination *dest = eab_destination_import (string); - if (dest != NULL) { - gchar *new_string = g_strdup (eab_destination_get_textrep (dest, TRUE)); - g_free (string); - string = new_string; - g_object_unref (dest); - } - } - new_item = e_minicard_label_new(group); gnome_canvas_item_set( new_item, "width", e_minicard->width - 4.0, @@ -852,17 +841,6 @@ remodel( EMinicard *e_minicard ) string = e_contact_get(e_minicard->contact, field); if (string && *string) { - /* Magically convert embedded XML into an address. */ - if (!strncmp (string, "<?xml", 4)) { - EABDestination *dest = eab_destination_import (string); - if (dest != NULL) { - gchar *new_string = g_strdup (eab_destination_get_textrep (dest, TRUE)); - g_free (string); - string = new_string; - g_object_unref (dest); - } - } - e_minicard->fields = g_list_append(e_minicard->fields, minicard_field); g_object_set(minicard_field->label, "field", string, diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index d5e62d323a..a1dc832550 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -23,7 +23,6 @@ #include "eab-contact-display.h" #include "e-util/e-html-utils.h" -#include "util/eab-destination.h" #include <string.h> #include <libgnome/gnome-i18n.h> @@ -243,14 +242,9 @@ render_contact_list (GtkHTMLStream *html_stream, EContact *contact) email_list = e_contact_get (contact, E_CONTACT_EMAIL); for (l = email_list; l; l = l->next) { - EABDestination *dest = eab_destination_import (l->data); - if (dest) { - const char *textrep = eab_destination_get_textrep (dest, TRUE); - char *html = e_text_to_html (textrep, E_TEXT_TO_HTML_CONVERT_ADDRESSES); - gtk_html_stream_printf (html_stream, "%s<br>", html); - g_free (html); - g_object_unref (dest); - } + char *html = e_text_to_html (l->data, E_TEXT_TO_HTML_CONVERT_ADDRESSES); + gtk_html_stream_printf (html_stream, "%s<br>", html); + g_free (html); } gtk_html_stream_printf (html_stream, "</td></tr></table>"); } @@ -499,14 +493,9 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac email_list = e_contact_get (contact, E_CONTACT_EMAIL); for (l = email_list; l; l = l->next) { - EABDestination *dest = eab_destination_import (l->data); - if (dest) { - const char *textrep = eab_destination_get_textrep (dest, TRUE); - char *html = e_text_to_html (textrep, 0); - gtk_html_stream_printf (html_stream, "%s, ", html); - g_free (html); - g_object_unref (dest); - } + char *html = e_text_to_html (l->data, 0); + gtk_html_stream_printf (html_stream, "%s, ", html); + g_free (html); } gtk_html_stream_printf (html_stream, "</td></tr></table>"); } diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index f08e2122ce..3ad9ae7a9f 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -29,7 +29,7 @@ #include <gal/util/e-util.h> #include "eab-gui-util.h" #include "util/eab-book-util.h" -#include "util/eab-destination.h" +#include "util/e-destination.h" #include "widgets/misc/e-image-chooser.h" #include "widgets/misc/e-source-selector.h" @@ -703,14 +703,8 @@ eab_send_contact_list (GList *contacts, EABDisposition disposition) addr = NULL; if (iterator && iterator->data) { if (is_list) { - /* We need to decode the list entries, which are XMLified EABDestinations. */ - EABDestination *dest = eab_destination_import ((char*)iterator->data); - if (dest != NULL) { - name = g_strdup (eab_destination_get_name (dest)); - addr = g_strdup (eab_destination_get_email (dest)); - g_object_unref (dest); - } - + /* XXX we should probably try to get the name from the attribute parameter here.. */ + addr = g_strdup ((char*)iterator->data); } else { /* is just a plain old card */ EContactName *contact_name = e_contact_get (contact, E_CONTACT_NAME); if (contact_name) { |