4

How can i define a Gtk application menu as described here but within the main glade file where the rest of the application is defined?

So to put it in a file like:

<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk+" version="3.10"/>
  <object class="GtkApplicationWindow" id="test">
    <property name="can_focus">False</property>
  </object>
</interface>

The glade file should be integrated in python using gi.repository but I think this should not make any difference.

elya5
  • 2,236
  • 1
  • 11
  • 27
  • I don't think Glade shows application menus yet. You need to open the main glade file and add the contents of there. – spirit walker Nov 11 '14 at 23:23
  • Does it have to be in a separate tag or in the same as the main window? – elya5 Nov 13 '14 at 18:56
  • What version of glade are you using? I'm not totaly sure of having understood your question because over glade 3.18.3 (The current on Debian Jessie), there are both buttons: Application Window & Application Menu. The Application window does exactly the same code you posted! –  Nov 14 '15 at 22:35
  • I can't find an Application Menu button anywhere on glade 3.20.0. – XTL Sep 08 '16 at 15:46
  • 2
    @XTL there isn't. You have to manually create it. You can take a look at the XML for it at [HowDoI/ApplicationMenu](https://developer.gnome.org/ApplicationMenu/). – elya5 Sep 22 '16 at 16:22

0 Answers0