Re: [gtk-list] binding accelerators to hidden widgets
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] binding accelerators to hidden widgets
- Date: Tue, 22 Feb 2000 08:38:17 +0100 (CET)
On Mon, 21 Feb 2000, Vlad Harchev wrote:
> In my application, I found binding accelerators to hidden widgets very useful
> (for example, creating a hidden button with accelerator for "clicked" and
> binding signal handler to it to do complex tasks such as switching to
> predefined notebook page). But I want to know whether it's legal to do so:
> I want to know whether gtk developers think that handling accelerators
> by hidden widgets is a correct thing (or not - whether such nice feature will
> be removed sometime in the future since it's considered as a bug). But I
> expect that it's intended behaviour and that it won't change.
hm, this is a two folded issue. i must admit, i haven't yet spent thoughts
on this issue. while it's definitely clear that we don't want accelerators
to function for insensitive widgets, there may be cases like programmers
binding 'Y' (or something else) to some "Yes" button in a dialog, but on
occasions only showing that dialog with the "Yes" button hidden.
probably assuming that accelerators will not work for hidden widgets.
for such code, we should probably prohibit accelerator activation for hidden
in any case, what you are doing there sounds like real overkill, why can't
you catch the keys you are interested in with a toplevel's key_press_event
signal handler, and call your code from there?
> Best regards,
] [Thread Prev