Re: GtkBuilder status

Yevgen Muntyan wrote:

Johan Dahlin wrote:

o My real concern is about supporting menus and toolbars built by
   - Is the motivation here only a "time-to-market" thing ?
   - If so, do you have any plan or stratagy to take baby-steps and
eventually get
     all the ui building code into the IBuildable ?
   From what I've seen, the IBuildable architechture provides exactly
what is needed to
   generate menus and toolbars directly, and more powerfully than the
   (does UIManager allow you to set properties on every object in its
heirarchy individually ?
   ... can you refer to an object in the UIManager from the rest of the
glade file ? for a
   random example: Say I want the mnemonic widget on a label somewhere
in the UI to be
   a GtkToolItem).
   Ofcourse I'm not saying that UIManager is bad, its provided some
convenient apis to build
   complex menus and get all that GtkAction stuff in order, but now
that we are introducing a
   complete builder into gtk+, it should be time for UIManager to die.

There should be only one obvious way of doing a specific task.
GtkUIManager is the currently the obvious way of creating menus and toolbars
Here you go, python programmer in action :)

Seriously speaking, GtkUIManager is not and may not be perfect. The single fact that it doesn't know that an action may need data in addition to callback may make it very hard to use. While it's stupid to use glade-built menus in an application which does require merging ui, it's just overkill to use GtkUIManager in simple applications that have more than one window: I want a callback to be executed with the toplevel window as an argument, and I can do it in glade; but to do it in GtkUIManager I have to break my head or arms or write custom GtkAction subclass, or use g_object_set_data,, all in *code*, not in glade. And then, there is GtkToggleAction, GtkRadioAction, I need to create the actions themselves, all just because I can't
make a simple menu in glade. It doesn't sound right.

IRC reminded me of this wonderful GtkUIManager thing: "user_data" thing that applies to a *group*: I want some action to get treeview widget as an argument, not the toplevel window. (no, I'm not saying it's impossible, I'm saying it's dumb to require the user to have to write *lot* of stuff to connect two callbacks).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]