Group :: Desktop gráfico/XFce
RPM: thunar
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: thunar-4.18.6-alt1.patch
Download
Download
thunar/thunar-file.c | 30 +++++++++++++++++++++++++++++-
thunar/thunar-thumbnailer.c | 3 ++-
thunarx/thunarx.symbols | 5 +++++
3 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 4b76508b..59963e41 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -50,6 +50,8 @@
#include <unistd.h>
#endif
+#include <sys/statfs.h>
+
#include <gio/gio.h>
#include <libxfce4ui/libxfce4ui.h>
#include <libxfce4util/libxfce4util.h>
@@ -3499,13 +3501,39 @@ thunar_file_is_renameable (const ThunarFile *file)
gboolean
thunar_file_can_be_trashed (const ThunarFile *file)
{
+ gboolean retval;
+
_thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
if (file->info == NULL)
return FALSE;
- return g_file_info_get_attribute_boolean (file->info,
+ retval = g_file_info_get_attribute_boolean (file->info,
G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH);
+ if (retval)
+ {
+ char *filepath;
+
+ filepath = g_file_get_path (file->gfile);
+ if (filepath != NULL)
+ {
+ struct statfs fs_info;
+
+ /* Don't try create trash on Windows and fuse filesystems. */
+ if (statfs (filepath, &fs_info) == 0 &&
+ (fs_info.f_type == 0x5346544E /* ntfs */
+ || fs_info.f_type == 0x4D44 /* msdos */
+ || fs_info.f_type == 0x4006 /* fat */
+ || fs_info.f_type == 0x65735546 /* fuseblk */
+ || fs_info.f_type == 0x6969 /* nfs */
+ || fs_info.f_type == 0xFF534D42)) /* cifs */
+ retval = FALSE;
+
+ g_free (filepath);
+ }
+ }
+
+ return retval;
}
diff --git a/thunar/thunar-thumbnailer.c b/thunar/thunar-thumbnailer.c
index 92c5025d..09d517f8 100644
--- a/thunar/thunar-thumbnailer.c
+++ b/thunar/thunar-thumbnailer.c
@@ -1154,7 +1154,8 @@ thunar_thumbnailer_queue_files (ThunarThumbnailer *thumbnailer,
if (success)
{
thumbnailer->jobs = g_slist_prepend (thumbnailer->jobs, job);
- *request = job->request;
+ if (request != NULL)
+ *request = job->request;
}
else
{
diff --git a/thunarx/thunarx.symbols b/thunarx/thunarx.symbols
index d4b5469c..f3d3616f 100644
--- a/thunarx/thunarx.symbols
+++ b/thunarx/thunarx.symbols
@@ -99,6 +99,11 @@ thunarx_provider_plugin_add_interface
thunarx_provider_plugin_register_enum
thunarx_provider_plugin_register_flags
+/* ThunarxProviderModule methods */
+thunarx_provider_module_get_type
+thunarx_provider_module_list_types
+thunarx_provider_module_new
+
/* ThunarxRenamer methods */
thunarx_renamer_get_type G_GNUC_CONST
thunarx_renamer_get_help_url