summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-file-undo-manager.c
Commit message (Collapse)AuthorAgeFilesLines
* general: remove vim modelinesCarlos Soriano2016-04-041-1/+0
| | | | | | | | | | | | | Vim and emacs modelines are used to specify some of the code style in the code. However, this is misleading and poorly supported since nautilus had a mix of code style for some time. Also, the mode lines doesn't specify the whole code style, so we will need to use a different tool as well to specify the whole code style. For that, we can just use a different tool for everything. So remove the mode lines, and in a short future we will reestyle the nautilus code to have a single code style, and use a tool like editorconfig to specify the whole code style.
* file-undo-manager: fix trash undo invalidationRazvan Chitu2016-03-071-9/+4
| | | | | | | | | In Nautilus, when the Trash is emptied, trash undo / redo operations are invalidated by the undo manager. However, only the undo operations should be invalidated, because a redo is not affected by the state of the Trash. In order to fix this, change the invalidation condition to only target undo. https://bugzilla.gnome.org/show_bug.cgi?id=763134
* file-undo-manager: rename undo_redo_flagRazvan Chitu2016-01-121-5/+5
| | | | | | | | | | | | | Nautilus undo manager previously relied on a stack-like implementation of its operating state. The stack operations (pushing and popping) were removed in a previous commit due to possible unexpected behavior and errors. The flag alone now has an inadequate name for what it represents. Rename the flag to "is_operating", since it is set when the manager is performing an undo / redo operation and unset otherwise. Rename the associated getter function accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=759850
* file-undo-manager: handle undo_redo_flag internallyRazvan Chitu2016-01-121-20/+6
| | | | | | | | | | | | | Nautilus undo manager reuses undo information based on a flag that marks whether an undo / redo operation is currently being performed. Previously, the flag was managed both internally and externally. This proved to be unnecessary and even harmful, as it led to an unexpected behavior. Remove push and pop functions and handle the flag explicitly, at the start and at the end of an undo / redo operation. Replace external use of pop with the use of a getter function, also introduced in this patch. https://bugzilla.gnome.org/show_bug.cgi?id=759850
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* file-undo-manager: use NautilusFileUndoInfoCosimo Cecchi2012-01-201-450/+129
| | | | | | | | | | | | Rework NautilusFileUndoManager to use the new NautilusFileUndoInfo objects. At the same time, make it use a single item instead of a queue, turning it into a state machine. This has various reasons; from a code perspective, if we keep a stack of operations, we should also keep track and invalidate items in there when something changes on the filesystem, but this can be very expensive. On the other hand in the UI we probably don't want to expose more than one item anyway.
* file-operations: first pass at passing on success informationCosimo Cecchi2012-01-201-24/+36
| | | | | We want to know if a file operation failed for some reason, so that we don't add it in the redo queue.
* undo: pass in a GtkWindow for undo operationsCosimo Cecchi2012-01-201-4/+7
| | | | | So that dialogs triggered by the file operations can correctly be parented.
* undo: introduce undo supportAmos Brocco2012-01-201-0/+600