[nautilus/wip/muktupavels/delete: 2/4] file-operations: add parent_handle and timestamp parameters



commit 1d153bf0ba42d0ba64a5662a3a3b5e39aa2c4c49
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Dec 18 23:34:22 2019 +0200

    file-operations: add parent_handle and timestamp parameters
    
    Update all API that is used by D-Bus interface to accept also
    parent_handle and timestamp parameters.
    
    https://gitlab.gnome.org/GNOME/nautilus/merge_requests/504

 src/nautilus-dbus-manager.c                 |  17 ++-
 src/nautilus-file-operations.c              |  94 +++++++++++---
 src/nautilus-file-operations.h              |  24 +++-
 src/nautilus-file-undo-manager.c            |  17 ++-
 src/nautilus-file-undo-manager.h            |   8 +-
 src/nautilus-file-undo-operations.c         | 193 +++++++++++++++++++++-------
 src/nautilus-file-undo-operations.h         |  10 +-
 src/nautilus-files-view.c                   |  14 +-
 src/nautilus-mime-actions.c                 |   1 +
 src/nautilus-trash-bar.c                    |   2 +-
 src/nautilus-window.c                       |  10 +-
 test/automated/displayless/test-utilities.c |   6 +-
 test/interactive/test-copy.c                |   2 +
 13 files changed, 305 insertions(+), 93 deletions(-)
