[MPlayer-dev-eng] GUI (GTK+) cleanup?

Andras Mohari mayday at varoshaza.nagyatad.hu
Wed Oct 30 11:46:08 CET 2002


On Wed, Oct 30, 2002 at 10:10:01 +0100, jeroen dobbelaere wrote:
> Any english translation for mplayer-dev-eng ?

OK, here it is.  Well, more or less... It's far from perfect.

>>* Removed unnecessary gtk_widget_set_name(), gtk_widget_ref() and
>> gtk_object_set_data_full() calls.  Reason:  Widget names are
>> (nearly?) never used in the code, so gtk_widget_set_name() can be
>> dropped.  gtk_object_set_data_full() is often used to gtk_widget_unref()
>> the widget.  Do not call gtk_widget_ref() in the first place (why do we
>> need a ref count of 2?), so both calls can be removed.
>
ZP>OK, glade put them in, and I didn't care about them.

me>I don't know why it puts them in, they are useless crap.

>>* Removed "show" and "hide" signal handlers and changed the "destroy"
>> handler to simply NULLify the AboutBox variable.  gtkVAboutBox is
>> also removed as it's not needed to check whether the window is
>> visible or not -- you have AboutBox for that purpose.
>
ZP>And does gtk_*_destroy nullify that variable?

me>Yes, to be exact the signal handler for "destroy" is
me>gtk_widget_destroyed(), and it's passed the address of the AboutBox
me>variable that it will nullify.  The purpose of that function is
me>exactly this, but it's not documented in GTK+ 1.2. :)

>>* Made the OK button use the "clicked" signal instead of "released".
>
ZP>Why is click better than release ?

me>Because it will do nothing if you release the mouse button outside
me>the widget.

>>* Removed GtkFrame widgets; the whole stuff is simply packed in a 
>>GtkVBox.
>> (I think frames are used _way to much_.  Is it intentional?  Looks like
>> they are used for decoration, but frames are for grouping widgets
>> visually.  Windows look kinda "overcrowded" to me this way.)
>
ZP>No. It's needed. It's for decoration and it does not look
ZP>like the usual ugly gtk stuff thrown together in a hurry;
ZP>for example, glade.

me>Hm, it's a matter of taste. I think just the opposite. :)
me>They are useful, for example when you have to group widgets
me>that belong to each other logically, but otherwise...they
me>can hold only one child, so you have to pack boxes inside them
me>to carry more widgets.

>>* Changed window's wmclass to "about.MPlayer".  It's not a good idea to
>> translate the wmclass name (MSGTR_About)...
>
ZP>Noooo. That class appears in panels and other stuff. And it looks
ZP>ugly, why can't it be internationalized?

me>According to ICCCM, wmclass should not be tampered with, every
me>window of an application should have the same wmclass. Yeah,
me>whatever. :)  If somebody wants his window manager to not decorate
me>windows of the "About.MPlayer" class, then things will be broken
me>when he/she uses Hungarian, Polish etc. translation...
me>The latter one is my true point. :)
me>(And where does wmclass appear? Programs that display it in a
me>panel are brain-dead. Why don't they display WM_NAME or WM_ICON_NAME
me>(or whatever they are named)?)

>>* Removed unecessary line continuation characters from the about box
>> string and replaced text length with -1.
>
ZP>Shouldn't do cosmetic changes ... this is not xine.

me>OK, I just thought that you don't have to play with those chars
me>when changing the string.

-- 
Andras Mohari
mayday at mail.nagyatad.hu



More information about the MPlayer-dev-eng mailing list