d48bddb...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
file-operations: Use g_file_enumerator_get_child
As documented, this is a convenience method that's equivalent to our
existing code, assuming the directory at hand is the enumerator
container.
Also, this convenience method remains correct if the enumerator
container is different, which is going to be the case soon, as we
introduce support for retrying with admin:// URIs.
04a8104...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
file-operations: Store op kind at job creation
This is going to be useful for admin operations.
Existing uses of OpKind are left unchanged because they may represent
a sub-operation (e.g.: delete fallback path of a trashing operation),
not the main operation.
70c0f5b...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
file-operations: Move job structs to private header
To be usable from a separate file for admin operations.
1582ab6...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
file-operations: Simplify abort_job
Make finalize_common() call nautilus_file_undo_manager_set_action()
only if the job hasn't been cancelled. This way, abort_job() becomes
a simple wrapper for g_cancellable_cancel(), and we can just call
g_cancellable_cancel() as well if needed (such as from another file).
3c6f66a...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
file-operations: Drop obsolete job struct
Historical note: it was use to mark .desktop launchers as trusted,
back when we included support for launching apps, as part of the
"desktop icons" featured which was a piece of GNOME 2's shell.
c8b1af9...
by
Sachin Daluja <email address hidden>
file-operations: Remove unused parameter
From NautilusDeleteCallback function signature.
f14743f...
by
Sachin Daluja <email address hidden>
file-operations: Remove duplicated code
The outermost code for handling the "duplicate" file operation
was mostly a copy of the similar code for the "copy" operation.
Remove the duplicated code and add minor conditional logic in
the code for "copy" operation to also handle "duplicate".
c7f3b8a...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
file-operations: Adapt copy_job_setup() for duplication
The duplicate task doesn't have a *_job_setup() helper.
It can reuse the 'copy' one with minor adaptaions. The duplication is
still easily identified by having a NULL destination.
709b19a...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
file-undo-operations: Set NULL dest for duplication
In src/nautilus-file-operations.c, the duplication operation is
identified within the 'copy' code paths by having a NULL destination
imply it's the same as the source parent dir.
For consistency, adopt the same paradigm in the undo stack.
Also, while we are at it, adopt autocleanup for some related strings.