Making accellerators work in a hidden menu



Hello,

I am having problems making the F11 button into a fullscreen toggle in my application. I can make the button go from windowed to fullscreen, but I can't get it to work from fullscreen to windowed. Note: I am using libglade XML.

Currently I have the F11 set as accellerator key for two menu items: the "fullscreen" menu item and the "Leave fullscreen" menu item. These are not the stock menu items, because the stock items in Glade don't have the accelerator keys (and I can't set them), so they are regular menu items with labels abd a stock icon assigned. One of these is always hidden, depending on the fullscreen state of the application.

The problem is that I call gtk_widget_hide() on the menubar when I go into fullscreen. The menu bar is hidden and the F11 accellerator doesn't work anymore (none of the menu accellerators work anymore).

Is there a way I can have the F11 button (and preferably all menu accellerators) work when the menubar widget is hidden?

--
Sander



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