[PATCH] Use desktop icon from theme



Notes:
      * this patch use 48 pixel but it seems that the.... the....
        "switcher appearing when you use Alt-Tab" uses a smaller size
        :-|
      * the gnome_icon_theme_lookup_icon func seems undocumented in
        gtk-doc, so I hope it's the proper way to use it :-X

PS: I forgot to remove nautilus-desktop.png from Makefile.am :-(
diff -Naur nautilus/src/nautilus-window-manage-views.c nautilus-new/src/nautilus-window-manage-views.c
--- nautilus/src/nautilus-window-manage-views.c	2003-10-11 21:23:17.000000000 +0200
+++ nautilus-new/src/nautilus-window-manage-views.c	2003-10-11 21:28:36.000000000 +0200
@@ -51,6 +51,7 @@
 #include <gdk/gdkx.h>
 #include <libgnome/gnome-i18n.h>
 #include <libgnomeui/gnome-dialog-util.h>
+#include <libgnomeui/gnome-icon-theme.h>
 #include <libgnomevfs/gnome-vfs-async-ops.h>
 #include <libgnomevfs/gnome-vfs-uri.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
@@ -275,17 +276,22 @@
 {
 	char *path;
 	GdkPixbuf *pixbuf;
+        GnomeIconTheme *icon_theme;
 
 	pixbuf = NULL;
 	
 	/* Desktop window special icon */
 	if (NAUTILUS_IS_DESKTOP_WINDOW (window)) {
-		path = nautilus_pixmap_file ("nautilus-desktop.png");
+                icon_theme = gnome_icon_theme_new ();
+                path = gnome_icon_theme_lookup_icon (icon_theme,
+                                                     "gnome-fs-desktop", 48,
+                                                     NULL, NULL);
 
 		if (path != NULL) {
 			pixbuf = gdk_pixbuf_new_from_file (path, NULL);
 			
 			g_free (path);
+                        g_free (icon_theme);
 		}
 	} else {
 		pixbuf = nautilus_icon_factory_get_pixbuf_for_file (window->details->viewed_file,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]