Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread c.buhtz
On 2018-04-26 18:10 Luca Bacci wrote: > Hi, I did test it out, here's a working version: I used your code to create an answer to my StackOverflow question https://stackoverflow.com/a/50051155/4865723 ___ gtk-app-devel-list

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread c.buhtz
Thank you very much. Your example works for me but I don't understand why. ;) > win.bar > action_bar = Gio.SimpleAction.new('bar', None) The name of the action in the XML and the code is different. Why? What is the system behind it?

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread Eric Cashon via gtk-app-devel-list
"1. It uses "QMenu" (from Gtk or Gio?) to build a menu structure. I would prefere this way instead of an XML string. It should be possible in Python, too? Gtk.Menu or Gio.Menu?" My understanding of this is that the GMenu is used with the GtkApplication and a GtkMenu is used with the "regular"

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread Luca Bacci
Hi, I did test it out, here's a working version: import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from gi.repository import Gio class Window(Gtk.ApplicationWindow): def __init__(self): Gtk.Window.__init__(self) self.set_default_size(200, 100)

Developing application with GTK3 on WIndows 10

2018-04-26 Thread arkkimede
Following this link https://www.gtk.org/download/windows.php I prepared on Windows 10/64bit the environment to develop application with GTK3 and Glade on Windows 10. (I've installed msys2 / update packages / installing GTK3 libraries / installing Glade / installing toolchain to develop code ).

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread Luca Bacci
it should be like that (I can't test it right now, try yourself) #!/usr/bin/env python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from gi.repository import Gio class Window(Gtk.ApplicationWindow): def __init__(self): Gtk.Window.__init__(self)

Re: Using Gtk.Builder to create a menubar.

2018-04-26 Thread Luca Bacci
see here: https://wiki.gnome.org/HowDoI/GMenu https://wiki.gnome.org/HowDoI/GAction self.interface_info = """ > > > > Foo > > Bar > > > > > """ for every you