Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gtk+ hiding menubar disables all keyboard shortcuts

Tags:

c

gtk

I want to hide the menubar in my gtk+ text editor. Thought that would be a simple matter of gtk_widget_hide(menubar), but when I do that I loose all keyboard shortcuts. How do you hide the menubar and keep the accelerator functionality?

like image 374
nomadicME Avatar asked Jun 17 '12 17:06

nomadicME


Video Answer


1 Answers

Hidden widgets do not respond to key events afaik.

A possible solution is to install a AcceleratorGroup for your whole application instead.

You could also try to hide all items of the menu-bar (untested).

like image 68
drahnr Avatar answered Oct 18 '22 00:10

drahnr