Infinite Undo in Tasks

Yesterday I landed in Subversion a branch of Tasks I've been working on to remove all confirmation dialogs and replace them with infinite undo/redo. I'm really pleased with the end result, there are no more dialogs getting in the way and every action is undoable. To implement this I adapted MarlinUndoManager from Marlin by the most excellent Iain Holmes.

The basic design is that the application has a global undo context. When an operation which should be undoable occurs, you start the context, add as many undoables as required, and then end the context. Allowing a single undoable action to consist of multiple undoables lets the application reuse fine-grained logic to build coarse user-level actions (in Tasks this is used to build the Remove Completed action from multiple Delete Task actions). To make integrating this into applications even easier, I wrote a GtkAction which reflects the state of an undo context, so it is trivial to add redo/undo to the interface.

There is one remaining task left before this is ready to be released: undo support in the edit dialog entries. Once this is done, the next release of Tasks will be announced. I also plan to work with Iain on cleaning up this code and submitting it for inclusion into GTK+.

NP: Money Jungle, Duke Ellington, Charles Mingus, Max Roach

11:14 Tuesday, 18 Sep 2007 [#] [computers] (20 comments)

Posted by iain at Tue Sep 18 11:29:11 2007:
"the most excellent Iain Holmes"

True dat
Posted by Alan at Tue Sep 18 11:35:42 2007:
You sure that is accessible to have the Undo/Redo labels changing all the time?  (Dynamic text not good for screenreaders generally.)
Posted by Ross at Tue Sep 18 11:44:45 2007:
The text is in a menu, so the screenreader will only read it when the menu is open (as I understand a11y, anyway).
Posted by Mikkel Kamstrup Erlandsen at Tue Sep 18 12:41:41 2007:
Wow this sounds really great. I like Tasks, but I must admit that I like the sound of an Undo Manager in Gtk+ even more.

I'm pretty sure that you have just ignited another Undo-In-Nautilus mail-fest :-D
Posted by Benjamin Delagoutte at Tue Sep 18 13:29:15 2007:
What is the nice gray/orange theme you are using ?
Posted by Ross at Tue Sep 18 14:07:42 2007:
The theme is Darkilouche.
Posted by Xan at Tue Sep 18 15:08:32 2007:
Thanks for working on this guys, can't wait too see it in gtk.
Posted by Bryan at Tue Sep 18 15:44:54 2007:
Awesome work Ross!
Posted by Nick at Tue Sep 18 15:49:43 2007:
Just out of curiousity does/will Tasks integrate with the Gnome-panel clock and will there be a non-window managed option so that I can attach it to my desktop ALA Rainlendar for Windows?
Posted by Ross at Tue Sep 18 15:54:37 2007:
Yes, the panel clock and Tasks both show the same data.  I've no idea what Rainendar is but I don't have any plans to make a desktop widget version.  Someone else can, it would be trivial.
Posted by kdefan....umm, really at Tue Sep 18 18:17:44 2007:
Make a plasmoid
Then embed it in amarok!
Posted by Alex at Tue Sep 18 19:39:32 2007:
I think what nick is asking is that when you double click a date in the gnome panel clock, it opens up Evo. I don't want Evo, I want tasks. Is that going to be possible?
Posted by Ross at Tue Sep 18 19:42:45 2007:
Not without changes to the panel, it hard-codes evolution.
Posted by Nick at Tue Sep 18 20:48:48 2007:
Whoops - Didnt mean to resubmit - Ross was correct I would like to have seen a version that can attach to the desktop sans window decorations etc and maybe with variable alpha transparency (that or i'm just greedy). Sorry to hear that the damn clock hardcodes evolution... Patch time anyone :D
Posted by Eduardo Padoan at Tue Sep 18 20:50:33 2007:
Maybe GNOME could have a "default task-manager" option.
Posted by Ross at Tue Sep 18 21:07:42 2007:
A MIME type handler would do the job and the infrastruture already exists.
Posted by anonim at Wed Sep 19 16:33:11 2007:
This would be awesome if it where gnome system wide. (all apps, specially nautilus).

good work
Posted by Sebastian at Thu Sep 20 15:56:39 2007:
Is there a way to delete categories?
Posted by Sebastian at Thu Sep 20 15:59:15 2007:
Never mind, when I delete the last task in the category and restart tasks its gone. Great, love this application! :)
Posted by RubenV at Sat Sep 22 13:18:54 2007:
Great stuff Ross!

This should probably come somewhere on live.gnome.org or library.gnome.org.

Name:


E-mail:


URL:


Add 3 and 8 (required):


Comment: