Re: Generic undo stack for GTK+
- From: Holger Berndt <berndth gmx de>
- To: Tristan Van Berkom <tvb gnome org>
- Cc: gtk-devel-list gnome org
- Subject: Re: Generic undo stack for GTK+
- Date: Mon, 21 Jun 2010 23:25:27 +0200
On Mo, 21.06.2010 16:29, Tristan Van Berkom wrote:
>What happens when you have multiple buffers editing separate
>but interdependent project data ? Is the new code introduced
>to be so complex that it will handle the interleaving of commands
>on separate datasets into a single stack ?
No, I don't think it should be overly complex. It would be a neat start
if GtkTextView/GtkTextBuffer would support the same level of undo/redo
functionality that people are enjoying in third-party widgets for
quite a while now (most famously GtkSourceView).
If people need something more complex / more specific, they have to
build it on their own. Kind of like it works for most classes, doesn't
>How does this approach help you design an overall clean
>separation between your model, display and command code ?
It is just an undo stack. A container. Not more, not less. It does
neither impose nor solve design issues of the application.
> a.) why should undo/redo be buffer centric instead of document centric or
> session centric ?
That's application specific. Some applications could want a stack per
document, some per window, some per application.
] [Thread Prev