Okay, another RC file problem.



I must have really bad luck (or I'm a complete idiot), but I always seem
to have trouble with RC files.  Anyway, here is a code fragment from my
program:

---

gtk_rc_parse(gtkRcFile);

...
...
...

if (horizontal)
  volume_slider.widget = gtk_hscale_new(GTK_ADJUSTMENT(adjustment));
else
  volume_slider.widget = gtk_vscale_new(GTK_ADJUSTMENT(adjustment));

gtk_widget_set_name(volume_slider.widget, "volume slider");
gtk_scale_set_draw_value(GTK_SCALE(volume_slider.widget), FALSE);
gtk_widget_set_usize(volume_slider.widget, width, height);
gtk_widget_show(volume_slider.widget);

---

My RC file looks like this:

style "slider"
{  
  bg[NORMAL] = { 0.50, 0.50, 0.50 }
  bg[ACTIVE] = { 0.25, 0.25, 0.25 }
  bg[PRELIGHT] = { 0.50, 0.50, 0.50 }
}

widget "volume slider" style "slider"

Now, my problem is the volume slider isn't changing.  Am I doing this
correctly?  If I change the style setting so it's like this:

widget_class "*Gtk*Scale" style "slider"

it works fine, but using the name directly, it doesn't.  Any ideas as to
why this might be?  Thanks for any help here.

Brett.



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