Display of menu

The documentation Making an application menu states, “Application menus are in the process of being phased out”

Is there a Python example of the new primary menu? I have a GTK application with a headerbar with two buttons, but my menu is not showing when I set the headerbar. It used to show at the top of the GNOME Shell with Ubuntu 18.10 but not with 19.04.

How do ther GTK applications cram everything into the headerbar? For example, gedit has: open, new tab, save, and the hamburger menu. Can I get a menu widget from Gtk Builder?

As there is still no reply from a core dev:

A useful source for menu creation and gactions may be


You can see a picture with menu on the bottom of that page. Well it is C not python, but you should get the idea. I followed that page three years ago to make an editor in Nim, can not remember details currently.

And maybe also


Another source is gtkDcoding.com. There’s a whole series on menus starting with the basics and carrying on for nine blog entries.

For Linux, I did basically this and styled it with an icon.

builder = Gtk.Builder()

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.