rpms/pcmanfm/devel pcmanfm-0.5-icon-fallback.patch, NONE, 1.1 pcmanfm.spec, 1.23, 1.24

Mamoru Tasaka (mtasaka) fedora-extras-commits at redhat.com
Wed Jul 30 03:40:55 UTC 2008


Author: mtasaka

Update of /cvs/extras/rpms/pcmanfm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24412

Modified Files:
	pcmanfm.spec 
Added Files:
	pcmanfm-0.5-icon-fallback.patch 
Log Message:
* Wed Jul 30 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.5-3
- Mora fallback for gnome-icon-theme 2.23.X (F-10)


pcmanfm-0.5-icon-fallback.patch:

--- NEW FILE pcmanfm-0.5-icon-fallback.patch ---
--- pcmanfm-0.5/src/vfs/vfs-mime-type.c.debug	2008-07-30 10:34:54.000000000 +0900
+++ pcmanfm-0.5/src/vfs/vfs-mime-type.c	2008-07-30 12:34:35.000000000 +0900
@@ -278,6 +278,59 @@
         }
     }
 
+    /*
+	Ugly hack begin - For gnome-icon-theme 2.23.x
+    */
+
+    if (!icon)
+    {
+	char *mime_t = mime_type ->type;
+	if (strstr(mime_t, "audio/") == mime_t)
+		icon = vfs_load_icon ( icon_theme, "audio-x-generic", size );
+	if (strstr(mime_t, "image/") == mime_t)
+		icon = vfs_load_icon ( icon_theme, "image-x-generic", size );
+	if (strstr(mime_t, "text/") == mime_t)
+		icon = vfs_load_icon ( icon_theme, "text-x-generic", size );
+	if (strstr(mime_t, "video/") == mime_t)
+		icon = vfs_load_icon ( icon_theme, "video-x-generic", size );
+
+ 	if (strstr(mime_t, "-cert"))
+		icon = vfs_load_icon ( icon_theme, "application-certificate", size);
+	if (
+		strstr(mime_t, "-archive") ||
+		strstr(mime_t, "compressed") || 
+#if 1
+		strstr(mime_t, "gzip") ||
+		strstr(mime_t, "bzip2") ||
+#endif 
+		strstr(mime_t, "x-rpm") ||
+		strstr(mime_t, "x-tar")
+	)
+		icon = vfs_load_icon ( icon_theme, "package-x-generic", size);
+	if (strstr(mime_t, "/xml"))
+		icon = vfs_load_icon ( icon_theme, "text-x-generic", size);
+	if (strstr(mime_t, "/msword"))
+		icon = vfs_load_icon ( icon_theme, "x-office-document", size);
+	if (strstr(mime_t, "presentation"))
+		icon = vfs_load_icon ( icon_theme, "x-office-presentation", size);
+ 	if (
+		strstr(mime_t, "script") ||
+		strstr(mime_t, "x-perl") ||
+		strstr(mime_t, "x-ruby")
+	)
+		icon = vfs_load_icon ( icon_theme, "text-x-script", size);
+
+	if (strstr(mime_t, "opendocument"))
+		icon = vfs_load_icon ( icon_theme, "x-office-document", size);
+
+
+    }
+
+    /* fallback */
+    if (!icon)
+	icon = vfs_load_icon ( icon_theme, "gtk-file", size );
+
+
     if ( big )
         mime_type->big_icon = icon;
     else


Index: pcmanfm.spec
===================================================================
RCS file: /cvs/extras/rpms/pcmanfm/devel/pcmanfm.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- pcmanfm.spec	29 Jul 2008 16:31:36 -0000	1.23
+++ pcmanfm.spec	30 Jul 2008 03:40:25 -0000	1.24
@@ -3,7 +3,7 @@
 
 Name:		pcmanfm
 Version:	0.5
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Extremly fast and lightweight file manager
 
 Group:		User Interface/Desktops
@@ -11,6 +11,7 @@
 URL:		http://pcmanfm.sourceforge.net/
 Source0:	http://downloads.sourceforge.net/pcmanfm/%{name}-%{version}.tar.gz
 Patch0:		pcmanfm-0.5-kill-find-immediately.patch
+Patch1:		pcmanfm-0.5-icon-fallback.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	dbus-glib-devel
@@ -65,6 +66,7 @@
 replace_icon	gnome-mime-application-x-executable	\
 	application-x-executable
 
+%patch1 -p1 -b .icon_
 %endif
 
 # permission fix
@@ -132,6 +134,9 @@
 %{_datadir}/mime/packages/*.xml
 
 %changelog
+* Wed Jul 30 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.5-3
+- Mora fallback for gnome-icon-theme 2.23.X (F-10)
+
 * Tue Jul 29 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.5-2
 - F-10+: Use more generic icon name due to gnome-icon-theme 2.23.X change
   First try (need more fix)




More information about the fedora-extras-commits mailing list