GtkImageMenuItem with custom label and image doesn't work
Issue:
When I create a simple GTK app with Glade with a menu bar, I can not use the Custom Label and Image option. The generated *.glade file can not be opened using GtkBuilder. Using Glade 3.22.1 on Mint 19
Steps:
- Create a GtkWindow
- Create a GtkBox inside the window; set the number of items to (2)
- Add a GtkMenuBar to the upper box
- Open the "File" GtkImageMenuItem
- Instead of "Stock Item" select "Custom label and image"; accept the default label ("imagemenuitem") and default stock image id ("gtk-missing-image")
- save the project glade file
- run a simple Python GTK program which uses Gtk.Builder() to load the glade file and show the window. You get the following error:
Traceback (most recent call last): File "main.py", line 20, in builder.add_from_file('glade-menu-error.glade') GLib.Error: gtk-builder-error-quark: glade-menu-error.glade:41:49 Object with ID __glade_unnamed_22 not found (13)
It's also worth nothing that after you save the erroneous glade file, it doesn't re-open in Glade correctly.
I've attached the sample Python program, and the generated glade file for reference.
Thanks,
jonbitzenglade-menu-error.glademain.py