[evolution/gnome-3-10] Bug #711669 - "Other address" is not displayed in preview



commit 233e58634fd70c58306bd61dd38e013cda429bf4
Author: Milan Crha <mcrha redhat com>
Date:   Wed Nov 20 18:04:10 2013 +0100

    Bug #711669 - "Other address" is not displayed in preview

 addressbook/gui/widgets/eab-contact-formatter.c |   24 +++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/gui/widgets/eab-contact-formatter.c b/addressbook/gui/widgets/eab-contact-formatter.c
index 8dbfddf..0601291 100644
--- a/addressbook/gui/widgets/eab-contact-formatter.c
+++ b/addressbook/gui/widgets/eab-contact-formatter.c
@@ -700,6 +700,29 @@ render_personal_column (EABContactFormatter *formatter,
 }
 
 static void
+render_other_column (EABContactFormatter *formatter,
+                    EContact *contact,
+                    GString *buffer)
+{
+       GString *accum = g_string_new ("");
+
+       accum_address (accum, contact, _("Address"), E_CONTACT_ADDRESS_OTHER, E_CONTACT_ADDRESS_LABEL_OTHER);
+       if (formatter->priv->render_maps)
+               accum_address_map (accum, contact, E_CONTACT_ADDRESS_OTHER);
+
+       if (accum->len > 0) {
+               g_string_append_printf (
+                       buffer,
+                       "<div class=\"column\" id=\"contact-other\">"
+                       "<h3>%s</h3>"
+                       "<table border=\"0\" cellspacing=\"5\">%s</table>"
+                       "</div>", _("Other"), accum->str);
+       }
+
+       g_string_free (accum, TRUE);
+}
+
+static void
 render_footer (EABContactFormatter *formatter,
                EContact *contact,
                GString *buffer)
@@ -736,6 +759,7 @@ render_contact (EABContactFormatter *formatter,
        render_contact_column (formatter, contact, buffer);
        render_work_column (formatter, contact, buffer);
        render_personal_column (formatter, contact, buffer);
+       render_other_column (formatter, contact, buffer);
        g_string_append (buffer, "</div>");
 
        render_footer (formatter, contact, buffer);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]