[PATCH] Setting default window icon to "gnome-fs-directory"



Currently the default window icon i.e. if no icon is explicitly set is the nautilus shell. Most windows set their own icon, but some a.o. the unmount error dialog and the connect to server use the nautilus icon.

The nautilus icon does not really blend in with most themes. Therefore the attached patch changes this and uses "gnome-fs-directory" instead.

See also http://bugzilla.gnome.org/show_bug.cgi?id=153050


Jaap
Index: nautilus-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window.c,v
retrieving revision 1.438
diff -u -r1.438 nautilus-window.c
--- nautilus-window.c	22 Nov 2004 15:24:37 -0000	1.438
+++ nautilus-window.c	16 Jan 2005 22:09:29 -0000
@@ -124,37 +124,6 @@
 			 G_IMPLEMENT_INTERFACE (NAUTILUS_TYPE_WINDOW_INFO,
 						nautilus_window_info_iface_init));
 
-
-static void
-set_up_default_icon_list (void)
-{
-	GList *icon_list;
-	guint i;
-	GdkPixbuf *pixbuf;
-	char *path;
-	const char *icon_filenames[] = { "nautilus-mini-logo.png", "nautilus-launch-icon.png" };
-
-	icon_list = NULL;
-	for (i = 0; i < G_N_ELEMENTS (icon_filenames); i++) {
-		path = nautilus_pixmap_file (icon_filenames[i]);
-
-		if (path == NULL) {
-			continue;
-		}
-		
-		pixbuf = gdk_pixbuf_new_from_file (path, NULL);
-		g_free (path);
-		
-		if (pixbuf != NULL) {
-			icon_list = g_list_prepend (icon_list, pixbuf);
-		}
-	}
-
-	gtk_window_set_default_icon_list (icon_list);
-
-	eel_g_list_free_deep_custom (icon_list, (GFunc) g_object_unref, NULL);
-}
-
 static void
 icons_changed_callback (GObject *factory, NautilusWindow *window)
 {
@@ -1483,14 +1452,8 @@
 							      NAUTILUS_TYPE_APPLICATION,
 							      G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 	
-	/* Set default for all windows. This probably should be done
-	 * in main or NautilusApplication rather than here in case
-	 * some other window is created before the first
-	 * NautilusWindow. Also, do we really want this icon for
-	 * dialogs?
-	 */
-	set_up_default_icon_list ();
-
+        /* Set default icon for all NautilusWindows */
+	gtk_window_set_default_icon_name ("gnome-fs-directory");
 	
 	signals[GO_UP] =
 		g_signal_new ("go_up",


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