Re: (No default theme change please) Re: default theme consensus



On Fri, 2004-08-13 at 12:00 +0200, Murray Cumming wrote:

> Here's the bug:
> http://bugzilla.gnome.org/show_bug.cgi?id=142417
> 
> I get the idea that it's fixable in GTK+.

Yes.  It can be fixed even in the 2-4 branch if we make a non-
incompatible change like supporting

  widget_class "*.<GtkMenuItem>.*" style "style-for-menu-items"

That is, angle brackets around a type name indicate that g_type_is_a()
or something like that should be used rather than plain string matching.

Lotsa brownie points for whomever cooks that patch :)

Note that the RC system uses *plain* string matching.  Every theme seems
to use

  widget_class "*.GtkMenuItem.*" style "foo"
  widget_class "*.GtkCheckMenuItem.*" style "foo"
  ... etc ...

as a workaround for "classes that derive from GtkMenuItem don't inherit
its style".  However, this would work:

  widget_class "*MenuItem.*" style "foo"

this would match "GtkMenuItem", "GtkCheckMenuItem", etc.  If your
language binding generates a glue classes that don't work with themes,
just call them MyBindingMenuItem and use the pattern above, and they
will match.

[This is of course dangerous for people who create widgets *not* derived
from GtkMenuItem with names like StrangeMenuItem, as they will match,
but hey.]

  Federico




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