---
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
index 43f27e10a..e0075d94b 100644
--- a/src/nautilus-dbus-manager.c
+++ b/src/nautilus-dbus-manager.c
@@ -80,7 +80,7 @@ handle_redo (NautilusDBusFileOperations *object,
     *handler_id = g_signal_connect_swapped (undo_manager, "undo-changed",
                                             G_CALLBACK (undo_redo_on_finished),
                                             handler_id);
-    nautilus_file_undo_manager_redo (NULL);
+    nautilus_file_undo_manager_redo (NULL, NULL, 0);
 
     nautilus_dbus_file_operations_complete_redo (object, invocation);
     return TRUE; /* invocation was handled */
@@ -99,7 +99,7 @@ handle_undo (NautilusDBusFileOperations *object,
     *handler_id = g_signal_connect_swapped (undo_manager, "undo-changed",
                                             G_CALLBACK (undo_redo_on_finished),
                                             handler_id);
-    nautilus_file_undo_manager_undo (NULL);
+    nautilus_file_undo_manager_undo (NULL, NULL, 0);
 
     nautilus_dbus_file_operations_complete_undo (object, invocation);
     return TRUE; /* invocation was handled */
@@ -129,7 +129,8 @@ handle_create_folder (NautilusDBusFileOperations *object,
     parent_file_uri = g_file_get_uri (parent_file);
 
     g_application_hold (g_application_get_default ());
-    nautilus_file_operations_new_folder (NULL, parent_file_uri, basename,
+    nautilus_file_operations_new_folder (NULL, NULL, 0,
+                                         parent_file_uri, basename,
                                          create_folder_on_finished, NULL);
 
     nautilus_dbus_file_operations_complete_create_folder (object, invocation);
@@ -160,7 +161,8 @@ handle_copy_uris (NautilusDBusFileOperations  *object,
 
     g_application_hold (g_application_get_default ());
     nautilus_file_operations_copy_move (source_files, destination,
-                                        GDK_ACTION_COPY, NULL, copy_move_on_finished, NULL);
+                                        GDK_ACTION_COPY, NULL, NULL, 0,
+                                        copy_move_on_finished, NULL);
 
     g_list_free_full (source_files, g_free);
     nautilus_dbus_file_operations_complete_copy_uris (object, invocation);
@@ -183,7 +185,8 @@ handle_move_uris (NautilusDBusFileOperations  *object,
 
     g_application_hold (g_application_get_default ());
     nautilus_file_operations_copy_move (source_files, destination,
-                                        GDK_ACTION_MOVE, NULL, copy_move_on_finished, NULL);
+                                        GDK_ACTION_MOVE, NULL, NULL, 0,
+                                        copy_move_on_finished, NULL);
 
     g_list_free_full (source_files, g_free);
     nautilus_dbus_file_operations_complete_copy_uris (object, invocation);
@@ -195,7 +198,7 @@ static gboolean
 handle_empty_trash (NautilusDBusFileOperations *object,
                     GDBusMethodInvocation      *invocation)
 {
-    nautilus_file_operations_empty_trash (NULL);
+    nautilus_file_operations_empty_trash (NULL, NULL, 0);
 
     nautilus_dbus_file_operations_complete_empty_trash (object, invocation);
     return TRUE; /* invocation was handled */
@@ -224,7 +227,7 @@ handle_trash_files (NautilusDBusFileOperations  *object,
     }
 
     g_application_hold (g_application_get_default ());
-    nautilus_file_operations_trash_or_delete_async (source_files, NULL,
+    nautilus_file_operations_trash_or_delete_async (source_files, NULL, NULL, 0,
                                                     trash_on_finished, NULL);
 
     nautilus_dbus_file_operations_complete_trash_files (object, invocation);
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index c99269077..a148b35be 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -266,11 +266,6 @@ static void empty_trash_task_done (GObject      *source_object,
 
 static char *query_fs_type (GFile        *file,
                             GCancellable *cancellable);
-static CopyMoveJob *copy_job_setup (GList *files,
-                                    GFile *target_dir,
-                                    GtkWindow *parent_window,
-                                    NautilusCopyCallback done_callback,
-                                    gpointer done_callback_data);
 
 static void nautilus_file_operations_copy (GTask        *task,
                                            gpointer      source_object,
@@ -2576,6 +2571,8 @@ trash_or_delete_internal (GTask        *task,
 static DeleteJob *
 setup_delete_job (GList                  *files,
                   GtkWindow              *parent_window,
+                  const char             *parent_handle,
+                  guint32                 timestamp,
                   gboolean                try_trash,
                   NautilusDeleteCallback  done_callback,
                   gpointer                done_callback_data)
@@ -2583,7 +2580,7 @@ setup_delete_job (GList                  *files,
     DeleteJob *job;
 
     /* TODO: special case desktop icon link files ... */
-    job = op_job_new (DeleteJob, parent_window, NULL, 0);
+    job = op_job_new (DeleteJob, parent_window, parent_handle, timestamp);
     job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
     job->try_trash = try_trash;
     job->user_cancel = FALSE;
@@ -2613,6 +2610,8 @@ setup_delete_job (GList                  *files,
 static void
 trash_or_delete_internal_sync (GList                  *files,
                                GtkWindow              *parent_window,
+                               const char             *parent_handle,
+                               guint32                 timestamp,
                                gboolean                try_trash)
 {
     GTask *task;
@@ -2620,6 +2619,8 @@ trash_or_delete_internal_sync (GList                  *files,
 
     job = setup_delete_job (files,
                             parent_window,
+                            parent_handle,
+                            timestamp,
                             try_trash,
                             NULL,
                             NULL);
@@ -2637,6 +2638,8 @@ trash_or_delete_internal_sync (GList                  *files,
 static void
 trash_or_delete_internal_async (GList                  *files,
                                 GtkWindow              *parent_window,
+                                const char             *parent_handle,
+                                guint32                 timestamp,
                                 gboolean                try_trash,
                                 NautilusDeleteCallback  done_callback,
                                 gpointer                done_callback_data)
@@ -2646,6 +2649,8 @@ trash_or_delete_internal_async (GList                  *files,
 
     job = setup_delete_job (files,
                             parent_window,
+                            parent_handle,
+                            timestamp,
                             try_trash,
                             done_callback,
                             done_callback_data);
@@ -2659,22 +2664,26 @@ trash_or_delete_internal_async (GList                  *files,
 void
 nautilus_file_operations_trash_or_delete_sync (GList                  *files)
 {
-    trash_or_delete_internal_sync (files, NULL, TRUE);
+    trash_or_delete_internal_sync (files, NULL, NULL, 0, TRUE);
 }
 
 void
 nautilus_file_operations_delete_sync (GList                  *files)
 {
-    trash_or_delete_internal_sync (files, NULL, FALSE);
+    trash_or_delete_internal_sync (files, NULL, NULL, 0, FALSE);
 }
 
 void
 nautilus_file_operations_trash_or_delete_async (GList                  *files,
                                                 GtkWindow              *parent_window,
+                                                const char             *parent_handle,
+                                                guint32                 timestamp,
                                                 NautilusDeleteCallback  done_callback,
                                                 gpointer                done_callback_data)
 {
     trash_or_delete_internal_async (files, parent_window,
+                                    parent_handle,
+                                    timestamp,
                                     TRUE,
                                     done_callback, done_callback_data);
 }
@@ -2682,10 +2691,14 @@ nautilus_file_operations_trash_or_delete_async (GList                  *files,
 void
 nautilus_file_operations_delete_async (GList                  *files,
                                        GtkWindow              *parent_window,
+                                       const char             *parent_handle,
+                                       guint32                 timestamp,
                                        NautilusDeleteCallback  done_callback,
                                        gpointer                done_callback_data)
 {
     trash_or_delete_internal_async (files, parent_window,
+                                    parent_handle,
+                                    timestamp,
                                     FALSE,
                                     done_callback, done_callback_data);
 }
@@ -5759,12 +5772,14 @@ static CopyMoveJob *
 copy_job_setup (GList *files,
                 GFile *target_dir,
                 GtkWindow *parent_window,
+                const char *parent_handle,
+                guint32 timestamp,
                 NautilusCopyCallback done_callback,
                 gpointer done_callback_data)
 {
     CopyMoveJob *job;
 
-    job = op_job_new (CopyMoveJob, parent_window, NULL, 0);
+    job = op_job_new (CopyMoveJob, parent_window, parent_handle, timestamp);
     job->done_callback = done_callback;
     job->done_callback_data = done_callback_data;
     job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
@@ -5866,6 +5881,8 @@ nautilus_file_operations_copy_sync (GList *files,
                            target_dir,
                            NULL,
                            NULL,
+                           0,
+                           NULL,
                            NULL);
 
     task = g_task_new (NULL, job->common.cancellable, NULL, job);
@@ -5882,6 +5899,8 @@ void
 nautilus_file_operations_copy_async (GList                *files,
                                      GFile                *target_dir,
                                      GtkWindow            *parent_window,
+                                     const char           *parent_handle,
+                                     guint32               timestamp,
                                      NautilusCopyCallback  done_callback,
                                      gpointer              done_callback_data)
 {
@@ -5891,6 +5910,8 @@ nautilus_file_operations_copy_async (GList                *files,
     job = copy_job_setup (files,
                            target_dir,
                            parent_window,
+                           parent_handle,
+                           timestamp,
                            done_callback,
                            done_callback_data);
 
@@ -6359,12 +6380,14 @@ static CopyMoveJob *
 move_job_setup (GList                *files,
                 GFile                *target_dir,
                 GtkWindow            *parent_window,
+                const char           *parent_handle,
+                guint32               timestamp,
                 NautilusCopyCallback  done_callback,
                 gpointer              done_callback_data)
 {
     CopyMoveJob *job;
 
-    job = op_job_new (CopyMoveJob, parent_window, NULL, 0);
+    job = op_job_new (CopyMoveJob, parent_window, parent_handle, timestamp);
     job->is_move = TRUE;
     job->done_callback = done_callback;
     job->done_callback_data = done_callback_data;
@@ -6386,7 +6409,7 @@ nautilus_file_operations_move_sync (GList                *files,
     GTask *task;
     CopyMoveJob *job;
 
-    job = move_job_setup (files, target_dir, NULL, NULL, NULL);
+    job = move_job_setup (files, target_dir, NULL, NULL, 0, NULL, NULL);
     task = g_task_new (NULL, job->common.cancellable, NULL, job);
     g_task_set_task_data (task, job, NULL);
     g_task_run_in_thread_sync (task, nautilus_file_operations_move);
@@ -6401,13 +6424,22 @@ void
 nautilus_file_operations_move_async (GList                *files,
                                      GFile                *target_dir,
                                      GtkWindow            *parent_window,
+                                     const char           *parent_handle,
+                                     guint32               timestamp,
                                      NautilusCopyCallback  done_callback,
                                      gpointer              done_callback_data)
 {
     GTask *task;
     CopyMoveJob *job;
 
-    job = move_job_setup (files, target_dir, parent_window, done_callback, done_callback_data);
+    job = move_job_setup (files,
+                          target_dir,
+                          parent_window,
+                          parent_handle,
+                          timestamp,
+                          done_callback,
+                          done_callback_data);
+
     task = g_task_new (NULL, job->common.cancellable, move_task_done, job);
     g_task_set_task_data (task, job, NULL);
     g_task_run_in_thread (task, nautilus_file_operations_move);
@@ -6812,13 +6844,15 @@ void
 nautilus_file_operations_link (GList                *files,
                                GFile                *target_dir,
                                GtkWindow            *parent_window,
+                               const char           *parent_handle,
+                               guint32               timestamp,
                                NautilusCopyCallback  done_callback,
                                gpointer              done_callback_data)
 {
     g_autoptr (GTask) task = NULL;
     CopyMoveJob *job;
 
-    job = op_job_new (CopyMoveJob, parent_window, NULL, 0);
+    job = op_job_new (CopyMoveJob, parent_window, parent_handle, timestamp);
     job->done_callback = done_callback;
     job->done_callback_data = done_callback_data;
     job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
@@ -6847,6 +6881,8 @@ nautilus_file_operations_link (GList                *files,
 void
 nautilus_file_operations_duplicate (GList                *files,
                                     GtkWindow            *parent_window,
+                                    const char           *parent_handle,
+                                    guint32               timestamp,
                                     NautilusCopyCallback  done_callback,
                                     gpointer              done_callback_data)
 {
@@ -6854,7 +6890,7 @@ nautilus_file_operations_duplicate (GList                *files,
     CopyMoveJob *job;
     g_autoptr (GFile) parent = NULL;
 
-    job = op_job_new (CopyMoveJob, parent_window, NULL, 0);
+    job = op_job_new (CopyMoveJob, parent_window, parent_handle, timestamp);
     job->done_callback = done_callback;
     job->done_callback_data = done_callback_data;
     job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
@@ -7109,6 +7145,8 @@ nautilus_file_operations_copy_move (const GList          *item_uris,
                                     const char           *target_dir,
                                     GdkDragAction         copy_action,
                                     GtkWidget            *parent_view,
+                                    const char           *parent_handle,
+                                    guint32               timestamp,
                                     NautilusCopyCallback  done_callback,
                                     gpointer              done_callback_data)
 {
@@ -7165,6 +7203,8 @@ nautilus_file_operations_copy_move (const GList          *item_uris,
         {
             nautilus_file_operations_duplicate (locations,
                                                 parent_window,
+                                                parent_handle,
+                                                timestamp,
                                                 done_callback, done_callback_data);
         }
         else
@@ -7172,6 +7212,8 @@ nautilus_file_operations_copy_move (const GList          *item_uris,
             nautilus_file_operations_copy_async (locations,
                                                  dest,
                                                  parent_window,
+                                                 parent_handle,
+                                                 timestamp,
                                                  done_callback, done_callback_data);
         }
         if (src_dir)
@@ -7191,6 +7233,8 @@ nautilus_file_operations_copy_move (const GList          *item_uris,
 
             nautilus_file_operations_trash_or_delete_async (locations,
                                                             parent_window,
+                                                            parent_handle,
+                                                            timestamp,
                                                             (NautilusDeleteCallback) 
callback_for_move_to_trash,
                                                             cb_data);
         }
@@ -7199,6 +7243,8 @@ nautilus_file_operations_copy_move (const GList          *item_uris,
             nautilus_file_operations_move_async (locations,
                                                  dest,
                                                  parent_window,
+                                                 parent_handle,
+                                                 timestamp,
                                                  done_callback, done_callback_data);
         }
     }
@@ -7207,6 +7253,8 @@ nautilus_file_operations_copy_move (const GList          *item_uris,
         nautilus_file_operations_link (locations,
                                        dest,
                                        parent_window,
+                                       parent_handle,
+                                       timestamp,
                                        done_callback, done_callback_data);
     }
 
@@ -7640,6 +7688,8 @@ retry:
 
 void
 nautilus_file_operations_new_folder (GtkWidget              *parent_view,
+                                     const char             *parent_handle,
+                                     guint32                 timestamp,
                                      const char             *parent_dir,
                                      const char             *folder_name,
                                      NautilusCreateCallback  done_callback,
@@ -7655,7 +7705,7 @@ nautilus_file_operations_new_folder (GtkWidget              *parent_view,
         parent_window = (GtkWindow *) gtk_widget_get_ancestor (parent_view, GTK_TYPE_WINDOW);
     }
 
-    job = op_job_new (CreateJob, parent_window, NULL, 0);
+    job = op_job_new (CreateJob, parent_window, parent_handle, timestamp);
     job->done_callback = done_callback;
     job->done_callback_data = done_callback_data;
     job->dest_dir = g_file_new_for_uri (parent_dir);
@@ -7851,7 +7901,9 @@ empty_trash_thread_func (GTask        *task,
 }
 
 void
-nautilus_file_operations_empty_trash (GtkWidget *parent_view)
+nautilus_file_operations_empty_trash (GtkWidget  *parent_view,
+                                      const char *parent_handle,
+                                      guint32     timestamp)
 {
     g_autoptr (GTask) task = NULL;
     EmptyTrashJob *job;
@@ -7863,7 +7915,7 @@ nautilus_file_operations_empty_trash (GtkWidget *parent_view)
         parent_window = (GtkWindow *) gtk_widget_get_ancestor (parent_view, GTK_TYPE_WINDOW);
     }
 
-    job = op_job_new (EmptyTrashJob, parent_window, NULL, 0);
+    job = op_job_new (EmptyTrashJob, parent_window, parent_handle, timestamp);
     job->trash_dirs = g_list_prepend (job->trash_dirs,
                                       g_file_new_for_uri ("trash:"));
     job->should_confirm = TRUE;
@@ -8307,13 +8359,15 @@ void
 nautilus_file_operations_extract_files (GList                   *files,
                                         GFile                   *destination_directory,
                                         GtkWindow               *parent_window,
+                                        const char              *parent_handle,
+                                        guint32                  timestamp,
                                         NautilusExtractCallback  done_callback,
                                         gpointer                 done_callback_data)
 {
     ExtractJob *extract_job;
     g_autoptr (GTask) task = NULL;
 
-    extract_job = op_job_new (ExtractJob, parent_window, NULL, 0);
+    extract_job = op_job_new (ExtractJob, parent_window, parent_handle, timestamp);
     extract_job->source_files = g_list_copy_deep (files,
                                                   (GCopyFunc) g_object_ref,
                                                   NULL);
@@ -8656,13 +8710,15 @@ nautilus_file_operations_compress (GList                  *files,
                                    AutoarFormat            format,
                                    AutoarFilter            filter,
                                    GtkWindow              *parent_window,
+                                   const char             *parent_handle,
+                                   guint32                 timestamp,
                                    NautilusCreateCallback  done_callback,
                                    gpointer                done_callback_data)
 {
     g_autoptr (GTask) task = NULL;
     CompressJob *compress_job;
 
-    compress_job = op_job_new (CompressJob, parent_window, NULL, 0);
+    compress_job = op_job_new (CompressJob, parent_window, parent_handle, timestamp);
     compress_job->source_files = g_list_copy_deep (files,
                                                    (GCopyFunc) g_object_ref,
                                                    NULL);
diff --git a/src/nautilus-file-operations.h b/src/nautilus-file-operations.h
index c9f0ae79a..b1bf0dbf4 100644
--- a/src/nautilus-file-operations.h
+++ b/src/nautilus-file-operations.h
@@ -54,10 +54,16 @@ void nautilus_file_operations_copy_move   (const GList               *item_uris,
                                           const char                *target_dir_uri,
                                           GdkDragAction              copy_action,
                                           GtkWidget                 *parent_view,
+                                          const char                *parent_handle,
+                                          guint32                    timestamp,
                                           NautilusCopyCallback       done_callback,
                                           gpointer                   done_callback_data);
-void nautilus_file_operations_empty_trash (GtkWidget                 *parent_view);
+void nautilus_file_operations_empty_trash (GtkWidget                 *parent_view,
+                                          const char                *parent_handle,
+                                          guint32                    timestamp);
 void nautilus_file_operations_new_folder  (GtkWidget                 *parent_view,
+                                          const char                *parent_handle,
+                                          guint32                    timestamp,
                                           const char                *parent_dir_uri,
                                           const char                *folder_name,
                                           NautilusCreateCallback     done_callback,
@@ -80,10 +86,14 @@ void nautilus_file_operations_trash_or_delete_sync (GList                  *file
 void nautilus_file_operations_delete_sync (GList                  *files);
 void nautilus_file_operations_trash_or_delete_async (GList                  *files,
                                                      GtkWindow              *parent_window,
+                                                     const char             *parent_handle,
+                                                     guint32                 timestamp,
                                                      NautilusDeleteCallback  done_callback,
                                                      gpointer                done_callback_data);
 void nautilus_file_operations_delete_async (GList                  *files,
                                             GtkWindow              *parent_window,
+                                            const char             *parent_handle,
+                                            guint32                 timestamp,
                                             NautilusDeleteCallback  done_callback,
                                             gpointer                done_callback_data);
 
@@ -117,6 +127,8 @@ void nautilus_file_operations_mount_volume_full (GtkWindow
 void nautilus_file_operations_copy_async (GList                *files,
                                           GFile                *target_dir,
                                           GtkWindow            *parent_window,
+                                          const char           *parent_handle,
+                                          guint32               timestamp,
                                           NautilusCopyCallback  done_callback,
                                           gpointer              done_callback_data);
 void nautilus_file_operations_copy_sync (GList                *files,
@@ -125,6 +137,8 @@ void nautilus_file_operations_copy_sync (GList                *files,
 void nautilus_file_operations_move_async (GList                *files,
                                           GFile                *target_dir,
                                           GtkWindow            *parent_window,
+                                          const char           *parent_handle,
+                                          guint32               timestamp,
                                           NautilusCopyCallback  done_callback,
                                           gpointer              done_callback_data);
 void nautilus_file_operations_move_sync (GList                *files,
@@ -132,16 +146,22 @@ void nautilus_file_operations_move_sync (GList                *files,
 
 void nautilus_file_operations_duplicate (GList                *files,
                                         GtkWindow            *parent_window,
+                                        const char           *parent_handle,
+                                        guint32               timestamp,
                                         NautilusCopyCallback  done_callback,
                                         gpointer              done_callback_data);
 void nautilus_file_operations_link      (GList                *files,
                                         GFile                *target_dir,
                                         GtkWindow            *parent_window,
+                                        const char           *parent_handle,
+                                        guint32               timestamp,
                                         NautilusCopyCallback  done_callback,
                                         gpointer              done_callback_data);
 void nautilus_file_operations_extract_files (GList                   *files,
                                              GFile                   *destination_directory,
                                              GtkWindow               *parent_window,
+                                             const char              *parent_handle,
+                                             guint32                  timestamp,
                                              NautilusExtractCallback  done_callback,
                                              gpointer                 done_callback_data);
 void nautilus_file_operations_compress (GList                  *files,
@@ -149,5 +169,7 @@ void nautilus_file_operations_compress (GList                  *files,
                                         AutoarFormat            format,
                                         AutoarFilter            filter,
                                         GtkWindow              *parent_window,
+                                        const char             *parent_handle,
+                                        guint32                 timestamp,
                                         NautilusCreateCallback  done_callback,
                                         gpointer                done_callback_data);
diff --git a/src/nautilus-file-undo-manager.c b/src/nautilus-file-undo-manager.c
index 4dc26c64a..ebbff9fcf 100644
--- a/src/nautilus-file-undo-manager.c
+++ b/src/nautilus-file-undo-manager.c
@@ -187,7 +187,9 @@ undo_info_apply_ready (GObject      *source,
 
 static void
 do_undo_redo (NautilusFileUndoManager *self,
-              GtkWindow               *parent_window)
+              GtkWindow               *parent_window,
+              const char              *parent_handle,
+              guint32                  timestamp)
 {
     gboolean undo = self->state == NAUTILUS_FILE_UNDO_MANAGER_STATE_UNDO;
 
@@ -195,6 +197,7 @@ do_undo_redo (NautilusFileUndoManager *self,
 
     self->is_operating = TRUE;
     nautilus_file_undo_info_apply_async (self->info, undo, parent_window,
+                                         parent_handle, timestamp,
                                          undo_info_apply_ready, self);
 
     /* clear actions while undoing */
@@ -203,7 +206,9 @@ do_undo_redo (NautilusFileUndoManager *self,
 }
 
 void
-nautilus_file_undo_manager_redo (GtkWindow *parent_window)
+nautilus_file_undo_manager_redo (GtkWindow  *parent_window,
+                                 const char *parent_handle,
+                                 guint32     timestamp)
 {
     if (undo_singleton->state != NAUTILUS_FILE_UNDO_MANAGER_STATE_REDO)
     {
@@ -212,11 +217,13 @@ nautilus_file_undo_manager_redo (GtkWindow *parent_window)
         return;
     }
 
-    do_undo_redo (undo_singleton, parent_window);
+    do_undo_redo (undo_singleton, parent_window, parent_handle, timestamp);
 }
 
 void
-nautilus_file_undo_manager_undo (GtkWindow *parent_window)
+nautilus_file_undo_manager_undo (GtkWindow  *parent_window,
+                                 const char *parent_handle,
+                                 guint32     timestamp)
 {
     if (undo_singleton->state != NAUTILUS_FILE_UNDO_MANAGER_STATE_UNDO)
     {
@@ -225,7 +232,7 @@ nautilus_file_undo_manager_undo (GtkWindow *parent_window)
         return;
     }
 
-    do_undo_redo (undo_singleton, parent_window);
+    do_undo_redo (undo_singleton, parent_window, parent_handle, timestamp);
 }
 
 void
diff --git a/src/nautilus-file-undo-manager.h b/src/nautilus-file-undo-manager.h
index fc857ac6f..566b98340 100644
--- a/src/nautilus-file-undo-manager.h
+++ b/src/nautilus-file-undo-manager.h
@@ -47,7 +47,11 @@ NautilusFileUndoInfo *nautilus_file_undo_manager_get_action (void);
 
 NautilusFileUndoManagerState nautilus_file_undo_manager_get_state (void);
 
-void nautilus_file_undo_manager_undo (GtkWindow *parent_window);
-void nautilus_file_undo_manager_redo (GtkWindow *parent_window);
+void nautilus_file_undo_manager_undo (GtkWindow  *parent_window,
+                                      const char *parent_handle,
+                                      guint32     timestamp);
+void nautilus_file_undo_manager_redo (GtkWindow  *parent_window,
+                                      const char *parent_handle,
+                                      guint32     timestamp);
 
 gboolean nautilus_file_undo_manager_is_operating (void);
diff --git a/src/nautilus-file-undo-operations.c b/src/nautilus-file-undo-operations.c
index 1b5998344..a49544488 100644
--- a/src/nautilus-file-undo-operations.c
+++ b/src/nautilus-file-undo-operations.c
@@ -148,7 +148,9 @@ nautilus_file_undo_info_set_property (GObject      *object,
 
 static void
 nautilus_file_redo_info_warn_redo (NautilusFileUndoInfo *self,
-                                   GtkWindow            *parent_window)
+                                   GtkWindow            *parent_window,
+                                   const char           *parent_handle,
+                                   guint32               timestamp)
 {
     g_critical ("Object %p of type %s does not implement redo_func!!",
                 self, G_OBJECT_TYPE_NAME (self));
@@ -156,7 +158,9 @@ nautilus_file_redo_info_warn_redo (NautilusFileUndoInfo *self,
 
 static void
 nautilus_file_undo_info_warn_undo (NautilusFileUndoInfo *self,
-                                   GtkWindow            *parent_window)
+                                   GtkWindow            *parent_window,
+                                   const char           *parent_handle,
+                                   guint32               timestamp)
 {
     g_critical ("Object %p of type %s does not implement undo_func!!",
                 self, G_OBJECT_TYPE_NAME (self));
@@ -259,6 +263,8 @@ void
 nautilus_file_undo_info_apply_async (NautilusFileUndoInfo *self,
                                      gboolean              undo,
                                      GtkWindow            *parent_window,
+                                     const char           *parent_handle,
+                                     guint32               timestamp,
                                      GAsyncReadyCallback   callback,
                                      gpointer              user_data)
 {
@@ -277,11 +283,17 @@ nautilus_file_undo_info_apply_async (NautilusFileUndoInfo *self,
 
     if (undo)
     {
-        NAUTILUS_FILE_UNDO_INFO_CLASS (G_OBJECT_GET_CLASS (self))->undo_func (self, parent_window);
+        NAUTILUS_FILE_UNDO_INFO_CLASS (G_OBJECT_GET_CLASS (self))->undo_func (self,
+                                                                              parent_window,
+                                                                              parent_handle,
+                                                                              timestamp);
     }
     else
     {
-        NAUTILUS_FILE_UNDO_INFO_CLASS (G_OBJECT_GET_CLASS (self))->redo_func (self, parent_window);
+        NAUTILUS_FILE_UNDO_INFO_CLASS (G_OBJECT_GET_CLASS (self))->redo_func (self,
+                                                                              parent_window,
+                                                                              parent_handle,
+                                                                              timestamp);
     }
 }
 
@@ -572,50 +584,68 @@ ext_strings_func (NautilusFileUndoInfo  *info,
 
 static void
 ext_create_link_redo_func (NautilusFileUndoInfoExt *self,
-                           GtkWindow               *parent_window)
+                           GtkWindow               *parent_window,
+                           const char              *parent_handle,
+                           guint32                  timestamp)
 {
     nautilus_file_operations_link (g_queue_peek_head_link (self->sources),
                                    self->dest_dir,
                                    parent_window,
+                                   parent_handle,
+                                   timestamp,
                                    file_undo_info_transfer_callback,
                                    self);
 }
 
 static void
 ext_duplicate_redo_func (NautilusFileUndoInfoExt *self,
-                         GtkWindow               *parent_window)
+                         GtkWindow               *parent_window,
+                         const char              *parent_handle,
+                         guint32                  timestamp)
 {
     nautilus_file_operations_duplicate (g_queue_peek_head_link (self->sources),
                                         parent_window,
+                                        parent_handle,
+                                        timestamp,
                                         file_undo_info_transfer_callback,
                                         self);
 }
 
 static void
 ext_copy_redo_func (NautilusFileUndoInfoExt *self,
-                    GtkWindow               *parent_window)
+                    GtkWindow               *parent_window,
+                    const char              *parent_handle,
+                    guint32                  timestamp)
 {
     nautilus_file_operations_copy_async (g_queue_peek_head_link (self->sources),
                                          self->dest_dir,
                                          parent_window,
+                                         parent_handle,
+                                         timestamp,
                                          file_undo_info_transfer_callback,
                                          self);
 }
 
 static void
 ext_move_restore_redo_func (NautilusFileUndoInfoExt *self,
-                            GtkWindow               *parent_window)
+                            GtkWindow               *parent_window,
+                            const char              *parent_handle,
+                            guint32                  timestamp)
 {
     nautilus_file_operations_move_async (g_queue_peek_head_link (self->sources),
                                          self->dest_dir,
                                          parent_window,
+                                         parent_handle,
+                                         timestamp,
                                          file_undo_info_transfer_callback,
                                          self);
 }
 
 static void
 ext_redo_func (NautilusFileUndoInfo *info,
-               GtkWindow            *parent_window)
+               GtkWindow            *parent_window,
+               const char           *parent_handle,
+               guint32               timestamp)
 {
     NautilusFileUndoInfoExt *self = NAUTILUS_FILE_UNDO_INFO_EXT (info);
     NautilusFileUndoOp op_type = nautilus_file_undo_info_get_op_type (info);
@@ -623,19 +653,19 @@ ext_redo_func (NautilusFileUndoInfo *info,
     if (op_type == NAUTILUS_FILE_UNDO_OP_MOVE ||
         op_type == NAUTILUS_FILE_UNDO_OP_RESTORE_FROM_TRASH)
     {
-        ext_move_restore_redo_func (self, parent_window);
+        ext_move_restore_redo_func (self, parent_window, parent_handle, timestamp);
     }
     else if (op_type == NAUTILUS_FILE_UNDO_OP_COPY)
     {
-        ext_copy_redo_func (self, parent_window);
+        ext_copy_redo_func (self, parent_window, parent_handle, timestamp);
     }
     else if (op_type == NAUTILUS_FILE_UNDO_OP_DUPLICATE)
     {
-        ext_duplicate_redo_func (self, parent_window);
+        ext_duplicate_redo_func (self, parent_window, parent_handle, timestamp);
     }
     else if (op_type == NAUTILUS_FILE_UNDO_OP_CREATE_LINK)
     {
-        ext_create_link_redo_func (self, parent_window);
+        ext_create_link_redo_func (self, parent_window, parent_handle, timestamp);
     }
     else
     {
@@ -645,10 +675,14 @@ ext_redo_func (NautilusFileUndoInfo *info,
 
 static void
 ext_restore_undo_func (NautilusFileUndoInfoExt *self,
-                       GtkWindow               *parent_window)
+                       GtkWindow               *parent_window,
+                       const char              *parent_handle,
+                       guint32                  timestamp)
 {
     nautilus_file_operations_trash_or_delete_async (g_queue_peek_head_link (self->destinations),
                                                     parent_window,
+                                                    parent_handle,
+                                                    timestamp,
                                                     file_undo_info_delete_callback,
                                                     self);
 }
@@ -656,18 +690,24 @@ ext_restore_undo_func (NautilusFileUndoInfoExt *self,
 
 static void
 ext_move_undo_func (NautilusFileUndoInfoExt *self,
-                    GtkWindow               *parent_window)
+                    GtkWindow               *parent_window,
+                    const char              *parent_handle,
+                    guint32                  timestamp)
 {
     nautilus_file_operations_move_async (g_queue_peek_head_link (self->destinations),
                                          self->src_dir,
                                          parent_window,
+                                         parent_handle,
+                                         timestamp,
                                          file_undo_info_transfer_callback,
                                          self);
 }
 
 static void
 ext_copy_duplicate_undo_func (NautilusFileUndoInfoExt *self,
-                              GtkWindow               *parent_window)
+                              GtkWindow               *parent_window,
+                              const char              *parent_handle,
+                              guint32                  timestamp)
 {
     GList *files;
 
@@ -675,6 +715,7 @@ ext_copy_duplicate_undo_func (NautilusFileUndoInfoExt *self,
     files = g_list_reverse (files);     /* Deleting must be done in reverse */
 
     nautilus_file_operations_delete_async (files, parent_window,
+                                           parent_handle, timestamp,
                                            file_undo_info_delete_callback, self);
 
     g_list_free (files);
@@ -682,7 +723,9 @@ ext_copy_duplicate_undo_func (NautilusFileUndoInfoExt *self,
 
 static void
 ext_undo_func (NautilusFileUndoInfo *info,
-               GtkWindow            *parent_window)
+               GtkWindow            *parent_window,
+               const char           *parent_handle,
+               guint32               timestamp)
 {
     NautilusFileUndoInfoExt *self = NAUTILUS_FILE_UNDO_INFO_EXT (info);
     NautilusFileUndoOp op_type = nautilus_file_undo_info_get_op_type (info);
@@ -691,15 +734,15 @@ ext_undo_func (NautilusFileUndoInfo *info,
         op_type == NAUTILUS_FILE_UNDO_OP_DUPLICATE ||
         op_type == NAUTILUS_FILE_UNDO_OP_CREATE_LINK)
     {
-        ext_copy_duplicate_undo_func (self, parent_window);
+        ext_copy_duplicate_undo_func (self, parent_window, parent_handle, timestamp);
     }
     else if (op_type == NAUTILUS_FILE_UNDO_OP_MOVE)
     {
-        ext_move_undo_func (self, parent_window);
+        ext_move_undo_func (self, parent_window, parent_handle, timestamp);
     }
     else if (op_type == NAUTILUS_FILE_UNDO_OP_RESTORE_FROM_TRASH)
     {
-        ext_restore_undo_func (self, parent_window);
+        ext_restore_undo_func (self, parent_window, parent_handle, timestamp);
     }
     else
     {
@@ -841,7 +884,9 @@ create_callback (GFile    *new_file,
 
 static void
 create_from_template_redo_func (NautilusFileUndoInfoCreate *self,
-                                GtkWindow                  *parent_window)
+                                GtkWindow                  *parent_window,
+                                const char                 *parent_handle,
+                                guint32                     timestamp)
 {
     GFile *parent;
     gchar *parent_uri, *new_name;
@@ -861,7 +906,9 @@ create_from_template_redo_func (NautilusFileUndoInfoCreate *self,
 
 static void
 create_folder_redo_func (NautilusFileUndoInfoCreate *self,
-                         GtkWindow                  *parent_window)
+                         GtkWindow                  *parent_window,
+                         const char                 *parent_handle,
+                         guint32                     timestamp)
 {
     GFile *parent;
     gchar *parent_uri;
@@ -870,7 +917,9 @@ create_folder_redo_func (NautilusFileUndoInfoCreate *self,
     name = g_file_get_basename (self->target_file);
     parent = g_file_get_parent (self->target_file);
     parent_uri = g_file_get_uri (parent);
-    nautilus_file_operations_new_folder (NULL, parent_uri, name,
+    nautilus_file_operations_new_folder (NULL,
+                                         parent_handle, timestamp,
+                                         parent_uri, name,
                                          create_callback, self);
 
     g_free (name);
@@ -880,7 +929,9 @@ create_folder_redo_func (NautilusFileUndoInfoCreate *self,
 
 static void
 create_empty_redo_func (NautilusFileUndoInfoCreate *self,
-                        GtkWindow                  *parent_window)
+                        GtkWindow                  *parent_window,
+                        const char                 *parent_handle,
+                        guint32                     timestamp)
 {
     GFile *parent;
     gchar *parent_uri;
@@ -902,22 +953,24 @@ create_empty_redo_func (NautilusFileUndoInfoCreate *self,
 
 static void
 create_redo_func (NautilusFileUndoInfo *info,
-                  GtkWindow            *parent_window)
+                  GtkWindow            *parent_window,
+                  const char           *parent_handle,
+                  guint32               timestamp)
 {
     NautilusFileUndoInfoCreate *self = NAUTILUS_FILE_UNDO_INFO_CREATE (info);
     NautilusFileUndoOp op_type = nautilus_file_undo_info_get_op_type (info);
 
     if (op_type == NAUTILUS_FILE_UNDO_OP_CREATE_EMPTY_FILE)
     {
-        create_empty_redo_func (self, parent_window);
+        create_empty_redo_func (self, parent_window, parent_handle, timestamp);
     }
     else if (op_type == NAUTILUS_FILE_UNDO_OP_CREATE_FOLDER)
     {
-        create_folder_redo_func (self, parent_window);
+        create_folder_redo_func (self, parent_window, parent_handle, timestamp);
     }
     else if (op_type == NAUTILUS_FILE_UNDO_OP_CREATE_FILE_FROM_TEMPLATE)
     {
-        create_from_template_redo_func (self, parent_window);
+        create_from_template_redo_func (self, parent_window, parent_handle, timestamp);
     }
     else
     {
@@ -927,13 +980,16 @@ create_redo_func (NautilusFileUndoInfo *info,
 
 static void
 create_undo_func (NautilusFileUndoInfo *info,
-                  GtkWindow            *parent_window)
+                  GtkWindow            *parent_window,
+                  const char           *parent_handle,
+                  guint32               timestamp)
 {
     NautilusFileUndoInfoCreate *self = NAUTILUS_FILE_UNDO_INFO_CREATE (info);
     GList *files = NULL;
 
     files = g_list_append (files, g_object_ref (self->target_file));
     nautilus_file_operations_delete_async (files, parent_window,
+                                           parent_handle, timestamp,
                                            file_undo_info_delete_callback, self);
 
     g_list_free_full (files, g_object_unref);
@@ -1025,7 +1081,9 @@ rename_strings_func (NautilusFileUndoInfo  *info,
 
 static void
 rename_redo_func (NautilusFileUndoInfo *info,
-                  GtkWindow            *parent_window)
+                  GtkWindow            *parent_window,
+                  const char           *parent_handle,
+                  guint32               timestamp)
 {
     NautilusFileUndoInfoRename *self = NAUTILUS_FILE_UNDO_INFO_RENAME (info);
     NautilusFile *file;
@@ -1039,7 +1097,9 @@ rename_redo_func (NautilusFileUndoInfo *info,
 
 static void
 rename_undo_func (NautilusFileUndoInfo *info,
-                  GtkWindow            *parent_window)
+                  GtkWindow            *parent_window,
+                  const char           *parent_handle,
+                  guint32               timestamp)
 {
     NautilusFileUndoInfoRename *self = NAUTILUS_FILE_UNDO_INFO_RENAME (info);
     NautilusFile *file;
@@ -1145,7 +1205,9 @@ batch_rename_strings_func (NautilusFileUndoInfo  *info,
 
 static void
 batch_rename_redo_func (NautilusFileUndoInfo *info,
-                        GtkWindow            *parent_window)
+                        GtkWindow            *parent_window,
+                        const char           *parent_handle,
+                        guint32               timestamp)
 {
     NautilusFileUndoInfoBatchRename *self = NAUTILUS_FILE_UNDO_INFO_BATCH_RENAME (info);
 
@@ -1177,7 +1239,9 @@ batch_rename_redo_func (NautilusFileUndoInfo *info,
 
 static void
 batch_rename_undo_func (NautilusFileUndoInfo *info,
-                        GtkWindow            *parent_window)
+                        GtkWindow            *parent_window,
+                        const char           *parent_handle,
+                        guint32               timestamp)
 {
     NautilusFileUndoInfoBatchRename *self = NAUTILUS_FILE_UNDO_INFO_BATCH_RENAME (info);
 
@@ -1398,7 +1462,9 @@ on_undo_starred_tags_updated (GObject      *object,
 
 static void
 starred_redo_func (NautilusFileUndoInfo *info,
-                   GtkWindow            *parent_window)
+                   GtkWindow            *parent_window,
+                   const char           *parent_handle,
+                   guint32               timestamp)
 {
     NautilusFileUndoInfoStarred *self = NAUTILUS_FILE_UNDO_INFO_STARRED (info);
     NautilusTagManager *tag_manager;
@@ -1425,7 +1491,9 @@ starred_redo_func (NautilusFileUndoInfo *info,
 
 static void
 starred_undo_func (NautilusFileUndoInfo *info,
-                   GtkWindow            *parent_window)
+                   GtkWindow            *parent_window,
+                   const char           *parent_handle,
+                   guint32               timestamp)
 {
     NautilusFileUndoInfoStarred *self = NAUTILUS_FILE_UNDO_INFO_STARRED (info);
     NautilusTagManager *tag_manager;
@@ -1648,7 +1716,9 @@ trash_redo_func_callback (GHashTable *debuting_uris,
 
 static void
 trash_redo_func (NautilusFileUndoInfo *info,
-                 GtkWindow            *parent_window)
+                 GtkWindow            *parent_window,
+                 const char           *parent_handle,
+                 guint32               timestamp)
 {
     NautilusFileUndoInfoTrash *self = NAUTILUS_FILE_UNDO_INFO_TRASH (info);
 
@@ -1658,6 +1728,7 @@ trash_redo_func (NautilusFileUndoInfo *info,
 
         locations = g_hash_table_get_keys (self->trashed);
         nautilus_file_operations_trash_or_delete_async (locations, parent_window,
+                                                        parent_handle, timestamp,
                                                         trash_redo_func_callback, self);
 
         g_list_free (locations);
@@ -1805,7 +1876,9 @@ trash_retrieve_files_ready (GObject      *source,
 
 static void
 trash_undo_func (NautilusFileUndoInfo *info,
-                 GtkWindow            *parent_window)
+                 GtkWindow            *parent_window,
+                 const char           *parent_handle,
+                 guint32               timestamp)
 {
     NautilusFileUndoInfoTrash *self = NAUTILUS_FILE_UNDO_INFO_TRASH (info);
 
@@ -1914,7 +1987,9 @@ rec_permissions_callback (gboolean success,
 
 static void
 rec_permissions_redo_func (NautilusFileUndoInfo *info,
-                           GtkWindow            *parent_window)
+                           GtkWindow            *parent_window,
+                           const char           *parent_handle,
+                           guint32               timestamp)
 {
     NautilusFileUndoInfoRecPermissions *self = NAUTILUS_FILE_UNDO_INFO_REC_PERMISSIONS (info);
     gchar *parent_uri;
@@ -1931,7 +2006,9 @@ rec_permissions_redo_func (NautilusFileUndoInfo *info,
 
 static void
 rec_permissions_undo_func (NautilusFileUndoInfo *info,
-                           GtkWindow            *parent_window)
+                           GtkWindow            *parent_window,
+                           const char           *parent_handle,
+                           guint32               timestamp)
 {
     NautilusFileUndoInfoRecPermissions *self = NAUTILUS_FILE_UNDO_INFO_REC_PERMISSIONS (info);
 
@@ -2071,7 +2148,9 @@ permissions_real_func (NautilusFileUndoInfoPermissions *self,
 
 static void
 permissions_redo_func (NautilusFileUndoInfo *info,
-                       GtkWindow            *parent_window)
+                       GtkWindow            *parent_window,
+                       const char           *parent_handle,
+                       guint32               timestamp)
 {
     NautilusFileUndoInfoPermissions *self = NAUTILUS_FILE_UNDO_INFO_PERMISSIONS (info);
     permissions_real_func (self, self->new_permissions);
@@ -2079,7 +2158,9 @@ permissions_redo_func (NautilusFileUndoInfo *info,
 
 static void
 permissions_undo_func (NautilusFileUndoInfo *info,
-                       GtkWindow            *parent_window)
+                       GtkWindow            *parent_window,
+                       const char           *parent_handle,
+                       guint32               timestamp)
 {
     NautilusFileUndoInfoPermissions *self = NAUTILUS_FILE_UNDO_INFO_PERMISSIONS (info);
     permissions_real_func (self, self->current_permissions);
@@ -2207,7 +2288,9 @@ ownership_real_func (NautilusFileUndoInfoOwnership *self,
 
 static void
 ownership_redo_func (NautilusFileUndoInfo *info,
-                     GtkWindow            *parent_window)
+                     GtkWindow            *parent_window,
+                     const char           *parent_handle,
+                     guint32               timestamp)
 {
     NautilusFileUndoInfoOwnership *self = NAUTILUS_FILE_UNDO_INFO_OWNERSHIP (info);
     ownership_real_func (self, self->new_ownership);
@@ -2215,7 +2298,9 @@ ownership_redo_func (NautilusFileUndoInfo *info,
 
 static void
 ownership_undo_func (NautilusFileUndoInfo *info,
-                     GtkWindow            *parent_window)
+                     GtkWindow            *parent_window,
+                     const char           *parent_handle,
+                     guint32               timestamp)
 {
     NautilusFileUndoInfoOwnership *self = NAUTILUS_FILE_UNDO_INFO_OWNERSHIP (info);
     ownership_real_func (self, self->original_ownership);
@@ -2353,24 +2438,31 @@ extract_strings_func (NautilusFileUndoInfo  *info,
 
 static void
 extract_redo_func (NautilusFileUndoInfo *info,
-                   GtkWindow            *parent_window)
+                   GtkWindow            *parent_window,
+                   const char           *parent_handle,
+                   guint32               timestamp)
 {
     NautilusFileUndoInfoExtract *self = NAUTILUS_FILE_UNDO_INFO_EXTRACT (info);
 
     nautilus_file_operations_extract_files (self->sources,
                                             self->destination_directory,
                                             parent_window,
+                                            parent_handle,
+                                            timestamp,
                                             extract_callback,
                                             self);
 }
 
 static void
 extract_undo_func (NautilusFileUndoInfo *info,
-                   GtkWindow            *parent_window)
+                   GtkWindow            *parent_window,
+                   const char           *parent_handle,
+                   guint32               timestamp)
 {
     NautilusFileUndoInfoExtract *self = NAUTILUS_FILE_UNDO_INFO_EXTRACT (info);
 
     nautilus_file_operations_delete_async (self->outputs, parent_window,
+                                           parent_handle, timestamp,
                                            file_undo_info_delete_callback, self);
 }
 
@@ -2507,7 +2599,9 @@ compress_strings_func (NautilusFileUndoInfo  *info,
 
 static void
 compress_redo_func (NautilusFileUndoInfo *info,
-                    GtkWindow            *parent_window)
+                    GtkWindow            *parent_window,
+                    const char           *parent_handle,
+                    guint32               timestamp)
 {
     NautilusFileUndoInfoCompress *self = NAUTILUS_FILE_UNDO_INFO_COMPRESS (info);
 
@@ -2516,13 +2610,17 @@ compress_redo_func (NautilusFileUndoInfo *info,
                                        self->format,
                                        self->filter,
                                        parent_window,
+                                       parent_handle,
+                                       timestamp,
                                        compress_callback,
                                        self);
 }
 
 static void
 compress_undo_func (NautilusFileUndoInfo *info,
-                    GtkWindow            *parent_window)
+                    GtkWindow            *parent_window,
+                    const char           *parent_handle,
+                    guint32               timestamp)
 {
     NautilusFileUndoInfoCompress *self = NAUTILUS_FILE_UNDO_INFO_COMPRESS (info);
     GList *files = NULL;
@@ -2530,6 +2628,7 @@ compress_undo_func (NautilusFileUndoInfo *info,
     files = g_list_prepend (files, self->output);
 
     nautilus_file_operations_delete_async (files, parent_window,
+                                           parent_handle, timestamp,
                                            file_undo_info_delete_callback, self);
 
     g_list_free (files);
diff --git a/src/nautilus-file-undo-operations.h b/src/nautilus-file-undo-operations.h
index 74f57c1f1..7601cd741 100644
--- a/src/nautilus-file-undo-operations.h
+++ b/src/nautilus-file-undo-operations.h
@@ -62,9 +62,13 @@ struct _NautilusFileUndoInfoClass
     GObjectClass parent_class;
 
     void (* undo_func) (NautilusFileUndoInfo *self,
-                        GtkWindow            *parent_window);
+                        GtkWindow            *parent_window,
+                        const char           *parent_handle,
+                        guint32               timestamp);
     void (* redo_func) (NautilusFileUndoInfo *self,
-                        GtkWindow            *parent_window);
+                        GtkWindow            *parent_window,
+                        const char           *parent_handle,
+                        guint32               timestamp);
 
     void (* strings_func) (NautilusFileUndoInfo *self,
                            gchar **undo_label,
@@ -76,6 +80,8 @@ struct _NautilusFileUndoInfoClass
 void nautilus_file_undo_info_apply_async (NautilusFileUndoInfo *self,
                                           gboolean undo,
                                           GtkWindow *parent_window,
+                                          const char *parent_handle,
+                                          guint32 timestamp,
                                           GAsyncReadyCallback callback,
                                           gpointer user_data);
 gboolean nautilus_file_undo_info_apply_finish (NautilusFileUndoInfo *self,
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index db84bd191..83d8d0353 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1602,7 +1602,7 @@ delete_selected_files (NautilusFilesView *view)
     }
     locations = g_list_reverse (locations);
 
-    nautilus_file_operations_delete_async (locations, nautilus_files_view_get_containing_window (view), 
NULL, NULL);
+    nautilus_file_operations_delete_async (locations, nautilus_files_view_get_containing_window (view), 
NULL, 0, NULL, NULL);
 
     g_list_free_full (locations, g_object_unref);
     nautilus_file_list_free (selection);
@@ -2084,6 +2084,7 @@ new_folder_dialog_controller_on_name_accepted (NautilusFileNameWidgetController
     parent_uri = nautilus_files_view_get_backing_uri (view);
     parent = nautilus_file_get_by_uri (parent_uri);
     nautilus_file_operations_new_folder (GTK_WIDGET (view),
+                                         NULL, 0,
                                          parent_uri, name,
                                          new_folder_done, data);
 
@@ -2301,6 +2302,8 @@ compress_dialog_controller_on_name_accepted (NautilusFileNameWidgetController *c
                                        format,
                                        filter,
                                        nautilus_files_view_get_containing_window (view),
+                                       NULL,
+                                       0,
                                        compress_done,
                                        data);
 
@@ -4848,6 +4851,8 @@ trash_or_delete_files (GtkWindow         *parent_window,
 
     nautilus_file_operations_trash_or_delete_async (locations,
                                                     parent_window,
+                                                    NULL,
+                                                    0,
                                                     (NautilusDeleteCallback) trash_or_delete_done_cb,
                                                     view);
     g_list_free_full (locations, g_object_unref);
@@ -6417,6 +6422,8 @@ extract_files (NautilusFilesView *view,
         nautilus_file_operations_extract_files (locations,
                                                 destination_directory,
                                                 nautilus_files_view_get_containing_window (view),
+                                                NULL,
+                                                0,
                                                 extract_done,
                                                 data);
     }
@@ -6426,6 +6433,8 @@ extract_files (NautilusFilesView *view,
                                                 destination_directory,
                                                 nautilus_files_view_get_containing_window (view),
                                                 NULL,
+                                                0,
+                                                NULL,
                                                 NULL);
     }
 
@@ -6677,6 +6686,8 @@ action_set_as_wallpaper (GSimpleAction *action,
                                             target_uri,
                                             GDK_ACTION_COPY,
                                             GTK_WIDGET (user_data),
+                                            NULL,
+                                            0,
                                             wallpaper_copy_done_callback,
                                             NULL);
         g_free (target_uri);
@@ -8906,6 +8917,7 @@ nautilus_files_view_move_copy_items (NautilusFilesView *view,
     nautilus_file_operations_copy_move
         (item_uris,
         target_uri, copy_action, GTK_WIDGET (view),
+        NULL, 0,
         copy_move_done_callback, pre_copy_move (view));
 }
 
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 316066d4c..e23b41da5 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -517,6 +517,7 @@ trash_or_delete_files (GtkWindow   *parent_window,
 
     nautilus_file_operations_trash_or_delete_async (locations,
                                                     parent_window,
+                                                    NULL, 0,
                                                     NULL, NULL);
     g_list_free_full (locations, g_object_unref);
 }
diff --git a/src/nautilus-trash-bar.c b/src/nautilus-trash-bar.c
index 1256963a4..03d0623c5 100644
--- a/src/nautilus-trash-bar.c
+++ b/src/nautilus-trash-bar.c
@@ -168,7 +168,7 @@ trash_bar_response_cb (GtkInfoBar *infobar,
     {
         case TRASH_BAR_RESPONSE_EMPTY:
         {
-            nautilus_file_operations_empty_trash (window);
+            nautilus_file_operations_empty_trash (window, NULL, 0);
         }
         break;
 
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 056c75c7a..655d9401b 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -424,7 +424,7 @@ action_redo (GSimpleAction *action,
 {
     NautilusWindow *window = user_data;
 
-    nautilus_file_undo_manager_redo (GTK_WINDOW (window));
+    nautilus_file_undo_manager_redo (GTK_WINDOW (window), NULL, 0);
 }
 
 static void
@@ -434,7 +434,7 @@ action_undo (GSimpleAction *action,
 {
     NautilusWindow *window = user_data;
 
-    nautilus_file_undo_manager_undo (GTK_WINDOW (window));
+    nautilus_file_undo_manager_undo (GTK_WINDOW (window), NULL, 0);
 }
 
 static void
@@ -1146,7 +1146,7 @@ places_sidebar_drag_perform_drop_cb (GtkPlacesSidebar *sidebar,
     dest_uri = g_file_get_uri (dest_file);
     source_uri_list = build_uri_list_from_gfile_list (source_file_list);
 
-    nautilus_file_operations_copy_move (source_uri_list, dest_uri, action, GTK_WIDGET (sidebar), NULL, NULL);
+    nautilus_file_operations_copy_move (source_uri_list, dest_uri, action, GTK_WIDGET (sidebar), NULL, 0, 
NULL, NULL);
 
     g_free (dest_uri);
     g_list_free_full (source_uri_list, g_free);
@@ -1160,7 +1160,7 @@ action_empty_trash (GSimpleAction *action,
 {
     NautilusWindow *window = NAUTILUS_WINDOW (user_data);
 
-    nautilus_file_operations_empty_trash (GTK_WIDGET (window));
+    nautilus_file_operations_empty_trash (GTK_WIDGET (window), NULL, 0);
 }
 
 /* Callback used for the "properties" menu item from the places sidebar */
@@ -1591,7 +1591,7 @@ on_in_app_notification_undo_undo_button_clicked (GtkWidget      *notification,
 {
     hide_in_app_notification_undo (window);
 
-    nautilus_file_undo_manager_undo (GTK_WINDOW (window));
+    nautilus_file_undo_manager_undo (GTK_WINDOW (window), NULL, 0);
 }
 
 static void
diff --git a/test/automated/displayless/test-utilities.c b/test/automated/displayless/test-utilities.c
index 7b38c6849..d60b2b60f 100644
--- a/test/automated/displayless/test-utilities.c
+++ b/test/automated/displayless/test-utilities.c
@@ -162,7 +162,7 @@ test_operation_undo (void)
                                    G_CALLBACK (quit_loop_callback),
                                    loop);
 
-    nautilus_file_undo_manager_undo (NULL);
+    nautilus_file_undo_manager_undo (NULL, NULL, 0);
 
     g_main_loop_run (loop);
     
@@ -191,7 +191,7 @@ test_operation_undo_redo (void)
                                    G_CALLBACK (quit_loop_callback),
                                    loop);
 
-    nautilus_file_undo_manager_redo (NULL);
+    nautilus_file_undo_manager_redo (NULL, NULL, 0);
 
     g_main_loop_run (loop);
     
@@ -552,4 +552,4 @@ create_multiple_full_directories (gchar *prefix, gint number_of_directories)
 
         g_file_make_directory (file, NULL, NULL);
     }
-}
\ No newline at end of file
+}
diff --git a/test/interactive/test-copy.c b/test/interactive/test-copy.c
index 39fe609f1..66ee8c950 100644
--- a/test/interactive/test-copy.c
+++ b/test/interactive/test-copy.c
@@ -77,6 +77,8 @@ main (int   argc,
     nautilus_file_operations_copy_async (sources,
                                          dest,
                                          GTK_WINDOW (window),
+                                         NULL,
+                                         0,
                                          copy_done, NULL);
 
     infos = nautilus_progress_info_manager_get_all_infos (manager);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]