[MPlayer-G2-dev] Developing a GTK2 GUI

Charles Ezell ardneh2 at hotmail.com
Sun Aug 3 09:04:39 CEST 2003


>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.

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.

>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.

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.

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.

>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.

>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.

>Gustavo


Thank you for your ideas + comments,

-Charles

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus



More information about the MPlayer-G2-dev mailing list