rpms/gvfs/devel gvfs-0.2.1-archive-integration.patch, NONE, 1.1 gvfs.spec, 1.35, 1.36

Alexander Larsson (alexl) fedora-extras-commits at redhat.com
Thu Mar 20 15:05:44 UTC 2008


Author: alexl

Update of /cvs/pkgs/rpms/gvfs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12189

Modified Files:
	gvfs.spec 
Added Files:
	gvfs-0.2.1-archive-integration.patch 
Log Message:
* Thu Mar 20 2008 Alexander Larsson <alexl at redhat.com> - 0.2.1-3
- Add patch with simple archive backend UI integration



gvfs-0.2.1-archive-integration.patch:

--- NEW FILE gvfs-0.2.1-archive-integration.patch ---
Index: daemon/gvfsbackendarchive.c
===================================================================
--- daemon/gvfsbackendarchive.c	(revision 1670)
+++ daemon/gvfsbackendarchive.c	(working copy)
@@ -45,6 +45,8 @@
 #include "gvfsdaemonutils.h"
 #include "gvfskeyring.h"
 
+#define MOUNT_ICON_NAME "drive-removable-media"
+
 /* #define PRINT_DEBUG  */
 
 #ifdef PRINT_DEBUG
@@ -291,11 +293,12 @@
 #define archive_file_find(ba, filename) archive_file_get_from_path((ba)->files, (filename) + 1, FALSE)
 
 static void
-create_root_file (GVfsBackendArchive *ba, GIcon *icon)
+create_root_file (GVfsBackendArchive *ba)
 {
   ArchiveFile *root = g_slice_new0 (ArchiveFile);
   GFileInfo *info;
   char *s, *display_name;
+  GIcon *icon;
 
   root = g_slice_new0 (ArchiveFile);
   root->name = g_strdup ("/");
@@ -319,7 +322,9 @@
   g_file_info_set_content_type (info, "inode/directory");
   g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, "inode/directory");
 
+  icon = g_themed_icon_new ("folder");
   g_file_info_set_icon (info, icon);
+  g_object_unref (icon);
 }
 
 static void
@@ -444,7 +449,9 @@
 	  ArchiveFile *file = archive_file_get_from_path (ba->files, 
 	                                                  archive_entry_pathname (entry), 
 							  TRUE);
-	  archive_file_set_info_from_entry (file, entry);
+          /* Don't set info for root */
+          if (file != ba->files)
+            archive_file_set_info_from_entry (file, entry);
 	  archive_read_data_skip (archive->archive);
 	}
     }
@@ -544,15 +551,10 @@
   g_vfs_backend_set_display_name (backend, g_file_info_get_display_name (info));
 
   icon = g_file_info_get_icon (info);
-#if 0
-  if (G_IS_THEMED_ICON (icon))
-    g_vfs_backend_set_icon_name (backend, 
-	                         g_themed_icon_get_names (G_THEMED_ICON (icon))[0]);
-  else
-#endif
-    g_vfs_backend_set_icon_name (backend, "package-x-generic");
 
-  create_root_file (archive, icon);
+  g_vfs_backend_set_icon_name (backend, MOUNT_ICON_NAME);
+
+  create_root_file (archive);
   create_file_tree (archive, G_VFS_JOB (job));
   g_object_unref (info);
 }
Index: mount-archive.desktop.in.in
===================================================================
--- mount-archive.desktop.in.in	(revision 0)
+++ mount-archive.desktop.in.in	(revision 0)
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Encoding=UTF-8
+_Name=Archive Mounter
+Exec=@libexecdir@/gvfsd-archive file=%u
+MimeType=application/x-cd-image;application/x-bzip-compressed-tar;application/x-compressed-tar;application/x-tar;application/x-cpio;application/x-zip;
+Terminal=false
+StartupNotify=false
+Type=Application
+NoDisplay=true
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=gvfs
+X-GNOME-Bugzilla-Component=archive-backend
+X-GNOME-Bugzilla-Version=@VERSION@
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 1670)
+++ Makefile.am	(working copy)
@@ -1,5 +1,20 @@
 NULL =
 
+ at INTLTOOL_DESKTOP_RULE@
+
+desktop_in_files = mount-archive.desktop.in
+
+mount-archive.desktop.in: mount-archive.desktop.in.in
+	sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
+
+desktopdir       = $(datadir)/applications
+if HAVE_ARCHIVE
+desktop_DATA     = mount-archive.desktop
+else
+desktop_DATA     = 
+endif	
+
+
 SUBDIRS = \
 	common \
 	client \
@@ -18,6 +33,8 @@
 
 EXTRA_DIST = \
 	MAINTAINERS		\
+	mount-archive.desktop.in.in \
+	$(desktop_in_files)     \
 	intltool-extract.in	\
 	intltool-merge.in	\
 	intltool-update.in	\


Index: gvfs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gvfs/devel/gvfs.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- gvfs.spec	19 Mar 2008 09:53:04 -0000	1.35
+++ gvfs.spec	20 Mar 2008 15:05:02 -0000	1.36
@@ -1,7 +1,7 @@
 Summary: Backends for the gio framework in GLib
 Name: gvfs
 Version: 0.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
@@ -28,6 +28,13 @@
 BuildRequires: libarchive-devel
 
 
+Requires(post): desktop-file-utils
+Requires(postun): desktop-file-utils
+
+# The patch touches Makefile.am files:
+BuildRequires: automake autoconf
+Patch1: gvfs-0.2.1-archive-integration.patch
+
 %description
 The gvfs package provides backend implementations for the gio 
 framework in GLib. It includes ftp, sftp, cifs. 
@@ -42,12 +49,16 @@
 required to develop applications using gvfs.
 
 
-
-
 %prep
 %setup -q
+%patch1 -p0 -b .archive-integration
 
 %build
+
+# Needed for gvfs-0.2.1-archive-integration.patch
+aclocal  || :
+automake  || :
+
 %configure 
 make # %{?_smp_mflags}
 
@@ -67,14 +78,20 @@
 /sbin/ldconfig
 # Reload .mount files:
 killall -USR1 gvfsd >&/dev/null || :
+# Update desktop files mime mappings:
+update-desktop-database &> /dev/null ||:
 
-%postun -p /sbin/ldconfig
+%postun
+/sbin/ldconfig
+# Update desktop files mime mappings:
+update-desktop-database &> /dev/null ||:
 
 %files -f gvfs.lang
 %defattr(-, root, root, -)
 %doc AUTHORS COPYING NEWS
 %dir %{_datadir}/gvfs
 %dir %{_datadir}/gvfs/mounts
+%dir %{_datadir}/applications/mount-archive.desktop
 %{_sysconfdir}/profile.d/gvfs-bash-completion.sh
 %{_datadir}/gvfs/mounts/sftp.mount
 %{_datadir}/gvfs/mounts/smb-browse.mount
@@ -141,6 +158,9 @@
 %{_libdir}/libgvfscommon.so
 
 %changelog
+* Thu Mar 20 2008 Alexander Larsson <alexl at redhat.com> - 0.2.1-3
+- Add patch with simple archive backend UI integration
+
 * Tue Mar 19 2008 Tomas Bzatek <tbzatek at redhat.com> - 0.2.1-2
 - Added libarchive dependency for archive backend
 - Require new libsmbclient in order to get smb backend working again




More information about the fedora-extras-commits mailing list