[nautilus] file-operations: always pop undo manager flag
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-operations: always pop undo manager flag
- Date: Thu, 24 Dec 2015 15:28:53 +0000 (UTC)
commit c9135ce6b6e7dd812106f0c7a5b305a12b57d0b0
Author: Razvan Chitu <razvan ch95 gmail com>
Date: Thu Dec 24 17:11:39 2015 +0200
file-operations: always pop undo manager flag
Nautilus undo manager reuses undo information based on a flag that is pushed
when an undo operation begins and popped during the operation itself. In the
case of trashing / deleting files, the flag was not popped in some situations,
which caused the next operations to not be undoable.
Flip operands of a logical operator so the flag is always popped, avoiding
issues caused by lazy evaluation.
A better solution would be to always update the flag internally in the manager,
and only peek its value externally.
https://bugzilla.gnome.org/show_bug.cgi?id=759850
libnautilus-private/nautilus-file-operations.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 376ef7e..c48bbb3 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -2231,7 +2231,7 @@ trash_or_delete_internal (GList *files,
inhibit_power_manager ((CommonJob *)job, _("Deleting Files"));
}
- if (try_trash && !nautilus_file_undo_manager_pop_flag ()) {
+ if (!nautilus_file_undo_manager_pop_flag () && try_trash) {
job->common.undo_info = nautilus_file_undo_info_trash_new (g_list_length (files));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]