Backport an upstream change thats needed for file-roller

This commit is contained in:
Matthias Clasen 2008-04-07 02:34:15 +00:00
parent 8da5f23030
commit f12ea03f2f
2 changed files with 91 additions and 1 deletions

View File

@ -19,7 +19,7 @@
Name: nautilus
Summary: Nautilus is a file manager for GNOME
Version: 2.22.1
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2+
Group: User Interface/Desktops
Source: http://download.gnome.org/sources/%{name}/2.22/%{name}-%{version}.tar.bz2
@ -89,6 +89,9 @@ Patch8: nautilus-2.22.1-hide-white-screen.patch
# patch from head
Patch9: nautilus-2.22.1-show-selinux.diff
# backport from upstream svn
Patch10: parent-info.patch
%description
Nautilus integrates access to files, applications, media,
@ -126,6 +129,7 @@ for writing nautilus extensions.
%patch7 -p1 -b .rtl-fix
%patch8 -p1 -b .hide-white-screen
%patch9 -p0 -b .selinux
%patch10 -p0 -b .parent-info
%build
@ -236,6 +240,9 @@ fi
%{_libdir}/*.so
%changelog
* Sun Apr 6 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.1-6
- Backport a patch from upstream svn thats needed for file-roller
* Fri Apr 4 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.1-5
- Fix beagle support some more

83
parent-info.patch Normal file
View File

@ -0,0 +1,83 @@
Index: libnautilus-private/nautilus-file.c
===================================================================
--- libnautilus-private/nautilus-file.c (revision 13949)
+++ libnautilus-private/nautilus-file.c (working copy)
@@ -7044,11 +7044,13 @@
iface->get_uri = nautilus_file_get_uri;
iface->get_parent_location = nautilus_file_get_parent_location;
iface->get_parent_uri = nautilus_file_get_parent_uri;
+ iface->get_parent_info = nautilus_file_get_parent;
iface->get_uri_scheme = nautilus_file_get_uri_scheme;
iface->get_activation_uri = nautilus_file_get_activation_uri;
iface->get_mime_type = nautilus_file_get_mime_type;
iface->is_mime_type = nautilus_file_is_mime_type;
iface->is_directory = nautilus_file_is_directory;
+ iface->can_write = nautilus_file_can_write;
iface->add_emblem = nautilus_file_add_emblem;
iface->get_string_attribute = nautilus_file_get_string_attribute;
iface->add_string_attribute = nautilus_file_add_string_attribute;
Index: libnautilus-extension/nautilus-file-info.c
===================================================================
--- libnautilus-extension/nautilus-file-info.c (revision 13949)
+++ libnautilus-extension/nautilus-file-info.c (working copy)
@@ -152,6 +152,15 @@
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_parent_uri (file);
}
+NautilusFileInfo *
+nautilus_file_info_get_parent_info (NautilusFileInfo *file)
+{
+ g_return_val_if_fail (NAUTILUS_IS_FILE_INFO (file), NULL);
+ g_return_val_if_fail (NAUTILUS_FILE_INFO_GET_IFACE (file)->get_parent_info != NULL, NULL);
+
+ return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_parent_info (file);
+}
+
char *
nautilus_file_info_get_uri_scheme (NautilusFileInfo *file)
{
@@ -191,6 +200,15 @@
return NAUTILUS_FILE_INFO_GET_IFACE (file)->is_directory (file);
}
+gboolean
+nautilus_file_info_can_write (NautilusFileInfo *file)
+{
+ g_return_val_if_fail (NAUTILUS_IS_FILE_INFO (file), FALSE);
+ g_return_val_if_fail (NAUTILUS_FILE_INFO_GET_IFACE (file)->can_write != NULL, FALSE);
+
+ return NAUTILUS_FILE_INFO_GET_IFACE (file)->can_write (file);
+}
+
void
nautilus_file_info_add_emblem (NautilusFileInfo *file,
const char *emblem_name)
Index: libnautilus-extension/nautilus-file-info.h
===================================================================
--- libnautilus-extension/nautilus-file-info.h (revision 13949)
+++ libnautilus-extension/nautilus-file-info.h (working copy)
@@ -78,6 +78,8 @@
GFileType (*get_file_type) (NautilusFileInfo *file);
GFile * (*get_location) (NautilusFileInfo *file);
GFile * (*get_parent_location) (NautilusFileInfo *file);
+ NautilusFileInfo* (*get_parent_info) (NautilusFileInfo *file);
+ gboolean (*can_write) (NautilusFileInfo *file);
};
@@ -96,6 +98,7 @@
char * nautilus_file_info_get_activation_uri (NautilusFileInfo *file);
GFile * nautilus_file_info_get_parent_location (NautilusFileInfo *file);
char * nautilus_file_info_get_parent_uri (NautilusFileInfo *file);
+NautilusFileInfo* nautilus_file_info_get_parent_info (NautilusFileInfo *file);
char * nautilus_file_info_get_uri_scheme (NautilusFileInfo *file);
/* File Type */
@@ -103,6 +106,7 @@
gboolean nautilus_file_info_is_mime_type (NautilusFileInfo *file,
const char *mime_type);
gboolean nautilus_file_info_is_directory (NautilusFileInfo *file);
+gboolean nautilus_file_info_can_write (NautilusFileInfo *file);
/* Modifying the NautilusFileInfo */