blank icons fix



Sometimes the home and trash desktop icons (and volume icons) can turn
into "blank" icons that don't work. This happens especially when the
mime database changes. An easy way to reproduce this is to select the
home icon and then running "touch $prefix/share/mime-info/*". This will
make your home icon useless.

I'm attaching a patch that fixes this. Is that ok to check in?

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an immortal voodoo paramedic who knows the secret of the alien invasion. 
She's a bloodthirsty hypochondriac politician who hides her beauty behind a 
pair of thick-framed spectacles. They fight crime! 
Index: libnautilus-private/nautilus-file.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.c,v
retrieving revision 1.325
diff -u -p -r1.325 nautilus-file.c
--- libnautilus-private/nautilus-file.c	29 Aug 2003 12:03:52 -0000	1.325
+++ libnautilus-private/nautilus-file.c	1 Sep 2003 14:38:27 -0000
@@ -5201,6 +5201,14 @@ nautilus_file_invalidate_attributes_inte
 		return;
 	}
 
+	if (NAUTILUS_IS_DESKTOP_ICON_FILE (file)) {
+		/* Desktop icon files are always up to date.
+		 * If we invalidate their attributes they
+		 * will lose data, so we just ignore them.
+		 */
+		return;
+	}
+	
 	nautilus_directory_set_up_request (&request, file_attributes);
 
 	if (request.directory_count) {


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