diff options
-rw-r--r-- | src/nautilus-file-operations-private.h | 20 | ||||
-rw-r--r-- | src/nautilus-file-operations.c | 4 |
2 files changed, 15 insertions, 9 deletions
diff --git a/src/nautilus-file-operations-private.h b/src/nautilus-file-operations-private.h index 5b7b553eb..141ef2aca 100644 --- a/src/nautilus-file-operations-private.h +++ b/src/nautilus-file-operations-private.h @@ -9,8 +9,19 @@ #include "nautilus-progress-info.h" #include "nautilus-file-undo-operations.h" +typedef enum +{ + OP_KIND_NOT_SET = 0, + OP_KIND_COPY, + OP_KIND_MOVE, + OP_KIND_DELETE, + OP_KIND_TRASH, + OP_KIND_COMPRESS +} OpKind; + typedef struct { + OpKind kind; GTimer *time; GtkWindow *parent_window; NautilusFileOperationsDBusData *dbus_data; @@ -86,15 +97,6 @@ typedef struct guint32 dir_mask; } SetPermissionsJob; -typedef enum -{ - OP_KIND_COPY, - OP_KIND_MOVE, - OP_KIND_DELETE, - OP_KIND_TRASH, - OP_KIND_COMPRESS -} OpKind; - typedef struct { CommonJob common; diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c index 064189fd7..f55bf48c2 100644 --- a/src/nautilus-file-operations.c +++ b/src/nautilus-file-operations.c @@ -2512,6 +2512,7 @@ setup_delete_job (GList *files, /* TODO: special case desktop icon link files ... */ job = op_job_new (DeleteJob, parent_window, dbus_data); + job->common.kind = try_trash ? OP_KIND_TRASH : OP_KIND_DELETE; job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL); job->try_trash = try_trash; job->user_cancel = FALSE; @@ -5832,6 +5833,7 @@ copy_job_setup (GList *files, g_autoptr (GFile) src_dir = NULL; job = op_job_new (CopyMoveJob, parent_window, dbus_data); + job->common.kind = OP_KIND_COPY; job->done_callback = done_callback; job->done_callback_data = done_callback_data; job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL); @@ -6461,6 +6463,7 @@ move_job_setup (GList *files, CopyMoveJob *job; job = op_job_new (CopyMoveJob, parent_window, dbus_data); + job->common.kind = OP_KIND_MOVE; job->is_move = TRUE; job->done_callback = done_callback; job->done_callback_data = done_callback_data; @@ -8818,6 +8821,7 @@ nautilus_file_operations_compress (GList *files, CompressJob *compress_job; compress_job = op_job_new (CompressJob, parent_window, dbus_data); + compress_job->common.kind = OP_KIND_COMPRESS; compress_job->source_files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL); |