aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/eab-contact-display.c
diff options
context:
space:
mode:
authorRodney Dawes <dobey@ximian.com>2004-04-19 23:19:05 +0800
committerRodney Dawes <dobey@src.gnome.org>2004-04-19 23:19:05 +0800
commitc13ea522069443479b5370d6bb0084b281272ef2 (patch)
tree39a68c387cffde755433bbc0db48d7a44d9cb54a /addressbook/gui/widgets/eab-contact-display.c
parentf4b4be936edef388577024f565b2f1643d4bd2f9 (diff)
downloadgsoc2013-evolution-c13ea522069443479b5370d6bb0084b281272ef2.tar
gsoc2013-evolution-c13ea522069443479b5370d6bb0084b281272ef2.tar.gz
gsoc2013-evolution-c13ea522069443479b5370d6bb0084b281272ef2.tar.bz2
gsoc2013-evolution-c13ea522069443479b5370d6bb0084b281272ef2.tar.lz
gsoc2013-evolution-c13ea522069443479b5370d6bb0084b281272ef2.tar.xz
gsoc2013-evolution-c13ea522069443479b5370d6bb0084b281272ef2.tar.zst
gsoc2013-evolution-c13ea522069443479b5370d6bb0084b281272ef2.zip
Set the default image for the contact photo to be the stock_person image
2004-04-19 Rodney Dawes <dobey@ximian.com> * gui/contact-editor/contact-editor.glade: Set the default image for the contact photo to be the stock_person image in the icon theme 2004-04-19 Michael Terry <mike@mterry.name> * gui/component/GNOME_Evolution_Addressbook.server.in.in: * gui/component/addressbook-component.c: * gui/component/addressbook-view.c: * gui/component/select-names/e-select-names-popup.c: * gui/contact-editor/e-contact-editor-address.c: * gui/contact-editor/e-contact-editor-fullname.c: * gui/contact-editor/e-contact-editor-im.c: * gui/contact-list-editor/contact-list-editor.glade: * gui/contact-list-editor/e-contact-list-editor.c: * gui/merging/eab-contact-commit-duplicate-detected.glade: * gui/merging/eab-contact-duplicate-detected.glade: * gui/widgets/e-minicard.c: * gui/widgets/eab-contact-display.c: * gui/widgets/eab-gui-util.c: Update the addressbook to use the icon theme via the EIconFactory object in e-util svn path=/trunk/; revision=25514
Diffstat (limited to 'addressbook/gui/widgets/eab-contact-display.c')
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index f81ff673ad..1d4cc794b8 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -44,14 +44,14 @@ struct _EABContactDisplayPrivate {
#define HEADER_COLOR "#7f7f7f"
#define IMAGE_COL_WIDTH "20"
-#define CONTACT_LIST_ICON "contact-list-16.png"
-#define AIM_ICON "im-aim.png"
-#define GROUPWISE_ICON "im-nov.png"
-#define ICQ_ICON "im-icq.png"
-#define JABBER_ICON "im-jabber.png"
-#define MSN_ICON "im-msn.png"
-#define YAHOO_ICON "im-yahoo.png"
-#define VIDEOCONF_ICON "videoconf.png"
+#define CONTACT_LIST_ICON "stock_contact-list"
+#define AIM_ICON "im-aim"
+#define GROUPWISE_ICON "im-nov"
+#define ICQ_ICON "im-icq"
+#define JABBER_ICON "im-jabber"
+#define MSN_ICON "im-msn"
+#define YAHOO_ICON "im-yahoo"
+#define VIDEOCONF_ICON "stock_video-conferencing"
#define MAX_COMPACT_IMAGE_DIMENSION 48
@@ -73,20 +73,17 @@ on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle,
else if (!strncmp (url, "evo-icon:", strlen ("evo-icon:"))) {
gchar *data;
gsize data_length;
- char *filename;
+ gchar *filename;
- /* make sure people can't embed ../../../../../../etc/passwd or something */
- if (!strchr (url, '/')) {
- filename = g_build_filename (EVOLUTION_IMAGESDIR, url + strlen ("evo-icon:"), NULL);
-
- if (g_file_get_contents (filename, &data, &data_length, NULL))
- gtk_html_stream_write (handle, data, data_length);
-
- gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
-
- g_free (filename);
+ filename = e_icon_factory_get_icon_filename (url + strlen ("evo-icon:"), 16);
+ if (g_file_get_contents (filename, &data, &data_length, NULL)) {
+ gtk_html_stream_write (handle, data, data_length);
g_free (data);
}
+
+ gtk_html_stream_close (handle, GTK_HTML_STREAM_OK);
+
+ g_free (filename);
}
}