Re: [PATCH] Setting default window icon to 'gnome-fs-directory'



The better way to do it.

Index: nautilus-main.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-main.c,v
retrieving revision 1.140
diff -u -r1.140 nautilus-main.c
--- nautilus-main.c	12 Jan 2005 09:37:15 -0000	1.140
+++ nautilus-main.c	17 Jan 2005 19:40:11 -0000
@@ -263,6 +263,9 @@
 				      NULL);
 
 	register_icons ();
+
+        /* Set default icon for all nautilus windows */
+	gtk_window_set_default_icon_name ("gnome-fs-directory");
 	
 	/* Need to set this to the canonical DISPLAY value, since
 	   thats where we're registering per-display components */
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	17 Jan 2005 19:40:13 -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,15 +1452,6 @@
 							      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 ();
-
-	
 	signals[GO_UP] =
 		g_signal_new ("go_up",
 			      G_TYPE_FROM_CLASS (class),


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