GNOME Bugzilla – Bug 167501
Nautilus should have a universal Undo command
Last modified: 2012-04-04 12:28:46 UTC
This is a superset of Bug 41850. Everything in a usable environment should be easily undoable to allow user exploration of the system. Ideally every command in the desktop should be undoable, but enabling Undo in Nautilus would be a good place to start. Having a universally available Undo command allows to get ridden of confirmation "Are you sure?" dialogs. This speeds workflow up, increases the user confidence in the interface, and is really useful when the user makes a mistake (no more "I removed the whole Documents folder with just a click on OK"). Nautilus would be great if it had Undo for at least the commands Move, Copy, Rename, Delete & Move to Trash.
This is indeed something that i've missed in nautilus for quite some time. Since there is an option in the "File Manager Preferences" that allows the user to disable the dialog when moving files to trash, it shoudn't be removed as the reported says imo...
*** Bug 309941 has been marked as a duplicate of this bug. ***
Bug 309941 also demands for rename widget undo capabilities.
This is not a superset of bug 41850. An undo function lets you undo the last action, then maybe the previous action, then maybe the one before that (e.g. moving something to the Trash), etc. But a proper Trash restore function lets you restore any item at any time, provided its container still exists. Perhaps this bug should cover Nautilus having (a) a history of actions it has performed, each with human-readable summary for use in the Edit menu (e.g. "Move of 3 items"), and (b) infrastructure for calling a command's undo function if it exists, and making the "Undo"/ "Redo" menu items insensitive otherwise (e.g. "Can't Undo Erase Disk"). Then making individual operations undoable/redoable can be reported as separate bugs.
I agree with you Matthew. However, what's more important than having a clean bugzilla is to have people working on a real undo framework. I haven't taken a close look at NautilusUndo yet, but since it is a legacy from our IPC complexity days, it might be appropriate as a starting point but overengineered. I think some architectural decisions are quiet obvious, as long as we don't want folder-specific revision control, which is what a Google bounty was aiming at. A rough list should IMHO include rename, move, copy and trash operations, all on one stack, and accessible through a menu.
Oh, and we have to decide whether things should be undone globally, or per window. It might be useful to work in window a, then b, and afterwards undoing in a without undoing in b. At least for spatial windows, this seems to be a cruicial aspect of undo. For the browser window, a global undo list could be more desirable, but I don't know really. Usability crew, any ideas?
For completeness, here's a link to a comment I made about this on the usability list recently: http:// mail.gnome.org/archives/usability/2005-October/msg00095.html One problem with having per-window undo in any app is that the changes might have interdependencies... e.g. in a file manager, I might create a file in window A, create a symlink to it in window B, and then hit Undo in window A. (Ok, not the most destructive example I can think of, but you get the idea...)
*** Bug 324111 has been marked as a duplicate of this bug. ***
Look at Konqueror, look at Finder, look at Explorer.
alex@weej.com: Why? And in any case, some people can't. Please elaborate.
We are in september 2007 and the bug is still there. And the users who want this feature (it's not a bug, it's a feature :-) ) to be changed by adding an "undo" option are still there too.
This is just a copy a message I've posted on nautilus-list (see [A]): (...)I'm implementing an undo mechanism for Nautilus (see [1]). I've already implemented some code [2] to manage a global operation history (nautilus-undostack-manager), menu entries and callbacks. As there is work being done to move from gnome-vfs to gvfs I've not yet added the code to actually undo-redo file operations; at this moment, selecting Undo or Redo does not perform real file operations but just prints a message on the console. I've put some placeholders in nautilus-file-operations.c where the code to construct "undo data" will be put. I've considered that every file operation (including undo/redo) is performed asynchronously, so the history is protected using a mutex. Updates for the UI (menu items sensitivity, labels and tooltips) are pushed, when necessary, by mean of signals (the UI being FMDirectoryView). Some additional info on how the undo history works is found in nautilus-undostack-manager.c . (...) references: [A] http://mail.gnome.org/archives/nautilus-list/2007-October/msg00018.html [1] http://bugzilla.gnome.org/show_bug.cgi?id=167501 [2] http://diuf.unifr.ch/pai/people/broccoa/dev/01_nautilus-undo-initial.patch
Created attachment 97727 [details] [review] 01_nautilus-undo-initial.patch (against 2.20.0) patch (against 2.20.0) to add initial support for undo to nautilus (uses gnome-vfs, so it will need to be ported to gvfs in the future). operations that can be undone/redone are: - copy / move file - rename file - move to trash - create folder - make link everything is done asynchronously Note: Undo/Redo for "new empty file"/"new file from template" are not yet supported
I've put a demonstration video at http://www.youtube.com/watch?v=G--PBDz3hEs
Created attachment 97785 [details] [review] 01_nautilus-undo-initial-v2.patch (against 2.20.0) patch (against 2.20.0) also supporting undo/redo of "new empty file"/"new file from template"
Your work seems to be great. I'm not a programmer, just a simple user, so how can I beta-test your patch ?
This is one of my top-10 must-have features for GNOME... please get this into nautilus 2.22!
i'd really love to see this in 2.22 aswell, but i fear it's a bit late. but this should definately hit nautilus soon, imho. it is very high on my wish-list aswell.
I'm a bit busy now, and I'm also waiting for nautilus 2.22 with stable gio/gvfs before porting the undo thing to it (I don't want to hack on something that is still being heavily worked on).
*** Bug 362718 has been marked as a duplicate of this bug. ***
*** Bug 514000 has been marked as a duplicate of this bug. ***
for information, the idea is also developped here : Never Use a Warning When you Mean Undo http://www.alistapart.com/articles/neveruseawarning Bugs #487643, #480975 and #319785 are related (but not duplicate) They have been reported from Launchpad/Ubuntu Feature request : "Evince/EOG/Epiphany lack an option to reset toolbars" and EoG has a Fix Released in version 2.22 See also Bug 521533 "the Recent Documents menu should not have a confirmation dialog box when the user ask for deleting entries" The Recent Documents menu (since GNOME 2.20 thanks to GtkRecentAction) shows a confirmation dialog box when the user ask for deleting entries, whereas there should be an Undo functionnality or maybe nothing (since no files are deleted, only shortcuts. Warnings should be reserved to important actions. User will not read warnings anymore if there is too much of them in the Desktop).
Any chance getting undo capabilities in nautilus in 2.24 since gio/gvfs are pretty stable now?
*** Bug 554261 has been marked as a duplicate of this bug. ***
Any Chance of getting this into 2.26? This is really one of the most important features I think! Thanks!
Is anyone paying attention to this bug? Since this is probably the single most important feature that Nautilus lacks (from a POV of Windows users who are so accustomed to it that they're shocked when they notice there is no such feature in Nautilus), I think this should be paid much more attention. To bump the question: will this be included in 2.26?
Yes, will this feature be included in 2.26?
*** Bug 562286 has been marked as a duplicate of this bug. ***
Obviously it will not be included until somebody comes up here and attaches a patch. "Me too" comments do not help.
Errr, Amos Brocco already proposed a patch (see v1 and v2 above), hasn't he ? I tested it on Ubuntu Gustsy Gibbon and it seemed to work : it was one year ago. I suppose many changes have been done to nautilus since 2.20 (I'm not a developer), but can't the work that has already been done be used ?
Sigh, it's not in 2.24 - someone said it's trivial coding (obviously waaay beyond my skill-set) and there's a patch for it so its perverse to hold it back from general release - especially since it makes Linux less attractive to Windows users. Are we trying to discourage people from adopting Linux, do we want people to avoid Linux and stick with Windows or was it a mistake? My money is on it being a mistake. lol, good luck getting it included in the next Nautilus upgrade - is it possible to have it as just one of the occasional updates or is it going to have to wait for the next big upgrade? Is there anything less negative that i could do to help expedite matters? Please let me know if i can help. Windows has had this UnDo feature in right-click and Edit menus for donkeys years (or is that ears?)
(In reply to comment #30) > Errr, Amos Brocco already proposed a patch (see v1 and v2 above), hasn't he ? > I suppose many changes have been done to nautilus since 2.20 yes. hence it needs porting and *a lot* of testing...
Sorry my last posting was rude and unhelpful. It's good that we have a patch and i'd help test it if i knew how but i don't have enough ability that way.
Created attachment 149859 [details] [review] Patch to add undo-redo support to Nautilus (against 2.28.1) Hello, I've finished the porting of the patch to GIO. I've developed it against Nautilus 2.28.1 (Ubuntu 9.10). It supports Undo-Redo for the following operations: - copy / duplicate - move - trash - rename - make link - create new folder - create new file - create file from template I've tried to touch the existing code (mainly nautilus-file-operations.c) as little as possible. ...and it surely needs some heavy testing:) a little demo video is available online at http://www.youtube.com/watch?v=YCf94_p2SyA
WOW !! That does look awesome :)) Good work all :) Now just to alpha?/beta test it? I'm going to try randomly clicking on a few things to see if that helps me beta test it. Sorry to ask for clues, i really shouldn't be such a noob at this by now but i have enjoyed using linux and it's all been soo easy that i haven't been forced into learning much :) While it is good to have it in the Edit menu it would be great if this new functionality could be added to the normal right-click menu? Thanks all for working at this Congrats, regards and respect to you for fixing this :) from Tom :)
(In reply to comment #34) > Created an attachment (id=149859) [details] [review] > Patch to add undo-redo support to Nautilus (against 2.28.1) Hi Amos, I'm not able to review your patch, but I rather wanted to tell you this is always better to work against the latest development version. Nautilus 2.28.1 is few weeks now and the unstable has moved since, and your patch does apply to master. I suggest to use git (as all GNOME projets do) to ease your work (which seems to be an hard job) and the maintainer's job too. Cheers
(In reply to comment #36) > and your patch does apply to master. ^^^ not
Created attachment 149868 [details] [review] Undo Redo Patch (fixed diff format) (the same patch... just fixed the diff format...)
Amos, thanks, works great so far! (In reply to comment #35) > Now just to alpha?/beta test it? I successfully applied the patch to the nautilus-2.28.1 source package following the instructions here http://www.moosechips.com/2008/09/ubuntu-rebuild-a-source-package/ and here http://www.debian.org/doc/maint-guide/ch-build.en.html#s-dpatch
Created attachment 150170 [details] [review] Updated Patch Updated patch (against 2.28.1): - cleaned up signals - added undo/redo for "restore from trash" - various bug fixes Note: this patch applies cleanly also to the current development version on git (as of 19 dec), but I have not yet tried to compile it.
Ok, the current version of Nautilus that i am using from the repositories is 2.26.2 so i guess it will be quite a long while before i can try this out. I am a point&click user & was hoping to beta test this patch against my current version but i am happy to wait. Thanks for writing this Amos :)) Happy Samhain/Christmas whatever Regards from Tom :)
Created attachment 150975 [details] [review] Patch against current git master New patch against current git master (as of Thu Jan 7, 4:45PM) I've fixed some compilation warnings about unused variables, fixed problems with the "new file" operation, and changed some strings.
Created attachment 151248 [details] [review] Undo/redo patch (2010-01-12) New patch against git master (as of Tue Jan 12, 1:51 PM) Changes: - added undo/redo support for permission change, owner change, and group change
Cooking on gas!! Good to see more progress with this :) Thanks Amos :)) Regards from Tom :)
Created attachment 151396 [details] [review] Updated patch agains git changes: - use more meaningful descriptions for status messages (both undo and redo)
Main thing that bothers me now is whether this functionality could be added to the mouse's right-click menu in a sensible way? It does feel like a fantastic step forwards being able to use the edit menu to undo but Window (sorry to swear) already has this in the right-click. I am not sure but i have a feeling that would be another major problem in trying to finesse this? Regards from Tom :)
Hi again :) As a point&click user i found Synaptic allowed me to add a "proposed updates" repository. Does this allow me to upgrade to the development version of nautilus? I am not hugely worried about breaking one of my ubuntu installs as both my installs share a separate /home partition. Also i have found a sneaky method of reinstalling Ubuntu to get it "back to factory settings" without losing all the installed programs, actually i have 2 simple methods for this. Which reminds me, i should back up my bookmarks and stuff fairly soon lol Thanks to all that are working at this, especially Amos. Please nudge me in the direction of being able to alpha/beta test this for you a bit Many regards from Tom :)
> As a point&click user i found Synaptic allowed me to add a "proposed updates" > repository. Does this allow me to upgrade to the development version of > nautilus? Almost certainly not. Ubuntu almost never backports new major versions of software into older distributions. However, I did see this http://www.webupd8.org/2010/01/download-undo-redo-patched-nautilus.html > Thanks to all that are working at this, especially Amos. Please nudge me in the > direction of being able to alpha/beta test this for you a bit While this is not really a forum, I expect the developers would like to hear your experiences using the modified nautilus.
Thanks John :) So i need to update to Kosmic Koala (lol) before i can try this? But when i do upgrade i just need to run these commands? sudo apt-get install wget wget http://diuf.unifr.ch/pai/people/broccoa/nautilus/nautilus_2.28.1-81attila1_i386.deb wget http://diuf.unifr.ch/pai/people/broccoa/nautilus/nautilus-data_2.28.1-81attila1_all.deb wget http://diuf.unifr.ch/pai/people/broccoa/nautilus/libnautilus-extension1_2.28.1-81attila1_i386.deb sudo dpkg -i *.deb Either from the root shell in Recovery Mode before/during bootup or perhaps just reboot to start a new X session? Hmm, i think i have found a forum thread where i can ask these questions more easily Thanks and regards from Tom :)
(In reply to comment #49) For ubuntu users I've set up a PPA, https://launchpad.net/~mriya3/+archive/ppa If you have further comments on installing these packages please ask directly on the ubuntu forums (http://ubuntuforums.org/showthread.php?p=8536329#post8536329).
Created attachment 152302 [details] [review] Updated patch against git master Updated patch changes: - bug fixes
Created attachment 155955 [details] [review] updated version of current patch Spent some time off and on during my spring break to bring you this (mostly untested) large update to the patch. Really happy that it worked going into the changes, since that'll make it easier to track what I broke during this update. The major changes include: * Moves to Nautilus' coding style (indention, variables defined at the top of the block, avoids assignment at variable creation, etc.) Largest portion of the work was spent here. * Reduces the number of roundtrips through GFile. * Stubs out the gtk-doc for some of the new API * Some bug fixes (using glib, making sure not to mismatch malloc()/g_free()). While I still don't think this is ready to go in, it gets us significantly closer. * I'd like to break down the huge NautilusUndoStackActionData struct. I'm not sure if this should end up like the Job structs in the file operations, or more like GdkEvent, but I'm leaning towards the former just to try to avoid unions and break down some of those enormous switch blocks. * The whole thing still seems wordy. Considering nixing the word "stack" just to shorten the whole namespace, information->info. * Need to reconcile the differences between the existing undo support and the new undo stack code. There is some noticeable overlap, but for the most part it seems the new code replaces the old code (which seems to barely have any function now that Nautilus is Bonobo-less). * Still need to get rid of some GFile roundtripping. * Still a few style issues I left untouched since the file state of that code is still unknown. Input welcome.
*** Bug 553147 has been marked as a duplicate of this bug. ***
*** Bug 618380 has been marked as a duplicate of this bug. ***
it seems that Nautilus Elementary has a Undo command http://blog.sckyzo.com/wp-content/uploads/2010/06/Espace-de-travail-1_002.png
@ AntiStress A lot of the developers in Elementary also work (even lead) in other projects such as Ubuntu, Mint & Debian main. Elementary is a good place to test ideas in the wild before bringing them into Debian family distros (such as Ubuntu and Mint) in much the same way as Fedora is a good testing-ground for the RedHat family. At least that is my impression from the excellent article by Chris Smart Good luck and regards from Tom :)
*** Bug 627379 has been marked as a duplicate of this bug. ***
Created attachment 179634 [details] [review] Updated patch Here's an update patch that cleans up a little bit the undo mechanism (based on the work done by Cosimo in the undo-manager branch). It applies to current git master. The main differences are: - better code organization - separate undo data structures - fixes to let the patch apply to git master (mainly changes from FMDirectoryView to NautilusView)
Created attachment 205141 [details] [review] Updated patch against current git Updated to apply against current git. Fixed deprecated methods for dealing with GMutex.
Hasn't this been fixed for 3.4? Wondering why this report is still open...
Yes, just because I forgot about it :)