[PATCH] window icons do not use appropriate icons (again)



From my previous mail
<snip>
A while ago a patch was applied such that the window icon becomes the
trash icon when you open the trash folder and when you are in the
computer folder it uses the computer icon etc. Furthermore icons for
this were added in the places menu.
However the window icons use the 48 pixel icons (so they are blurry)
while the places icons use the 16 pixel icons
</snip>

Attached patch makes it automatically use the icon of the right size

Jaap


Index: nautilus-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window.c,v
retrieving revision 1.441
diff -u -r1.441 nautilus-window.c
--- nautilus-window.c	14 Feb 2005 10:59:23 -0000	1.441
+++ nautilus-window.c	19 Feb 2005 11:08:33 -0000
@@ -1076,28 +1076,19 @@
 void
 nautilus_window_update_icon (NautilusWindow *window)
 {
-	GdkPixbuf *pixbuf;
-        GtkIconTheme *icon_theme;
+	char *icon_name = NULL;
 
-	pixbuf = NULL;
-	
 	/* Desktop window special icon */
 	if (NAUTILUS_IS_DESKTOP_WINDOW (window)) {
-                icon_theme = nautilus_icon_factory_get_icon_theme ();
-                pixbuf = gtk_icon_theme_load_icon (icon_theme,
-						   "gnome-fs-desktop", 48,
-						   0, NULL);
-                g_object_unref(icon_theme);
-
+		icon_name = g_strdup ("gnome-fs-desktop");
 	} else {
-		pixbuf = nautilus_icon_factory_get_pixbuf_for_file (window->details->viewed_file,
-								    "open",
-								    NAUTILUS_ICON_SIZE_STANDARD);
+		icon_name = nautilus_icon_factory_get_icon_for_file (window->details->viewed_file,
+								     FALSE);
 	}
 
-	if (pixbuf != NULL) {
-		gtk_window_set_icon (GTK_WINDOW (window), pixbuf);
-		g_object_unref (pixbuf);
+	if (icon_name != NULL) {
+		gtk_window_set_icon_name (GTK_WINDOW (window), icon_name);
+		g_free (icon_name);
 	}
 }
 


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