[Nautilus-list] [PATCH] handling icon for mime types


	this this patch makes nautilus get the correct icon when an icon
different from the standard has been selected for a mime type or when
the applications that handle that type haven been changed from the mime
types capplet. (hope it is clear enough).

	as an example of what i'm meaning: 

	a) from the mime types capplet select and application different from
the default one to handle a certain type of mime type, 
	b) restart nautilus (so that the mime database is reloaded, this is
another bug)
	c) know, you should see the default white icon for the mime type that
you just modified, even thought you didn't change it specifically.

	the patch fixes this behavior


Index: ChangeLog
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5210
diff -u -r1.5210 ChangeLog
--- ChangeLog	19 Apr 2002 22:28:45 -0000	1.5210
+++ ChangeLog	20 Apr 2002 14:44:04 -0000
@@ -1,3 +1,10 @@
+2002-04-20	Diego Gonzalez  <diego pemas net>
+	* libnautilus-private/nautilus-find-icon-image.c (make_full_icon_path):
+	  if the path is not partial also check that the icon exists with the
+	  suffix passed. With this we are able to see the correct icons when they
+	  are not themed given with a whole path.
 2002-04-20  Anders Carlsson  <andersca gnu org>
 	* configure.in:
Index: libnautilus-private/nautilus-find-icon-image.c
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-find-icon-image.c,v
retrieving revision 1.12
diff -u -r1.12 nautilus-find-icon-image.c
--- libnautilus-private/nautilus-find-icon-image.c	28 Feb 2002 05:59:26 -0000	1.12
+++ libnautilus-private/nautilus-find-icon-image.c	20 Apr 2002 14:44:04 -0000
@@ -56,7 +56,7 @@
 	partial_path = g_strconcat (path, suffix, NULL);
-	if (path[0] == '/') {
+	if (path[0] == '/' && g_file_test (partial_path, G_FILE_TEST_EXISTS)) {
 		return partial_path;

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