- Expose device file attribute for all items in computer://
This commit is contained in:
parent
e4395f1c08
commit
bbb1bbec2f
39
gvfs-1.1.7-gdu-computer-expose-devices.patch
Normal file
39
gvfs-1.1.7-gdu-computer-expose-devices.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
diff -up gvfs-1.1.7/daemon/gvfsbackendcomputer.c.orig gvfs-1.1.7/daemon/gvfsbackendcomputer.c
|
||||||
|
--- gvfs-1.1.7/daemon/gvfsbackendcomputer.c.orig 2009-02-10 13:56:11.000000000 +0100
|
||||||
|
+++ gvfs-1.1.7/daemon/gvfsbackendcomputer.c 2009-03-09 16:07:22.000000000 +0100
|
||||||
|
@@ -595,11 +595,16 @@ try_open_for_read (GVfsBackend *backend,
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* TODO: push upstream */
|
||||||
|
+#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE "mountable::unix-device-file"
|
||||||
|
+
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
file_info_from_file (ComputerFile *file,
|
||||||
|
GFileInfo *info)
|
||||||
|
{
|
||||||
|
char *uri;
|
||||||
|
+ char *device_file = NULL;
|
||||||
|
|
||||||
|
g_file_info_set_name (info, file->filename);
|
||||||
|
g_file_info_set_display_name (info, file->display_name);
|
||||||
|
@@ -627,6 +632,18 @@ file_info_from_file (ComputerFile *file,
|
||||||
|
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, FALSE);
|
||||||
|
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, FALSE);
|
||||||
|
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH, FALSE);
|
||||||
|
+
|
||||||
|
+ if (file->volume)
|
||||||
|
+ /* Take volume as a precedence */
|
||||||
|
+ device_file = g_volume_get_identifier (file->volume, "unix-device");
|
||||||
|
+ else
|
||||||
|
+ if (file->drive)
|
||||||
|
+ device_file = g_drive_get_identifier (file->drive, "unix-device");
|
||||||
|
+ if (device_file)
|
||||||
|
+ {
|
||||||
|
+ g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE, device_file);
|
||||||
|
+ g_free (device_file);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Backends for the gio framework in GLib
|
Summary: Backends for the gio framework in GLib
|
||||||
Name: gvfs
|
Name: gvfs
|
||||||
Version: 1.1.7
|
Version: 1.1.7
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.gtk.org
|
URL: http://www.gtk.org
|
||||||
@ -37,6 +37,9 @@ Patch2: gvfs-gdu-volume-monitor-3.patch
|
|||||||
# http://bugzilla.gnome.org/show_bug.cgi?id=573826
|
# http://bugzilla.gnome.org/show_bug.cgi?id=573826
|
||||||
Patch3: gvfs-1.1.7-gdu-monitor-empty-drives.patch
|
Patch3: gvfs-1.1.7-gdu-monitor-empty-drives.patch
|
||||||
|
|
||||||
|
# http://bugzilla.gnome.org/show_bug.cgi?id=573826
|
||||||
|
Patch4: gvfs-1.1.7-gdu-computer-expose-devices.patch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The gvfs package provides backend implementations for the gio
|
The gvfs package provides backend implementations for the gio
|
||||||
@ -121,6 +124,7 @@ media players (Media Transfer Protocol) to applications using gvfs.
|
|||||||
%patch1 -p0 -b .archive-integration
|
%patch1 -p0 -b .archive-integration
|
||||||
%patch2 -p0 -b .gdu
|
%patch2 -p0 -b .gdu
|
||||||
%patch3 -p1 -b .gdu-volumes-typo
|
%patch3 -p1 -b .gdu-volumes-typo
|
||||||
|
%patch4 -p1 -b .computer-gdu
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -264,6 +268,9 @@ update-desktop-database &> /dev/null ||:
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 9 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.1.7-5
|
||||||
|
- Expose device file attribute for all items in computer://
|
||||||
|
|
||||||
* Fri Mar 6 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.1.7-4
|
* Fri Mar 6 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.1.7-4
|
||||||
- Fix volume lists not filled correctly
|
- Fix volume lists not filled correctly
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user