[maemo-developers] Issue with GtkUIManager on OS2008?

From: Mike Morrison mike_morrison at alumni.uvic.ca
Date: Wed Nov 14 21:12:23 EET 2007
On Nov 14, 2007 2:28 AM, Tommi Komulainen <tommi.komulainen at nokia.com> wrote:
> On Wed, 2007-11-14 at 01:18 -0800, ext Mike Morrison wrote:
> > In my program I use GtkUIManager to create and manage keyboard
> > accelerators for the hardware keys. This works fine on OS 2007 but I
> > have a sneaking suspicion it does not work in OS2008.
> You're right, it won't work. Even on n810.
> The reason is that keyboard shortcuts are disabled when there's no
> keyboard available; there's no point in wasting space by displaying the
> shortcuts when you don't have a keyboard to actually use them. See
> http://bugzilla.gnome.org/show_bug.cgi?id=72375
> We pretty much overlooked the keys on the outside, sorry :-(

Any chance this will be fixed? It seems like it would be better to
hide the accelerator labels while keeping the accelerators active. Is
that possible?

> You can always use the "key-press-event" signal on toplevel window for
> handling the special hardware keys.

This seems like a hack that I would like to avoid. GtkUIManager is
much better because I can use it to merge the menus, toolbars, and
accelerators in and out depending on the state of the application.

> (You can toggle the keyboard shortcuts with /apps/osso/gtk/enable-accels
> and /apps/osso/gtk/enable-mnemonics GConf keys though be aware that
> input methods will overwrite the values when the availability of
> hardware keyboard changes.)

Yikes... I'd really rather not have to resort to this either.

Would setting the "gtk-enable-accels" property to TRUE reenable the
accelerators? If so,  could I also then monitor this property through
the "property-notify-event" signal and set it back to TRUE if it gets
set to FALSE? This seems like it would be the best solution for me
(besides a proper fix to the bug) as it would require the least amount
of changes and would still be compatible with the GtkUIManager (as
opposed to having to handling key-press-event).



More information about the maemo-developers mailing list