-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menus, Actions #127
Comments
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. |
I don't see this link 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? |
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. |
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?. |
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 |
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. |
It looks like that the currently suggested way to create MenuBars and ToolBars is deprecated?
python-gtk-3-tutorial.readthedocs.io/en/latest/menus.html
https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/Action.html#Gtk.Action
How can a new user know how to solve this now? I can not find any example code using the new solution.
The text was updated successfully, but these errors were encountered: