Sync to F12 branch
This commit is contained in:
parent
8d78e0043a
commit
920f2d49c8
84
consider-logical-partitions.patch
Normal file
84
consider-logical-partitions.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
From dfa4b522b5c19c4723004baab3e54592f9875597 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Zeuthen <davidz@redhat.com>
|
||||||
|
Date: Thu, 1 Oct 2009 16:49:32 -0400
|
||||||
|
Subject: [PATCH] =?UTF-8?q?Bug=20597041=20=E2=80=93=20Manual=20umount=20triggers=20mount=20request?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
We also need to consider logical partitions when determining if a
|
||||||
|
drive should be ignored.
|
||||||
|
---
|
||||||
|
monitor/gdu/ggduvolumemonitor.c | 41 ++++++++++++++++++++++++++++++++++++++-
|
||||||
|
1 files changed, 40 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/monitor/gdu/ggduvolumemonitor.c b/monitor/gdu/ggduvolumemonitor.c
|
||||||
|
index ac90ba4..83d8fc2 100644
|
||||||
|
--- a/monitor/gdu/ggduvolumemonitor.c
|
||||||
|
+++ b/monitor/gdu/ggduvolumemonitor.c
|
||||||
|
@@ -871,7 +871,7 @@ should_drive_be_ignored (GduPool *pool, GduDrive *d, GList *fstab_mount_points)
|
||||||
|
|
||||||
|
/* never ignore a drive if it has volumes that we don't want to ignore */
|
||||||
|
enclosed = gdu_pool_get_enclosed_presentables (pool, GDU_PRESENTABLE (d));
|
||||||
|
- for (l = enclosed; l != NULL; l = l->next)
|
||||||
|
+ for (l = enclosed; l != NULL && all_volumes_are_ignored; l = l->next)
|
||||||
|
{
|
||||||
|
GduPresentable *enclosed_presentable = GDU_PRESENTABLE (l->data);
|
||||||
|
|
||||||
|
@@ -879,6 +879,7 @@ should_drive_be_ignored (GduPool *pool, GduDrive *d, GList *fstab_mount_points)
|
||||||
|
if (GDU_IS_VOLUME (enclosed_presentable))
|
||||||
|
{
|
||||||
|
GduVolume *volume = GDU_VOLUME (enclosed_presentable);
|
||||||
|
+ GduDevice *volume_device;
|
||||||
|
|
||||||
|
have_volumes = TRUE;
|
||||||
|
|
||||||
|
@@ -887,6 +888,44 @@ should_drive_be_ignored (GduPool *pool, GduDrive *d, GList *fstab_mount_points)
|
||||||
|
all_volumes_are_ignored = FALSE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ /* The volume may be an extended partition - we need to check all logical
|
||||||
|
+ * partitions as well (#597041)
|
||||||
|
+ */
|
||||||
|
+ volume_device = gdu_presentable_get_device (GDU_PRESENTABLE (volume));
|
||||||
|
+ if (volume_device != NULL)
|
||||||
|
+ {
|
||||||
|
+ if (g_strcmp0 (gdu_device_partition_get_scheme (volume_device), "mbr") == 0)
|
||||||
|
+ {
|
||||||
|
+ gint type;
|
||||||
|
+
|
||||||
|
+ type = strtol (gdu_device_partition_get_type (volume_device), NULL, 0);
|
||||||
|
+ if (type == 0x05 || type == 0x0f || type == 0x85)
|
||||||
|
+ {
|
||||||
|
+ GList *enclosed_logical;
|
||||||
|
+ GList *ll;
|
||||||
|
+
|
||||||
|
+ enclosed_logical = gdu_pool_get_enclosed_presentables (pool, GDU_PRESENTABLE (volume));
|
||||||
|
+ for (ll = enclosed_logical; ll != NULL && all_volumes_are_ignored; ll = ll->next)
|
||||||
|
+ {
|
||||||
|
+ GduPresentable *enclosed_logical_presentable = GDU_PRESENTABLE (ll->data);
|
||||||
|
+
|
||||||
|
+ if (GDU_IS_VOLUME (enclosed_logical_presentable))
|
||||||
|
+ {
|
||||||
|
+ if (!should_volume_be_ignored (pool,
|
||||||
|
+ GDU_VOLUME (enclosed_logical_presentable),
|
||||||
|
+ fstab_mount_points))
|
||||||
|
+ {
|
||||||
|
+ all_volumes_are_ignored = FALSE;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ g_list_foreach (enclosed_logical, (GFunc) g_object_unref, NULL);
|
||||||
|
+ g_list_free (enclosed_logical);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ g_object_unref (volume_device);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.6.4.4
|
||||||
|
|
||||||
|
|
26
gvfs-1.4.0-mountspec-from-string.patch
Normal file
26
gvfs-1.4.0-mountspec-from-string.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 7a430e4dc930115b620bf3aa2b9682ee1047dc48 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||||
|
Date: Thu, 8 Oct 2009 15:48:15 +0200
|
||||||
|
Subject: [PATCH] Fix creating mount_spec from string
|
||||||
|
|
||||||
|
Don't consume the ending character.
|
||||||
|
---
|
||||||
|
common/gmountspec.c | 2 +-
|
||||||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/common/gmountspec.c b/common/gmountspec.c
|
||||||
|
index c55f996..1a9a60a 100644
|
||||||
|
--- a/common/gmountspec.c
|
||||||
|
+++ b/common/gmountspec.c
|
||||||
|
@@ -514,7 +514,7 @@ g_mount_spec_new_from_string (const gchar *str,
|
||||||
|
if (colon)
|
||||||
|
{
|
||||||
|
item.key = g_strdup ("type");
|
||||||
|
- item.value = g_strndup (str, colon - str - 1);
|
||||||
|
+ item.value = g_strndup (str, colon - str);
|
||||||
|
g_array_append_val (items, item);
|
||||||
|
str = colon + 1;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.6.5.rc2
|
||||||
|
|
30
gvfs.spec
30
gvfs.spec
@ -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.4.0
|
Version: 1.4.0
|
||||||
Release: 1%{?dist}
|
Release: 4%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.gtk.org
|
URL: http://www.gtk.org
|
||||||
@ -34,9 +34,16 @@ Requires(postun): desktop-file-utils
|
|||||||
BuildRequires: automake autoconf
|
BuildRequires: automake autoconf
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
# http://bugzilla.gnome.org/show_bug.cgi?id=567235
|
# http://bugzilla.gnome.org/show_bug.cgi?id=567235
|
||||||
Patch1: gvfs-archive-integration.patch
|
Patch0: gvfs-archive-integration.patch
|
||||||
# http://bugzilla.gnome.org/show_bug.cgi?id=591005
|
# http://bugzilla.gnome.org/show_bug.cgi?id=591005
|
||||||
Patch10: 0001-Add-AFC-backend.patch
|
Patch1: 0001-Add-AFC-backend.patch
|
||||||
|
# from upstream
|
||||||
|
Patch2: http-icons.patch
|
||||||
|
# from upstream
|
||||||
|
Patch3: consider-logical-partitions.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=526892
|
||||||
|
# Nautilus not displaying friendly icons for SSH-connected system
|
||||||
|
Patch4: gvfs-1.4.0-mountspec-from-string.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The gvfs package provides backend implementations for the gio
|
The gvfs package provides backend implementations for the gio
|
||||||
@ -128,8 +135,11 @@ and iPod Touches to applications using gvfs.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .archive-integration
|
%patch0 -p1 -b .archive-integration
|
||||||
%patch10 -p1 -b .afc
|
%patch1 -p1 -b .afc
|
||||||
|
%patch2 -p1 -b .http-icons
|
||||||
|
%patch3 -p1 -b .logical-partitions
|
||||||
|
%patch4 -p1 -b .favicons
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -283,6 +293,16 @@ update-desktop-database &> /dev/null ||:
|
|||||||
%{_datadir}/gvfs/remote-volume-monitors/afc.monitor
|
%{_datadir}/gvfs/remote-volume-monitors/afc.monitor
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 8 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.4.0-4
|
||||||
|
- Fix Nautilus not displaying friendly icons for SSH-connected system (#526892)
|
||||||
|
- Actually apply the logical partitions patch
|
||||||
|
|
||||||
|
* Thu Oct 1 2009 Matthias Clasen <mclasen@redhat.com> - 1.4.0-3
|
||||||
|
- Consider logical partitions when deciding if a drive should be ignored
|
||||||
|
|
||||||
|
* Tue Sep 29 2009 Matthias Clasen <mclasen@redhat.com> - 1.4.0-2
|
||||||
|
- Fix the lack of icons in the http backend
|
||||||
|
|
||||||
* Mon Sep 21 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.4.0-1
|
* Mon Sep 21 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.4.0-1
|
||||||
- Update to 1.4.0
|
- Update to 1.4.0
|
||||||
|
|
||||||
|
91
http-icons.patch
Normal file
91
http-icons.patch
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c
|
||||||
|
index 45ea54d..97c6ce7 100644
|
||||||
|
--- a/daemon/gvfsbackendhttp.c
|
||||||
|
+++ b/daemon/gvfsbackendhttp.c
|
||||||
|
@@ -47,6 +47,7 @@
|
||||||
|
#include "gvfsjobqueryattributes.h"
|
||||||
|
#include "gvfsjobenumerate.h"
|
||||||
|
#include "gvfsdaemonprotocol.h"
|
||||||
|
+#include "gvfsdaemonutils.h"
|
||||||
|
|
||||||
|
#include "soup-input-stream.h"
|
||||||
|
|
||||||
|
@@ -539,10 +540,12 @@ query_info_ready (SoupSession *session,
|
||||||
|
const char *text;
|
||||||
|
GFileInfo *info;
|
||||||
|
char *basename;
|
||||||
|
+ char *ed_name;
|
||||||
|
|
||||||
|
job = G_VFS_JOB_QUERY_INFO (user_data);
|
||||||
|
info = job->file_info;
|
||||||
|
matcher = job->attribute_matcher;
|
||||||
|
+ ed_name = NULL;
|
||||||
|
|
||||||
|
if (! SOUP_STATUS_IS_SUCCESSFUL (msg->status_code))
|
||||||
|
{
|
||||||
|
@@ -562,30 +565,18 @@ query_info_ready (SoupSession *session,
|
||||||
|
g_file_attribute_matcher_matches (matcher,
|
||||||
|
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME))
|
||||||
|
{
|
||||||
|
- char *display_name = g_filename_display_name (basename);
|
||||||
|
-
|
||||||
|
- if (strstr (display_name, "\357\277\275") != NULL)
|
||||||
|
- {
|
||||||
|
- char *p = display_name;
|
||||||
|
- display_name = g_strconcat (display_name, _(" (invalid encoding)"), NULL);
|
||||||
|
- g_free (p);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- g_file_info_set_display_name (info, display_name);
|
||||||
|
- g_free (display_name);
|
||||||
|
+ ed_name = gvfs_file_info_populate_names_as_local (info, basename);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (basename != NULL &&
|
||||||
|
+ if (ed_name != NULL &&
|
||||||
|
g_file_attribute_matcher_matches (matcher,
|
||||||
|
G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME))
|
||||||
|
{
|
||||||
|
- char *edit_name = g_filename_display_name (basename);
|
||||||
|
- g_file_info_set_edit_name (info, edit_name);
|
||||||
|
- g_free (edit_name);
|
||||||
|
- }
|
||||||
|
+ g_file_info_set_edit_name (info, ed_name);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
g_free (basename);
|
||||||
|
-
|
||||||
|
+ g_free (ed_name);
|
||||||
|
|
||||||
|
text = soup_message_headers_get (msg->response_headers,
|
||||||
|
"Content-Length");
|
||||||
|
@@ -601,15 +592,22 @@ query_info_ready (SoupSession *session,
|
||||||
|
if (text)
|
||||||
|
{
|
||||||
|
char *p = strchr (text, ';');
|
||||||
|
+ char *tmp = NULL;
|
||||||
|
+ GIcon *icon;
|
||||||
|
|
||||||
|
if (p != NULL)
|
||||||
|
- {
|
||||||
|
- char *tmp = g_strndup (text, p - text);
|
||||||
|
- g_file_info_set_content_type (info, tmp);
|
||||||
|
- g_free (tmp);
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- g_file_info_set_content_type (info, text);
|
||||||
|
+ text = tmp = g_strndup (text, p - text);
|
||||||
|
+
|
||||||
|
+ g_file_info_set_file_type (info, G_FILE_TYPE_REGULAR);
|
||||||
|
+ g_file_info_set_content_type (info, text);
|
||||||
|
+ g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, text);
|
||||||
|
+
|
||||||
|
+ icon = g_content_type_get_icon (text);
|
||||||
|
+ g_file_info_set_icon (info, icon);
|
||||||
|
+ g_object_unref (icon);
|
||||||
|
+
|
||||||
|
+ g_free (tmp);
|
||||||
|
+
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user