Updated undo patch



Hello everybody,
I had some time to re-sync my patch with the current git master... the patch is https://bugzilla.gnome.org/attachment.cgi?id=205141
The structure of the code has not changed, I've just fixed some constants and replaced deprecated methods.
Cosimo, do you think that it would be "mergeable" soon?

Concerning your last comments:
- refactoring can be done subsequently, although it might complicate things. For example, if we merge the undo structures with the nautilus-file-operations ones, we would need to
modify some fields (like file lists) on the fly, in order to track files that get ignored by the user (for example during a copy operation) or filenames that change (ex. with duplicate).
- in my opinion the idea of letting the user un-do just the last operation is not very user friendly,
and too much Apple Finder. It has happened to me many times that what I wanted to undo was composed of multiple successive actions
like copying files from different directories around, and undoing that can only be achieved with a multi-level undo. See also http://designinginterfaces.com/firstedition/index.php?page=Multi-Level_Undo

cheers

A.



2011/6/15 Cosimo Cecchi <cosimoc gnome org>
On Wed, 2011-06-15 at 14:20 +0200, Amos Brocco wrote:
> Hello again,
> is the undo feature still planned for the next release (3.2) ?

Hi Amos,

Yes, it's still planned, though unfortunately I didn't yet have had the
time to work on it.

The last iteration you posted on the bug report looks quite good; the
things that I would like to see done before merging it are:
- there's still a lot of overlap between the nautilus-file-operations
structs and the undo structs. I wonder if it wouldn't be simpler to have
the two code paths share the nautilus-file-operations Job structures
directly, which could be extended to keep them alive and owned by the
undo manager singleton as long as they are in the undo stack (I realize
this is a bit of a handwavy description, but I never tried to implement
it in code to figure out the details).
- regardless of how we implement it under the scenes, from a high-level
UI perspective I don't think we should use a stack of actions for
Undo/Redo, but only use the last one.
- the code still needs a bit of testing.

If you, or anyone else want to help out with any of these items, it
could really help getting the feature merged in faster.

Amos, if you have a GNOME git account, you should feel free to push your
updates to the upstream undo-manager branch.

Thanks!
Cosimo





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