get image directly from icon factory

2004-11-26  JP Rosevear  <jpr@novell.com>

	* gui/component/select-names/e-select-names-popup.c
	(populate_popup_contact): get image directly from icon factory

	* gui/contact-editor/e-contact-editor-im.c
	(setup_service_optmenu): ditto

svn path=/trunk/; revision=28000
This commit is contained in:
JP Rosevear
2004-11-26 15:51:28 +00:00
committed by JP Rosevear
parent ba0bc7dff0
commit bb4883ffd0
3 changed files with 10 additions and 14 deletions

View File

@ -1,3 +1,11 @@
2004-11-26 JP Rosevear <jpr@novell.com>
* gui/component/select-names/e-select-names-popup.c
(populate_popup_contact): get image directly from icon factory
* gui/contact-editor/e-contact-editor-im.c
(setup_service_optmenu): ditto
2004-11-25 Hao Sheng <hao.sheng@sun.com>
* gui/contact-editor/contact-editor.glade:

View File

@ -192,7 +192,6 @@ 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;
@ -291,9 +290,7 @@ populate_popup_contact (GtkWidget *pop, gboolean list, PopupInfo *info)
gtk_widget_show (menuitem);
gtk_menu_shell_prepend (GTK_MENU_SHELL (pop), menuitem);
pixbuf = e_icon_factory_get_icon (list ? LIST_ICON_NAME : CONTACT_ICON_NAME, E_ICON_SIZE_MENU);
image = gtk_image_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
image = e_icon_factory_get_image (list ? LIST_ICON_NAME : CONTACT_ICON_NAME, E_ICON_SIZE_MENU);
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),

View File

@ -175,7 +175,6 @@ setup_service_optmenu(EContactEditorIm *editor)
GtkWidget *item;
GtkWidget *label;
GtkWidget *image;
GdkPixbuf *pixbuf;
GtkSizeGroup *sg;
int i;
@ -196,15 +195,7 @@ setup_service_optmenu(EContactEditorIm *editor)
gtk_container_add(GTK_CONTAINER(item), hbox);
gtk_widget_show(hbox);
pixbuf = e_icon_factory_get_icon (im_images[i], E_ICON_SIZE_MENU);
if (pixbuf != NULL) {
image = gtk_image_new_from_pixbuf(pixbuf);
g_object_unref(G_OBJECT(pixbuf));
}
else
image = gtk_image_new();
image = e_icon_factory_get_image (im_images[i], E_ICON_SIZE_MENU);
gtk_size_group_add_widget(sg, image);