Re: Accelerators don't work



Thanks for the reply. I solved this problem by
connecting the widget's "can-activate-accel" signal to
a callback which will always return true. This solved
the problem but now I am facing a new one. Some of the
accelerators don't work even if the menubar is
visible. But the shortcuts are shown as part of the
menu item beside its name. Any thoughts on what might
be happening here?


From: edscott wilson garcia <edscott xfce org>
Subject: Re: Accelerators don't work
To: Pramod Patangay <pramod_iitg yahoo com>
Cc: gtk-list gnome org
Message-ID: <1096903341 9629 11 camel scorpio>
Content-Type: text/plain; charset=iso-8859-1

El mié, 29-09-2004 a las 10:46, Pramod Patangay
escribió:
> Hi All,
> 
> I am trying to add accelerators to menu items. But
> they don't seem to work as they should. There's a
> menuitem which when activated will hide the menu
bar.
> But once the menu bar is hidden, none of the
> accelerators work.
>  I am using Fedora Core. Any idea on what's going on
> here? Why are accelerators disabled when menu bar is
> hidden? How do I enable them? and what are the other
> workarounds? Suprisingly I don't face this problem
on
> RedHatLinux-8 but only on FedoraCore.

I've got the same problem (Gentoo-linux with gtk-2.4).
This fault is
either a bug or the gtk developers decided that
accelerators to hidden
menu items is not a valid way to code. I'm not sure,
but probably the
latter is correct.

To work around this issue, you could add in your own
keypress event
handlers. When you get a hit for a key that should
accelerate to the
hidden menu item, just go to the callback directly and
return TRUE,
otherwise FALSE.


Edscott


		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]