Re: GTK+ Application class



Rodrigo Moya wrote:

On Thu, 2006-10-26 at 15:41 +0300, Mart Raudsepp wrote:
On Thu, 2006-10-26 at 10:39 +0200, Xavier Bestel wrote:
On Thu, 2006-10-26 at 10:26 +0200, Rodrigo Moya wrote:

yay, so it's probably better to have convenience functions on
GtkApplication, like:

gtk_application_create_dialog
gtk_application_create_main_window
The problem I see with this approach is that the 'typical app window'
concept is evolving (we saw the introduction of toolbars, statusbars,
maybe we will need a drag-n-drop-to-save-document icon or macosx-like-
side-menus or whatever the next fad is as a standard feature).
Indeed it can evolve quite a bit.

Considering what a typical dialog/toplevel usually contains, it could be
beneficial if this GtkAppWindow would also be capable of hiding some of
the layout information from the programmer - so that it could become
more themeable in that area, instead of requiring packing all this into
an application programmer selected GtkContainer (usually a GtkVBox). For
example see many of the blue sky ideas on gnome-look[1] and other
places[2].

a set_gadget (statusbar, menubar, etc) should give most of what's needed
there, but I'm not sure that covers all cases.

yeah, usually a "main app" window has 4 areas: menubar, toolbar, status
bar and working area (which is setup by the app as needed), so why can't
we just have set_* functions for all of them? Then, if we change the
layout, like in the gnome-look mockup, we only need to change the
GtkApplication implementation to lay out things differently.
My initial fear of the GtkApplication was that it was associated
with GnomeApp and thus implied some kind of implicit widget
layout - I was happily convinced that this was not the case, having
a UIManager interface for dynamicly generated UIs is cool, it shows
the application developer what tools he should use and what
infrastructure is sane in his app (instead of copying gedit and others,
as was outlined in a previous mail).

I think its completely wrong to assume that an application has a
menubar, toolbar, statusbar and/or others - every application is different,
many applications share these common traits but shouldnt be forced
to use those layouts by the api in any way.

The HIG is a great thing because its a "guidelines" - not a rulebook, since
writing a UI is more a game of exceptions than it is a game of rules.
For example - I'd really welcome any effort to create a default main app
structure in glade for UI developers to use as a template - this would
help solve consistancy problems without hardwiring application behaviour
and layout through the gtk+ api (which IMO should remain a simple set of
building blocks that one can do virtually anything with).

Cheers,
                               -Tristan




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