[Glade-devel] Unbearabley Ultimate Undo Upgrade ....(patch)

Tristan Van Berkom tvb at gnome.org
Tue May 24 16:17:37 EDT 2005


Andy Somerville wrote:
[...]
> Also as an after thought, in the future might it desireable to have
> different undos for specific windows? E.x. undo in the property editor
> undoes entries into the fields of the property editor, whereas undo
> undoes creation/deletion/etc of widgets when the focus is on the
> windows created by the project.

I dont think thats right, are there any apps that work that way ?

> Maybe it would still be a good Idea to put all the callbacks that
> house that logic in one file in any case?

I was thinking somthing like this:

==========================================================
g_signal_connect (... "key-press-event", my_handler... );

/* ... */

my_handler () {
     /* call the centralized key handleing logic */
     glade_key_event_handle (... event args..., "key source");
}
==========================================================

where "key source" could be:

enum {
     KEYSRC_GWIDGET,
     KEYSRC_PLACEHOLDER,
     KEYSRC_PROJECT_WINDOW
     ... etc etc...
}

It would be the responsability of the calling code to setup its own
event signal handler, only it would call a centralized function to
take care of what gets done at that point.

Cheers,
                                   -Tristan


More information about the Glade-devel mailing list