Re: GtkStyles and RC-Files.



Sven Neumann (sven gimp org) wrote:
> > But this implies, that I have multiple buttons with the same name
> > (is this "legal"? Probably.), and it will be harder to identify a widget
> > if I want e.g. to assign a binding to a special widget.
> 
> Of course you can name your buttons "foobw_okbutton", "foobw_cancelbutton" 
> and the like as long as it matches the definition in the gtkrc.

Ok, this works and is a solution for my problem.

I don't like it though.

IMHO it is a design flaw when it is not possible to retrieve the styles
defined in the current set of gtkrc's. Sometimes there are different
"classes of styles" necessary. It would be cool, if the application-
programmer can say: "Ok, these Widgets have the style "important" and
these widgets have the style "optional". I let the user decide via the
gtkrc how these styles look like."

The user just has to figure out the names of the used "StyleClasses"
and redefine them to some different appearence.

Of course you can use an explicit naming scheme for this and it would
even work. But this has the overhead of matching widget names against
Regular expressions and is fleaky against typos. Plus it is IMHO
misusing the "name" property of a widget. A name is for identifying
an object, not for assigning it into some class.

This is like guessing nationality from the surname...   :-)

Maybe this is a little bit too philosophic, but it is right after
midnight and I should go to bed...

Bye,
        Simon

-- 
      Simon Budig unix-ag org       http://www.home.unix-ag.org/simon/




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