diff options
author | Rodney Dawes <dobey@ximian.com> | 2004-04-19 23:19:05 +0800 |
---|---|---|
committer | Rodney Dawes <dobey@src.gnome.org> | 2004-04-19 23:19:05 +0800 |
commit | c13ea522069443479b5370d6bb0084b281272ef2 (patch) | |
tree | 39a68c387cffde755433bbc0db48d7a44d9cb54a /addressbook | |
parent | f4b4be936edef388577024f565b2f1643d4bd2f9 (diff) | |
download | gsoc2013-evolution-c13ea522069443479b5370d6bb0084b281272ef2.tar.gz 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')
16 files changed, 126 insertions, 93 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index faeb5ac6ab..108f34d761 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,26 @@ +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 + 2004-04-18 Chris Toshok <toshok@ximian.com> * gui/contact-editor/e-contact-editor.c (nonempty): new macro. diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in index fb55b0df58..02b2eb9a1a 100644 --- a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in +++ b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in @@ -61,7 +61,7 @@ <oaf_attribute name="evolution:button_label" type="string" _value="Contacts"/> <oaf_attribute name="evolution:button_sort_order" type="string" value="-9"/> - <oaf_attribute name="evolution:button_icon" type="string" value="evolution-contacts.png"/> + <oaf_attribute name="evolution:button_icon" type="string" value="stock_addressbook"/> </oaf_server> @@ -108,7 +108,7 @@ _value="Manager your S/Mime certificates here"/> <oaf_attribute name="evolution2:config_item:icon_name" type="string" - value="pgp-signature-ok.png"/> + value="stock_lock-ok"/> <oaf_attribute name="evolution2:config_item:priority" type="string" value="-6"/> @@ -132,7 +132,7 @@ _value="Configure autocomple here"/> <oaf_attribute name="evolution2:config_item:icon_name" type="string" - value="folder-settings.png"/> + value="stock_contact"/> <oaf_attribute name="evolution2:config_item:priority" type="string" value="-9"/> diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index 3c5ad9ce83..ad43ba8f27 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -94,7 +94,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[0].menuDescription = _("_Contact"); list->_buffer[0].tooltip = _("Create a new contact"); list->_buffer[0].menuShortcut = 'c'; - list->_buffer[0].iconName = "evolution-contacts-mini.png"; + list->_buffer[0].iconName = "stock_contact"; list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT; list->_buffer[1].id = "contact_list"; @@ -102,7 +102,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[1].menuDescription = _("Contact _List"); list->_buffer[1].tooltip = _("Create a new contact list"); list->_buffer[1].menuShortcut = 'l'; - list->_buffer[1].iconName = "contact-list-16.png"; + list->_buffer[1].iconName = "stock_contact-list"; list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT; list->_buffer[2].id = "address_book"; @@ -110,7 +110,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[2].menuDescription = _("_Contacts Group"); list->_buffer[2].tooltip = _("Create a new contacts group"); list->_buffer[2].menuShortcut = 'g'; - list->_buffer[2].iconName = "evolution-contacts-mini.png"; + list->_buffer[2].iconName = "stock_addressbook"; list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER; return list; diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c index 5cc4e77295..ed59e3e749 100644 --- a/addressbook/gui/component/addressbook-view.c +++ b/addressbook/gui/component/addressbook-view.c @@ -44,6 +44,7 @@ #include "widgets/misc/e-source-selector.h" #include "e-util/e-passwords.h" +#include "e-util/e-icon-factory.h" #include "shell/e-user-creatable-items-handler.h" #include "evolution-shell-component-utils.h" @@ -66,7 +67,7 @@ static GObjectClass *parent_class = NULL; /* This is used for the addressbook status bar */ -#define EVOLUTION_CONTACTS_PROGRESS_IMAGE "evolution-contacts-mini.png" +#define EVOLUTION_CONTACTS_PROGRESS_IMAGE "stock_contact" static GdkPixbuf *progress_icon = NULL; #define d(x) @@ -285,7 +286,7 @@ set_status_message (EABView *eav, const char *message, AddressbookView *view) char *clientid = g_strdup_printf ("%p", view); if (progress_icon == NULL) - progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CONTACTS_PROGRESS_IMAGE, NULL); + progress_icon = e_icon_factory_get_icon (EVOLUTION_CONTACTS_PROGRESS_IMAGE, 16); priv->activity_id = e_activity_handler_operation_started (activity_handler, clientid, progress_icon, message, TRUE); @@ -432,17 +433,17 @@ static BonoboUIVerb verbs [] = { }; static EPixmap pixmaps [] = { - E_PIXMAP ("/menu/File/FileOps/ContactsSaveAsVCard", "save-as-16.png"), - E_PIXMAP ("/menu/File/Print/ContactsPrint", "print.xpm"), - E_PIXMAP ("/menu/File/Print/ContactsPrintPreview", "print-preview.xpm"), + E_PIXMAP ("/menu/File/FileOps/ContactsSaveAsVCard", "stock_save_as", 16), + E_PIXMAP ("/menu/File/Print/ContactsPrint", "stock_print", 16), + E_PIXMAP ("/menu/File/Print/ContactsPrintPreview", "stock_print-preview", 16), - E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsCut", "16_cut.png"), - E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsCopy", "16_copy.png"), - E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsPaste", "16_paste.png"), - E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactDelete", "evolution-trash-mini.png"), + E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsCut", "stock_cut", 16), + E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsCopy", "stock_copy", 16), + E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactsPaste", "stock_paste", 16), + E_PIXMAP ("/menu/EditPlaceholder/Edit/ContactDelete", "stock_delete", 16), - E_PIXMAP ("/Toolbar/ContactsPrint", "buttons/print.png"), - E_PIXMAP ("/Toolbar/ContactDelete", "buttons/delete-message.png"), + E_PIXMAP ("/Toolbar/ContactsPrint", "stock_print", 24), + E_PIXMAP ("/Toolbar/ContactDelete", "stock_delete", 24), E_PIXMAP_END }; @@ -1026,7 +1027,7 @@ addressbook_view_init (AddressbookView *view) e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (priv->statusbar_widget)); - priv->info_widget = e_info_label_new("evolution-contacts-mini.png"); + priv->info_widget = e_info_label_new("stock_contact"); e_info_label_set_info((EInfoLabel*)priv->info_widget, _("Contacts"), ""); gtk_widget_show (priv->info_widget); diff --git a/addressbook/gui/component/select-names/e-select-names-popup.c b/addressbook/gui/component/select-names/e-select-names-popup.c index 0ad6fda909..9fc1179010 100644 --- a/addressbook/gui/component/select-names/e-select-names-popup.c +++ b/addressbook/gui/component/select-names/e-select-names-popup.c @@ -44,9 +44,10 @@ #include <addressbook/gui/contact-editor/e-contact-quick-add.h> #include "eab-gui-util.h" #include "e-select-names-popup.h" +#include <e-util/e-icon-factory.h> -#define LIST_ICON_FILENAME "contact-list-16.png" -#define CONTACT_ICON_FILENAME "evolution-contacts-mini.png" +#define LIST_ICON_NAME "stock_contact-list" +#define CONTACT_ICON_NAME "stock_contact" typedef struct _PopupInfo PopupInfo; struct _PopupInfo { @@ -191,6 +192,7 @@ toggle_html_mail_cb (GtkWidget *w, gpointer user_data) static void populate_popup_contact (GtkWidget *pop, gboolean list, PopupInfo *info) { + GdkPixbuf *pixbuf; GtkWidget *image; EContact *contact; GtkWidget *menuitem; @@ -289,9 +291,9 @@ populate_popup_contact (GtkWidget *pop, gboolean list, PopupInfo *info) gtk_widget_show (menuitem); gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem); - image = gtk_image_new_from_file (list - ? EVOLUTION_IMAGESDIR "/" LIST_ICON_FILENAME - : EVOLUTION_IMAGESDIR "/" CONTACT_ICON_FILENAME); + pixbuf = e_icon_factory_get_icon (list ? LIST_ICON_NAME : CONTACT_ICON_NAME, 16); + image = gtk_image_new_from_pixbuf (pixbuf); + g_object_unref (pixbuf); gtk_widget_show (image); menuitem = gtk_image_menu_item_new_with_label (e_destination_get_name (info->dest)); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade index cefd73f07a..ceb32b2b67 100644 --- a/addressbook/gui/contact-editor/contact-editor.glade +++ b/addressbook/gui/contact-editor/contact-editor.glade @@ -64,6 +64,7 @@ <widget class="Custom" id="image-chooser"> <property name="visible">True</property> <property name="creation_function">eab_create_image_chooser_widget</property> + <property name="string1">stock_person</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Tue, 13 Apr 2004 20:51:33 GMT</property> diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.c b/addressbook/gui/contact-editor/e-contact-editor-address.c index 683fa12da0..375bf5a197 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-address.c +++ b/addressbook/gui/contact-editor/e-contact-editor-address.c @@ -22,10 +22,10 @@ #include <config.h> #include <e-contact-editor-address.h> +#include <e-util/e-icon-factory.h> #include <glib.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-window-icon.h> #include <libgnome/gnome-util.h> #include <gal/widgets/e-gui-utils.h> #include <gtk/gtkcombo.h> @@ -420,7 +420,7 @@ e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address) { GladeXML *gui; GtkWidget *widget; - char *icon_path; + GList *icon_list; gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_address), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -447,9 +447,12 @@ e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address) gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_address)->vbox), widget, TRUE, TRUE, 0); g_object_unref(widget); - icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png"); - gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_address), icon_path); - g_free (icon_path); + icon_list = e_icon_factory_get_icon_list ("stock_contact"); + if (icon_list) { + gtk_window_set_icon_list (GTK_WINDOW (e_contact_editor_address), icon_list); + g_list_foreach (icon_list, (GFunc) g_object_unref, NULL); + g_list_free (icon_list); + } } void diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index 824a4e45a9..b8887fa051 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -21,7 +21,7 @@ #include <config.h> #include "e-contact-editor-fullname.h" -#include <libgnomeui/gnome-window-icon.h> +#include <e-util/e-icon-factory.h> #include <libgnome/gnome-util.h> #include <libgnome/gnome-i18n.h> #include <gtk/gtkcombo.h> @@ -103,7 +103,7 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam { GladeXML *gui; GtkWidget *widget; - char *icon_path; + GList *icon_list; gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_fullname), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -126,9 +126,12 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0); g_object_unref(widget); - icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png"); - gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_fullname), icon_path); - g_free (icon_path); + icon_list = e_icon_factory_get_icon_list ("stock_contact"); + if (icon_list) { + gtk_window_set_icon_list (GTK_WINDOW (e_contact_editor_fullname), icon_list); + g_list_foreach (icon_list, (GFunc) g_object_unref, NULL); + g_list_free (icon_list); + } } void diff --git a/addressbook/gui/contact-editor/e-contact-editor-im.c b/addressbook/gui/contact-editor/e-contact-editor-im.c index dc1a4e39bc..0be3c2b09f 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-im.c +++ b/addressbook/gui/contact-editor/e-contact-editor-im.c @@ -21,7 +21,6 @@ #include <config.h> #include "e-contact-editor-im.h" -#include <libgnomeui/gnome-window-icon.h> #include <libgnome/gnome-util.h> #include <libgnome/gnome-i18n.h> #include <gtk/gtkbox.h> @@ -34,6 +33,7 @@ #include <gtk/gtksizegroup.h> #include <gtk/gtkstock.h> #include <string.h> +#include <e-util/e-icon-factory.h> static void e_contact_editor_im_init (EContactEditorIm *card); static void e_contact_editor_im_class_init (EContactEditorImClass *klass); @@ -68,12 +68,12 @@ static const char *im_labels[] = { }; static const char *im_images[] = { - "im-aim.png", - "im-nov.png", - "im-jabber.png", - "im-yahoo.png", - "im-msn.png", - "im-icq.png" + "im-aim", + "im-nov", + "im-jabber", + "im-yahoo", + "im-msn", + "im-icq" }; GType @@ -176,9 +176,7 @@ setup_service_optmenu(EContactEditorIm *editor) GtkWidget *label; GtkWidget *image; GdkPixbuf *pixbuf; - GdkPixbuf *scale; GtkSizeGroup *sg; - char *icon_path; int i; optmenu = glade_xml_get_widget(editor->gui, "optmenu-service"); @@ -198,16 +196,12 @@ setup_service_optmenu(EContactEditorIm *editor) gtk_container_add(GTK_CONTAINER(item), hbox); gtk_widget_show(hbox); - icon_path = g_concat_dir_and_file(EVOLUTION_IMAGESDIR, im_images[i]); - pixbuf = gdk_pixbuf_new_from_file(icon_path, NULL); - g_free(icon_path); + pixbuf = e_icon_factory_get_icon(im_images[i], 16); if (pixbuf != NULL) { - scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR); - image = gtk_image_new_from_pixbuf(scale); + image = gtk_image_new_from_pixbuf(pixbuf); g_object_unref(G_OBJECT(pixbuf)); - g_object_unref(G_OBJECT(scale)); } else image = gtk_image_new(); @@ -261,7 +255,7 @@ e_contact_editor_im_init (EContactEditorIm *e_contact_editor_im) { GladeXML *gui; GtkWidget *widget; - char *icon_path; + GList *icon_list; gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_im), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -295,9 +289,13 @@ e_contact_editor_im_init (EContactEditorIm *e_contact_editor_im) gtk_widget_grab_focus(glade_xml_get_widget(gui, "entry-username")); - icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png"); - gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_im), icon_path); - g_free (icon_path); + /* set the icon */ + icon_list = e_icon_factory_get_icon_list ("stock_contact"); + if (icon_list) { + gtk_window_set_icon_list (GTK_WINDOW (e_contact_editor_im), icon_list); + g_list_foreach (icon_list, (GFunc) g_object_unref, NULL); + g_list_free (icon_list); + } } void diff --git a/addressbook/gui/contact-list-editor/contact-list-editor.glade b/addressbook/gui/contact-list-editor/contact-list-editor.glade index ebe7dcb1d0..c7cdc30226 100644 --- a/addressbook/gui/contact-list-editor/contact-list-editor.glade +++ b/addressbook/gui/contact-list-editor/contact-list-editor.glade @@ -81,7 +81,7 @@ <widget class="Custom" id="list-image"> <property name="visible">True</property> <property name="creation_function">eab_create_image_chooser_widget</property> - <property name="string1">evolution-contacts-plain.png</property> + <property name="string1">stock_addressbook</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Sat, 23 Jun 2001 05:59:21 GMT</property> diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index 22dccfcb67..17494aeccb 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -21,6 +21,7 @@ #include <config.h> #include "e-contact-list-editor.h" +#include <e-util/e-icon-factory.h> #include <string.h> @@ -182,7 +183,7 @@ e_contact_list_editor_init (EContactListEditor *editor) GladeXML *gui; GtkWidget *bonobo_win; BonoboUIContainer *container; - char *icon_path; + GList *icon_list; editor->contact = NULL; editor->changed = FALSE; @@ -278,9 +279,12 @@ e_contact_list_editor_init (EContactListEditor *editor) G_CALLBACK (app_delete_event_cb), editor); /* set the icon */ - icon_path = g_build_filename (EVOLUTION_IMAGESDIR, "contact-list-16.png", NULL); - gnome_window_icon_set_from_file (GTK_WINDOW (editor->app), icon_path); - g_free (icon_path); + icon_list = e_icon_factory_get_icon_list ("stock_contact-list"); + if (icon_list) { + gtk_window_set_icon_list (GTK_WINDOW (editor->app), icon_list); + g_list_foreach (icon_list, (GFunc) g_object_unref, NULL); + g_list_free (icon_list); + } } static void @@ -514,18 +518,18 @@ BonoboUIVerb verbs [] = { }; static EPixmap pixmaps[] = { - E_PIXMAP ("/commands/ContactListEditorSave", "save-16.png"), - E_PIXMAP ("/commands/ContactListEditorSaveClose", "save-16.png"), - E_PIXMAP ("/commands/ContactListEditorSaveAs", "save-as-16.png"), + E_PIXMAP ("/commands/ContactListEditorSave", "stock_save", 16), + E_PIXMAP ("/commands/ContactListEditorSaveClose", "stock_save", 16), + E_PIXMAP ("/commands/ContactListEditorSaveAs", "stock_save_as", 16), - E_PIXMAP ("/commands/ContactListEditorDelete", "evolution-trash-mini.png"), + E_PIXMAP ("/commands/ContactListEditorDelete", "stock_delete", 16), #if 0 /* Envelope printing is disabled for Evolution 1.0. */ - E_PIXMAP ("/commands/ContactListEditorPrint", "print.xpm"), - E_PIXMAP ("/commands/ContactListEditorPrintEnvelope", "print.xpm"), + E_PIXMAP ("/commands/ContactListEditorPrint", "stock_print", 16), + E_PIXMAP ("/commands/ContactListEditorPrintEnvelope", "stock_print", 16), #endif - E_PIXMAP ("/Toolbar/ContactListEditorSaveClose", "buttons/save-24.png"), - E_PIXMAP ("/Toolbar/ContactListEditorDelete", "buttons/delete-message.png"), - E_PIXMAP ("/Toolbar/ContactListEditorPrint", "buttons/print.png"), + E_PIXMAP ("/Toolbar/ContactListEditorSaveClose", "stock_save", 24), + E_PIXMAP ("/Toolbar/ContactListEditorDelete", "stock_delete", 24), + E_PIXMAP ("/Toolbar/ContactListEditorPrint", "stock_print", 24), E_PIXMAP_END }; diff --git a/addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade b/addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade index 789c465d92..3ad86b40ba 100644 --- a/addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade +++ b/addressbook/gui/merging/eab-contact-commit-duplicate-detected.glade @@ -182,7 +182,7 @@ exists in this folder. Would you like to add it anyway?</property> <widget class="Custom" id="custom2"> <property name="visible">True</property> <property name="creation_function">e_create_image_widget</property> - <property name="string1">malehead.png</property> + <property name="string1">stock_person</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property> diff --git a/addressbook/gui/merging/eab-contact-duplicate-detected.glade b/addressbook/gui/merging/eab-contact-duplicate-detected.glade index c44547fb92..f1095f9db0 100644 --- a/addressbook/gui/merging/eab-contact-duplicate-detected.glade +++ b/addressbook/gui/merging/eab-contact-duplicate-detected.glade @@ -182,7 +182,7 @@ in this folder. Would you like to add it anyway?</property> <widget class="Custom" id="custom2"> <property name="visible">True</property> <property name="creation_function">e_create_image_widget</property> - <property name="string1">malehead.png</property> + <property name="string1">stock_person</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property> diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index fdaf1692ba..e49b162fc1 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -39,6 +39,7 @@ #include "e-minicard-label.h" #include "e-minicard-view.h" #include "e-contact-editor.h" +#include <e-util/e-icon-factory.h> #include "util/e-destination.h" static void e_minicard_init (EMinicard *card); @@ -62,7 +63,7 @@ static GnomeCanvasGroupClass *parent_class = NULL; #define d(x) -#define LIST_ICON_FILENAME "contact-list-16.png" +#define LIST_ICON_NAME "stock_contact-list" static void e_minicard_field_destroy(EMinicardField *field) @@ -235,7 +236,7 @@ e_minicard_init (EMinicard *minicard) minicard->contact = NULL; - minicard->list_icon_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" LIST_ICON_FILENAME, NULL); + minicard->list_icon_pixbuf = e_icon_factory_get_icon (LIST_ICON_NAME, 16); minicard->list_icon_size = gdk_pixbuf_get_height (minicard->list_icon_pixbuf); minicard->editor = NULL; @@ -426,6 +427,9 @@ e_minicard_finalize (GObject *object) if (e_minicard->contact) g_object_unref (e_minicard->contact); + + if (e_minicard->list_icon_pixbuf) + g_object_unref (e_minicard->list_icon_pixbuf); if (G_OBJECT_CLASS (parent_class)->finalize) (* G_OBJECT_CLASS (parent_class)->finalize) (object); 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); } } diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 14f446644f..eed07a3621 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -971,10 +971,7 @@ eab_create_image_chooser_widget(gchar *name, char *filename; GtkWidget *w = NULL; if (string1) { - if (*string1 == '/') - filename = g_strdup(string1); - else - filename = g_build_filename (EVOLUTION_IMAGESDIR, string1, NULL); + filename = e_icon_factory_get_icon_filename (string1, 48); w = e_image_chooser_new (); e_image_chooser_set_from_file (E_IMAGE_CHOOSER (w), filename); |