aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-06-15 03:12:48 +0800
committerChris Toshok <toshok@src.gnome.org>2004-06-15 03:12:48 +0800
commita253044c8a4b6f56f2bae2500ab610469736e829 (patch)
treecba81059ac57ecca18aa2c9001a69cddd67a762b /addressbook/gui
parentdadf300d4578b0b2eb367520e31e353fafc7f448 (diff)
downloadgsoc2013-evolution-a253044c8a4b6f56f2bae2500ab610469736e829.tar
gsoc2013-evolution-a253044c8a4b6f56f2bae2500ab610469736e829.tar.gz
gsoc2013-evolution-a253044c8a4b6f56f2bae2500ab610469736e829.tar.bz2
gsoc2013-evolution-a253044c8a4b6f56f2bae2500ab610469736e829.tar.lz
gsoc2013-evolution-a253044c8a4b6f56f2bae2500ab610469736e829.tar.xz
gsoc2013-evolution-a253044c8a4b6f56f2bae2500ab610469736e829.tar.zst
gsoc2013-evolution-a253044c8a4b6f56f2bae2500ab610469736e829.zip
set things to HOME, since we don't offer TYPE=OTHER IM attributes through
2004-06-14 Chris Toshok <toshok@ximian.com> * gui/contact-editor/e-contact-editor.c (extract_im_record): set things to HOME, since we don't offer TYPE=OTHER IM attributes through the EContact api, and one choice is just as good as another if we aren't displaying it anyway. * gui/widgets/eab-contact-display.c (render_contact): move the IM stuff out of home/work, since we don't allow people to edit location for them anymore. Also, change the IM accounts we look up to "HOME", since that's what we hardcode them to in the contact editor. svn path=/trunk/; revision=26340
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c33
2 files changed, 18 insertions, 17 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index f0ec0a3a30..f9f1af9286 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -1459,7 +1459,7 @@ extract_im_record (EContactEditor *editor, gint record, gint *service, gchar **n
#ifdef ENABLE_IM_LOCATION
*location = gtk_option_menu_get_history (GTK_OPTION_MENU (location_option_menu));
#else
- *location = -1;
+ *location = 1; /* set everything to HOME */
#endif
}
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index bffc0b1166..25fe64ddca 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -294,6 +294,8 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
accum = g_string_new ("");
nl = "";
+ start_block (html_stream, "");
+
email_list = e_contact_get (contact, E_CONTACT_EMAIL);
for (l = email_list; l; l = l->next) {
#ifdef HANDLE_MAILTO_INTERNALLY
@@ -304,7 +306,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
nl = "<br>";
#else
- g_string_append_printf (accum, "%s%s", nl, l->data);
+ g_string_append_printf (accum, "%s%s", nl, (char*)l->data);
nl = "\n";
#endif
}
@@ -312,7 +314,6 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
g_list_free (email_list);
if (accum->len) {
- start_block (html_stream, "");
#ifdef HANDLE_MAILTO_INTERNALLY
gtk_html_stream_printf (html_stream, "<tr><td valign=\"top\" width=\"" IMAGE_COL_WIDTH "\">");
@@ -323,20 +324,26 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
render_name_value (html_stream, _("E-mail"), accum->str, NULL,
E_TEXT_TO_HTML_CONVERT_ADDRESSES | E_TEXT_TO_HTML_CONVERT_NL);
#endif
-
- end_block (html_stream);
}
g_string_assign (accum, "");
+ accum_attribute (accum, contact, _("AIM"), E_CONTACT_IM_AIM_HOME_1, AIM_ICON, 0);
+ accum_attribute (accum, contact, _("GroupWise"), E_CONTACT_IM_GROUPWISE_HOME_1, GROUPWISE_ICON, 0);
+ accum_attribute (accum, contact, _("ICQ"), E_CONTACT_IM_ICQ_HOME_1, ICQ_ICON, 0);
+ accum_attribute (accum, contact, _("Jabber"), E_CONTACT_IM_JABBER_HOME_1, JABBER_ICON, 0);
+ accum_attribute (accum, contact, _("MSN"), E_CONTACT_IM_MSN_HOME_1, MSN_ICON, 0);
+ accum_attribute (accum, contact, _("Yahoo"), E_CONTACT_IM_YAHOO_HOME_1, YAHOO_ICON, 0);
+
+ if (accum->len > 0)
+ gtk_html_stream_printf (html_stream, accum->str);
+
+ end_block (html_stream);
+
+ g_string_assign (accum, "");
+
accum_attribute (accum, contact, _("Organization"), E_CONTACT_ORG, NULL, 0);
accum_attribute (accum, contact, _("Position"), E_CONTACT_TITLE, NULL, 0);
- accum_attribute (accum, contact, _("AIM"), E_CONTACT_IM_AIM_WORK_1, AIM_ICON, 0);
- accum_attribute (accum, contact, _("Groupwise"), E_CONTACT_IM_GROUPWISE_WORK_1, GROUPWISE_ICON, 0);
- accum_attribute (accum, contact, _("ICQ"), E_CONTACT_IM_ICQ_WORK_1, ICQ_ICON, 0);
- accum_attribute (accum, contact, _("Jabber"), E_CONTACT_IM_JABBER_WORK_1, JABBER_ICON, 0);
- accum_attribute (accum, contact, _("MSN"), E_CONTACT_IM_MSN_WORK_1, MSN_ICON, 0);
- accum_attribute (accum, contact, _("Yahoo"), E_CONTACT_IM_YAHOO_WORK_1, YAHOO_ICON, 0);
accum_attribute (accum, contact, _("Video Conferencing"), E_CONTACT_VIDEO_URL, VIDEOCONF_ICON, E_TEXT_TO_HTML_CONVERT_URLS);
accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_BUSINESS, NULL, 0);
accum_attribute (accum, contact, _("Fax"), E_CONTACT_PHONE_BUSINESS_FAX, NULL, 0);
@@ -350,12 +357,6 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
g_string_assign (accum, "");
- accum_attribute (accum, contact, _("AIM"), E_CONTACT_IM_AIM_HOME_1, AIM_ICON, 0);
- accum_attribute (accum, contact, _("Groupwise"), E_CONTACT_IM_GROUPWISE_HOME_1, GROUPWISE_ICON, 0);
- accum_attribute (accum, contact, _("ICQ"), E_CONTACT_IM_ICQ_HOME_1, ICQ_ICON, 0);
- accum_attribute (accum, contact, _("Jabber"), E_CONTACT_IM_JABBER_HOME_1, JABBER_ICON, 0);
- accum_attribute (accum, contact, _("MSN"), E_CONTACT_IM_MSN_HOME_1, MSN_ICON, 0);
- accum_attribute (accum, contact, _("Yahoo"), E_CONTACT_IM_YAHOO_HOME_1, YAHOO_ICON, 0);
accum_attribute (accum, contact, _("WWW"), E_CONTACT_HOMEPAGE_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS);
accum_attribute (accum, contact, _("Blog"), E_CONTACT_BLOG_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS);