[Glade-users] glade-3 and GtkActionGroup



On Fri, 2009-04-17 at 00:56 -0400, Tristan Van Berkom wrote:
Out of curiousity, what is it that makes a menu merged with uimanager
better than a menu with actions of which some are hidden ?

Modularity. It is specific for very big apps with many features some of
which are rarely used. I usually keep one .c file per big dialog which
loads its separate Glade file when needed, and destroys the dialog when
it is closed.

If I would need some toolbar items for that dialog, there are two ways.
I can merge these items into main toolbar using UIManager, or I can put
additional toolbar on the screen. Neither approach is perfect. UIManager
can make my toolbar too long, hiding extra items in drop-down menu
button. Extra toolbar on the other hand can be too short, wasting
valuable space on the screen.

It certainly can be solved with "floating" container able to wrap its
children. Toolbars really do not need that merge feature. But that kind
of container widget is yet to be written.

On the other hand, and returning to the question, the single
hierarchical menu actually benefits from the UIManager, cause certain
actions in the dialog belong to "Edit" menu, others to "Insert", etc. If
I add completely separate menu item per dialog, I lose that logical
hierarchy. If I just encode all the features into the menu beforehand, I
lose modularity (and also waste the memory).

If GtkBuilder ever accommodate for menu merge/unmerge feature, the
UIManager should become deprecated, but until that day UIManager will
stay around because it serves the purpose. Glade's main audience is
small app devs and I agree with you that UIManager support is in no way
a priority. Especially that Glade's team resources seem to be very
limited.

Anyway, unfortunately I have enough time only to write long letters to
the mailing list. If writing some kind of export feature into UIManager
format for Glade took me comparable time I surely would do that
instead...




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