Re: gtk rc file question




Dave Caswell <davec@asylum.apocalypse.org> writes:

> In the example rc file in the tutorial several of the widget class
> lines are listed with leading '*'s, and several aren't: 
> 
>       widget_class "GtkWindow" style "window"
>       widget_class "GtkDialog" style "window"
>       widget_class "GtkFileSelection" style "window"
>       widget_class "*Gtk*Scale" style "scale"
>       widget_class "*GtkCheckButton*" style "toggle_button"
>       widget_class "*GtkRadioButton*" style "toggle_button"
>       widget_class "*GtkButton*" style "button"
> 
> I was playing around with RC files, and I found that some widget
> classes seem to need the * and some don't.  What makes the
> difference??

Note that Windows Dialogs and FileSelections are all toplevel
widgets. What the "widget_class" declaration does is build
a path from the widget class names

 GtkWindow.GtkHBox.GtkButton

And then match against that. The * is a wildcard as it is for
shell globbing.

Why would you want this? Well, consider if you wanted to set
the style for just the column-label buttons in CLists, then
you would use

 widget_class "*GtkCList.GtkButton" my_style

Regards,
                                        Owen



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