Help with Gtk rc file





I would like to set the font that will be used in a GtkDrawingArea
from an rc file.  This is using Gtk---1.0.2, gtk+-1.2.3.
I've had no luck so far.

The rc file is read in with a call like this:
  gtk_rc_parse("gtk.rc");

My code in a subclass of Gtk_DrawingArea sets its name like this:
  set_name( "InstrSoftKey" );

The Gtk_DrawingArea subclass then looks for the font like this:
      _my_font = new Gdk_Font( da.get_style()->gtkobj()->font );


from gtk.rc:

style "InstrSoftKey"
{
  font = "-urw-avantgarde-book-r-normal-*-8-*-*-*-*-*-*-*"
}
widget "InstrSoftKey.GtkDrawingArea" style "InstrSoftKey"


Does the rc file look right?
Are there any examples of rc file setting for named widgets to be found?

Thanks.




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