[Xfce4-commits] <thunar:master> Make restore from trash work again. Add trash::* to default attributes.
Jannis Pohlmann
jannis at xfce.org
Thu Sep 3 13:34:01 CEST 2009
Updating branch refs/heads/master
to 0164cdb934fb1c46a8d77dda6a6799f377b73fc3 (commit)
from cf50dae28fb1fbe5c19b1e629608dcf917aa0683 (commit)
commit 0164cdb934fb1c46a8d77dda6a6799f377b73fc3
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Thu Sep 3 13:30:14 2009 +0200
Make restore from trash work again. Add trash::* to default attributes.
This didn't work before for several reasons: the trash attribute
namespace was not part of THUNARX_FILE_INFO_NAMESPACE and Thunar tried
to read trash::orig-file but it's actually trash::orig-path. Last but
not least, this one is not a normal but a byte string attribute.
thunar/thunar-file.c | 4 ++--
thunar/thunar-io-jobs.c | 2 +-
thunarx/thunarx-file-info.h | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 9de713c..5149d4f 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -2280,8 +2280,8 @@ thunar_file_get_original_path (const ThunarFile *file)
if (file->info == NULL)
return NULL;
- if (g_file_info_has_attribute (file->info, "trash::orig-file"))
- return g_file_info_get_attribute_string (file->info, "trash::orig-file");
+ if (g_file_info_has_attribute (file->info, "trash::orig-path"))
+ return g_file_info_get_attribute_byte_string (file->info, "trash::orig-path");
else
return NULL;
}
diff --git a/thunar/thunar-io-jobs.c b/thunar/thunar-io-jobs.c
index 3238f4f..a6a43a8 100644
--- a/thunar/thunar-io-jobs.c
+++ b/thunar/thunar-io-jobs.c
@@ -690,7 +690,7 @@ thunar_io_jobs_restore_files (GList *source_file_list,
_thunar_return_val_if_fail (g_list_length (source_file_list) == g_list_length (target_file_list), NULL);
job = thunar_transfer_job_new (source_file_list, target_file_list,
- THUNAR_TRANSFER_JOB_MOVE);
+ THUNAR_TRANSFER_JOB_MOVE);
return THUNAR_JOB (exo_job_launch (EXO_JOB (job)));
}
diff --git a/thunarx/thunarx-file-info.h b/thunarx/thunarx-file-info.h
index 5c81c80..13a7001 100644
--- a/thunarx/thunarx-file-info.h
+++ b/thunarx/thunarx-file-info.h
@@ -44,6 +44,7 @@ G_BEGIN_DECLS;
"standard::*," \
"time::*," \
"thumbnail::*," \
+ "trash::*," \
"unix::*"
/**
More information about the Xfce4-commits
mailing list