Re: Accessing the accel_path of widgets
- From: Bill Haneman <bill haneman sun com>
- To: gtk-devel-list gnome org
- Subject: Re: Accessing the accel_path of widgets
- Date: 29 Apr 2003 21:05:58 +0100
Emmanual says:
> In the context of an IDE we are developing, we would like to have a
> window that summarizes all key bindings, including the menu shortcuts.
> This window should allow the user to easily modify all of those.
>
> One of the difficulties we have is that there doesn't seem to be a
> function to get the accel_path that was set for a menu_item.
> _gtk_widget_get_accel_path is not a public function, and thus shouldn't
> be used by applications, even if on linux libtool authorizes this. It
> doesn't work on Solaris for instance.
FYI you could use the ATK interfaces to get this information; objects
with keybindings should export the AtkAction API, which includes
atk_action_get_keybinding (atkaction, i)
where i is one of n = atk_action_get_n_actions (atkaction) possible
actions. The keybinding string actually includes several pieces of
information - delimited by semicolons, it gives you not only mnemonics
but also shortcuts, and for items that aren't yet active it can give a
sequence of keystrokes that will invoke the action, for instance for
gnome-terminal's Close Window menu-item it reports:
"c;<Alt>fc;<Shift><Control>q"
which means, when active (posted) the keybinding is just "c", otherwise
"<Alt>fc" will invoke the command (when the enclosing toplevel is
active), and the shortcut is "control-q".
This may be useful to you...
regards,
- Bill
> Is there any reason why this function isn't public ?
>
> regards,
> Emmanuel
>
>
> --__--__--
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
>
> End of gtk-devel-list Digest
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]