widget path peculiarity in gtk resource file (gtkrc)



Hi all,

I'm designing my application using glade.

I have a (stock) button named (in glade) as "closeButton". The "widget
path" to that button is supposed to be:

mainDisplayWindow > mainVBox > buttonHBox > closeButton

This can, clearly, be seen from Glade's Inspector.

With that in mind, I have designed (copied) a resource file (see
attachment).

The problem, or the thing that I don't understand, rather, is that the
above widget path doesn't suffice!

If I put "widget mainDisplayWindow.mainVBox.buttonHBox.closeButton" in
the rc file, the style is not applied to my button, rather what I have
to put instead is:
"widget mainDisplayWindow.mainVBox.buttonHBox.closeButton*" or to be
more precise:
"mainDisplayWindow.mainVBox.buttonHBox.closeButton.?????????????????????????????" (took some trial an error to get the exact char length :)).

My question is, what follows after the closeButton.? The gtkrc
documentation
(http://library.gnome.org/devel/gtk/2.12/gtk-Resource-Files.html) states
that '[t]he widget path ... consist of a "." separated list of all the
parents of the widget and the widget itself'. So why do I have to
specify an asterisk after the widget?

Thanks,
-Gezim
style "mebutton"
{
  # This shows all the possible states for a button.  The only one that
  # doesn't apply is the SELECTED state.
  
  fg[PRELIGHT] = { 0, 1.0, 1.0 }
  bg[PRELIGHT] = { 0, 0, 1.0 }
  bg[ACTIVE] = { 1.0, 0, 0 }
  fg[ACTIVE] = { 0, 1.0, 0 }
  bg[NORMAL] = { 1.0, 1.0, 0 }
  fg[NORMAL] = { .99, 0, .99 }
  bg[INSENSITIVE] = { 1.0, 1.0, 1.0 }
  fg[INSENSITIVE] = { 1.0, 0, 1.0 }
}
style "main_button" = "mebutton"
{
  font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
  bg[PRELIGHT] = { 0.75, 0, 0 }
}

widget "mainDisplayWindow.mainVBox.buttonHBox.closeButton.?????????????????????????????" style "main_button"

Attachment: muadhin02.glade
Description: application/glade



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