diff options
| author | Jannis Pohlmann <jannis@xfce.org> | 2009-09-03 13:30:14 +0200 |
|---|---|---|
| committer | Jannis Pohlmann <jannis@xfce.org> | 2009-09-03 13:33:17 +0200 |
| commit | 0164cdb934fb1c46a8d77dda6a6799f377b73fc3 (patch) | |
| tree | 25bf484c91adb3e84f6a893a8cd6d69d7d4680a3 | |
| parent | cf50dae28fb1fbe5c19b1e629608dcf917aa0683 (diff) | |
| download | thunar-0164cdb934fb1c46a8d77dda6a6799f377b73fc3.tar.gz | |
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.
| -rw-r--r-- | thunar/thunar-file.c | 4 | ||||
| -rw-r--r-- | thunar/thunar-io-jobs.c | 2 | ||||
| -rw-r--r-- | 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::*" /** |