[FR] update UIManager sample #24

ildar opened this Issue Aug 9, 2012 · 7 comments


None yet

3 participants

ildar commented Aug 9, 2012

samples/gtk-demo/demo-uimanager.lua currently needs improvements.

  1. It doesn't use demo.ui file which is misleading.
  2. the demo should demonstrate a code + ui-file which is usual in Gtk world.

I know that you prefer Lua-style UI description. So I'll work on this, but no hurry.

pavouk commented Aug 9, 2012

gtk-demo is almost direct port of original C gtk-demo from Gtk package, and since they don't use demo.ui there, I didn't bother too. I also doubt that anyone will do anything with uimanager demo on Gtk+ side, because GktUIManager is kind of 'morally deprecated' now, Gtk guys now focus on Gtk.Application and Gio.Action /appmenus as the blessed principle for creating application menus. But you need at least Gtk3.4 for this stuff :-(

That said, I'll of course gladly accept any patches improving existing lgi code. :-)

ildar commented Aug 10, 2012

Pavel: 1st, thank you for guidance. Your hints about GApplication and Gio.GAction lead me to this trend.
Now per component:

  1. samples/gtk-demo/demo-uimanager.lua is indeed very close to gtk3-demo's ui_manager.c .

    Still it has a little problem: accelerators are broken: they all are Ctrl+N

  2. samples/gtk-demo/builder.lua is what I actually looking for. It uses demo.ui and clearly shows how to use external-made ui (with glade). demo.ui file is exact file from the original gtk3-demo.

    This one has problems too:

    • demo.ui is somewhat outdated (has <interface domain="gtk20">).
    • It isn't open with Glade for Gtk3
    • and has some

      Gtk-WARNING **: accessibility action on a widget that does not implement AtkAction

I'd fix demo.ui and push it upstream. After that you can pull it too.

pavouk commented Aug 10, 2012

fix for duplicate accelerators in demo-uimanager.lua is pushed to master


@pavouk Would it be possible to add an idiomatic appmenu example? I've been racking my brains trying to get it to work.

pavouk commented Oct 2, 2012

I'll try to cook something up once I get to it, but I'm now working on another feature (subclassing), so don't hold your breath :-)

ildar commented Oct 2, 2012

Added #28 for subclassing. Just to separate the topic.
(I see we have enough people for mailing list or at least a forum!)

@seblu seblu referenced this issue Mar 3, 2013

Segfault with 0.7.0 #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment