From 9b8a6860948ad7cd5d1c6a24360e4b59fc120fb2 Mon Sep 17 00:00:00 2001
From: Michael Terry <mike@mterry.name>
Date: Mon, 19 Apr 2004 15:17:54 +0000
Subject: Change component icons to use the icon theme names for icons Remove

2004-04-19  Michael Terry  <mike@mterry.name>

	* GNOME_Evolution_Test.server.in.in: Change component icons to use the
	icon theme names for icons
	* Makefile.am: Remove e-icon-factory.[ch]
	* e-component-registry.c: Use the icon theme for component icons
	* e-icon-factory.[ch]: Removed these files
	* e-shell-importer.c:
	* e-shell-settings-dialog.c:
	* e-shell-startup-wizard.c:
	* e-shell-window-commands.c:
	* e-user-creatable-items-handler.c:
	* evolution-shell-component-utils.[ch]:
	* main.c:
	* glade/evolution-startup-wizard.glade:
	* importer/import.glade: Use the icon theme via EIconFactory for all
	of the icons in the shell, and the window icons

svn path=/trunk/; revision=25512
---
 shell/evolution-shell-component-utils.c | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

(limited to 'shell/evolution-shell-component-utils.c')

diff --git a/shell/evolution-shell-component-utils.c b/shell/evolution-shell-component-utils.c
index 935b0f9973..08db23731c 100644
--- a/shell/evolution-shell-component-utils.c
+++ b/shell/evolution-shell-component-utils.c
@@ -24,7 +24,7 @@
 #endif
 
 #include "evolution-shell-component-utils.h"
-
+#include <e-util/e-icon-factory.h>
 #include "e-util/e-dialog-utils.h"
 
 #include <string.h>
@@ -53,23 +53,14 @@ void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache)
 
 	for (i = 0; pixcache [i].path; i++) {
 		if (!pixcache [i].pixbuf) {
-			char *path;
 			GdkPixbuf *pixbuf;
 
-			path = g_build_filename (EVOLUTION_IMAGES, pixcache [i].fname, NULL);
-
-			pixbuf = gdk_pixbuf_new_from_file (path, NULL);
-			if (pixbuf == NULL) {
-				g_warning ("Cannot load image -- %s", path);
-			} else {
-				pixcache [i].pixbuf = bonobo_ui_util_pixbuf_to_xml (pixbuf);
-				g_object_unref (pixbuf);
-				bonobo_ui_component_set_prop (uic,
-					pixcache [i].path, "pixname",
-					pixcache [i].pixbuf, NULL);
-			}
-
-			g_free (path);
+			pixbuf = e_icon_factory_get_icon (pixcache [i].name, pixcache [i].size);
+			pixcache [i].pixbuf = bonobo_ui_util_pixbuf_to_xml (pixbuf);
+			g_object_unref (pixbuf);
+			bonobo_ui_component_set_prop (uic,
+				pixcache [i].path, "pixname",
+				pixcache [i].pixbuf, NULL);
 		} else {
 			bonobo_ui_component_set_prop (uic, pixcache [i].path,
 						      "pixname",
-- 
cgit