# https://bugzilla.gnome.org/show_bug.cgi?id=742181

from gi.repository import GLib, Gtk

UI = """
<ui>
  <menubar name='Menu'>
    <menu action='Foo'>
    </menu>
    <menu action='Bar'>
    </menu>
  </menubar>
</ui>
"""

settings = Gtk.Settings.get_default()
settings.set_property("gtk-menu-images", True)

w = Gtk.Window()
ui = Gtk.UIManager()
ag = Gtk.ActionGroup.new('Blah')
ag.add_actions([
    ("Foo", None, "Foo Title"),
    ("Bar", None, "Bar Title"),
])
ui.insert_action_group(ag, -1)
ui.add_ui_from_string(UI)
w.add(ui.get_widget("/Menu"))
w.show_all()
w.connect("delete-event", Gtk.main_quit)

GLib.unix_signal_add(0, 2, Gtk.main_quit)
Gtk.main()
