Re: widget colors/fonts



Yasushi Shoji <yashi@yashi.com> writes:

> Hi,
> 
> nothing technical, but
> 
> From: Owen Taylor <otaylor@redhat.com>
> Subject: Re: widget colors/fonts
> Date: 21 Aug 2000 23:04:32 -0400
> 
> [...]
> 
> >  - I've called the functions gtk_widget_modify_fg, gtk_widet_modify_font,
> >    etc, to indicate their close connection to gtk_widget_modify_style().
> 
> why did we choose the word 'modify' here?  quick grep in gtk+/gtk
> indicated that these are the only functions using 'modify'.  
> 
> what are the differences among gtk_widget_set_style(),
> gtk_widget_modify_style(), and gtk_widget_style_set()?
> 
> i just thought using the word 'modify' is kind of odd. 

Basically, modify_style() was called modify_style() for two
reasons:
 
 a) To differentiate it from set_style()
 b) To indicate that it changes only some aspects of the style
    and leaves others unchanged. 

   (What it does is bind a single GtkRcStyle tightly to the
    widget. Since GtkRcStyle's allow any field to be unset, the fields
    that are set are changed the fields that are unset are left
    unchanged.)

And modify_fg(), etc, were named that way to inidicate the connection
to modify_style(). I'm not _completely_ sure that is better than
calling them set_fg(), but I think it's a little easier to understand
how it all works that way.

Regards,
                                        Owen





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