You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Anyway. Menus and Toolbars are not explained. There is only a fancy example about application menus. I have never seen an "application menu" before - kind of exotic? Is this plattform independent?
Where can I find infos (syntax, definitions, ...) about the XML file?
I need some more usual stuff like a menubar and a toolbar. ;)
I need some more usual stuff like a menubar and a toolbar. ;)
I think there is a bit of confusion here. GtkMenuBar and GtkToolBar are not deprecated. GtkAction and GtkUIManager are. GMenu can make menu bars and GAction is just used everywhere.
You wrote yourself that the documentaion is "poor". It is. API Reference is not documentaiton in they way I mean it.
The point is that the concept behind UIManager/GtkBuilder, the XML-string/file and all the possible menus is kind of exotic. So you need to bring this to a new user. The tutorial doesn't - no matter the the UIManager used there is deprecated.
I can add this to my todo list but first I have to understand the concept behind all that myself. ;)
Activity
TingPing commentedon Apr 21, 2018
It links to the page for the replacements: https://python-gtk-3-tutorial.readthedocs.io/en/latest/application.html
Gio.Action and Gio.Menu. Toolbars aren't deprecated and you can assign Gio.Action's to any button in them.
buhtz commentedon Apr 21, 2018
I don't see this link
https://python-gtk-3-tutorial.readthedocs.io/en/latest/application.html
on that page
https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/Action.html#Gtk.Action
Anyway. Menus and Toolbars are not explained. There is only a fancy example about application menus. I have never seen an "application menu" before - kind of exotic? Is this plattform independent?
Where can I find infos (syntax, definitions, ...) about the XML file?
I need some more usual stuff like a menubar and a toolbar. ;)
TingPing commentedon Apr 21, 2018
An application menu is just a menu associated with the application. How it appears depends upon your platform.
It is poorly documented but:
I think there is a bit of confusion here. GtkMenuBar and GtkToolBar are not deprecated. GtkAction and GtkUIManager are. GMenu can make menu bars and GAction is just used everywhere.
buhtz commentedon Apr 22, 2018
Of course, there is a lot of confusion. ;)
You wrote yourself that the documentaion is "poor". It is. API Reference is not documentaiton in they way I mean it.
The point is that the concept behind UIManager/GtkBuilder, the XML-string/file and all the possible menus is kind of exotic. So you need to bring this to a new user. The tutorial doesn't - no matter the the UIManager used there is deprecated.
I can add this to my todo list but first I have to understand the concept behind all that myself. ;)
I think this StackOverflow-Question explain my confusion.
Please also see the question How to create PyGObject application with a menubar using Gtk.Builder?.
osamuaoki commentedon Jul 25, 2021
You can create this with Glade.
See method I mentioned:
In short, use CSD and create Primary menu with popover using Glade with some text editor hacks.
I may write up more on this topic.
Osamu
osamuaoki commentedon Jul 26, 2021
I finished writing up an example to make .
GTK GUI with PyGObject (9) This page provide HeaderBar with CSD. It uses Glade and describes details.
I have been learning to program with python/Gtk.Template/Glade combination.