Re: Developing a GTK2 GUI

Gustavo Sverzut Barbieri <[email protected]>
Newsgroups gmane.comp.video.mplayer.g2.devel
Message-ID <[email protected]>
 --- Charles Ezell <[email protected]> escreveu: > 
> >Wouldn't be easier if we use something like libglade to design the
> ui?
> >
> >I mean, it's good to have a window builder, but they can become ugly
> >and non functional at a certain point, if no layout info is provided
> to
> >it.
> 
> I was waiting for this. :)
> It's a good idea, but the answer (for the config windows) is no.

:)

I imagined that, I myself was not that convinced because of the twice
work needed :)
   But I want to comment/ask on some points...


> Please keep reading for as to why.  If I am not clear enough or you
> want
> more info, please ask. :)
> 
> >However, putting too much layout info in mplayer's config would
> bloat
> >it.
> 
> Worse, the layout info would be worthless for some toolkits /
> platforms.
> I do not know of a way to represent it in a meaningful way for enough
> 
> platforms.
> They are too different.
> 
> For instance, writing a gui builder for GTK is much
> easier than writing one for win32.  Why?  Because GTK uses
> containers/boxes 
> to hold controls.
> In GTK, you just put controls in boxes and don't worry about the 
> corordinates
> because those are handled automatically.  This is so nice, because
> windows always tend to look good --even when they are resized.

Yes, I know that... win32 is the other way (coordinates-based) and I
don't know Mac to tell...


> >What about have a window builder that constructs glade's xml and
> then
> >one could go there and manually tweak the look.
> >    Mplayer gtk ui could be as easy as calling libglade!
> 
> There are a couple problems with this.
> 
> First, you would be doing the work twice, something I never like to
> do.

Neither do I :(


> Second, if I understand A'rpi correctly, is that the whole system
> is supposed to be dynamic.  If I do my job correctly,
> you guys should be able to add dozens of modules to mplayer and the
> users
> will not have to upgrade the GUI.  This isn't going to be possible
> if xml tweaking is involved.

How dynamic it would be... it will generate those windows at compile
time or at run time?

 
> Third, the core gui builder code isn't that complex and
> the config design is well thought out.  This makes things much
> easier.
> If I run into problems, we'll work things out.

My only hope is that the ui doesn't become something unlogical and
non-intuitive... sometimes it's better to put things together because
they're related, but doesn't worth to put them in a Frame or a Tab...
so maybe we can have at least 2 kind of groups: Visual (Frames, Tabs)
and Non-Visual.... or 3: Frames, Tabs, Non-Visual...
   Any ideas on that?

Also, maybe we could have the tab-order specified somewhere, so we can
arrange items based on that order... maybe that list could be other
place...

And (just to make you crazy ;) sometimes it's cool to have small items
arranged in 2/3 columns 

 
> >But, there comes a problem: how to keep track from human (manual)
> >interventions? Maybe the window builder could try to keep the old
> >layout (and maybe learn with it). Maybe we could keep the manual
> >changes as patches and apply it over and over (ugly, but easier).
> 
> That would be very hard to do and maintain.  I am probably going to
> have
> to write some algorithms for control placement (mainly how many
> controls on 
> a
> page is too many),  I will tweak those as necessary.
> The most important thing is not jamming stuff together.

IDEA: Every page you put, please I beg you to use a scroll-able content
(automatic scrollbars), so if someone have a 800x600 with big fonts,
things that generally looks well in 1024x768 will probably overflow the
screen... that happens a lot with linux gui apps :(


 
> >PS: IMHO grouping is something that could be in mplayer config
> struct,
> >and with that we can get a almost good GUI. Maybe just on releases
> we
> 
> Yes, I believe you are correct about this (i.e more than just a
> flag).
> I'm working on it.  But, as I said earlier, I'm going to make sure it
> works 
> first
> and the impact on the rest of the system is minimal.
> 

Ok.
 
> Thank you for your ideas + comments,

You're welcome.

Gustavo

_______________________________________________________________________
Conheça o novo Cadê? - Mais rápido, mais fácil e mais preciso.
Toda a web, 42 milhões de páginas brasileiras e nova busca por imagens!
http://www.cade.com.br
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.