
On Sun, 2004-01-11 at 08:30, bulia byak wrote:
So, Mental, what is your advice for alt-x and alt-z - add gtk accelerators or manually send focus to specific widgets? I tend to think the latter would be simpler, and I don't think that much more "activate widget" actions will be needed anyway.
I think the selection toolbar should have an associated GtkAccelGroup which it installs in its toplevel window (see gtk_get_toplevel()) when it is shown, and deinstalls when it is hidden.
This accelerator group should have two closures installed which give focus to the appropriate widgets. These should be pretty easy to set up:
g_object_ref(widget); closure = g_cclosure_new((GCallback)gtk_widget_grab_focus, widget, (GClosureNotify)g_object_unref);
And then use gtk_accel_group_connect() to associate each closure with the appropriate key combination.
Part of the motivation for this is that neither event contexts nor verbs nor SPWidgets should need to know anything about the specifics of the toolbars.
-mental