Why doesn't this RC file work?



Why doesn't this simple program using the rc file given, paint the
button in wierd and wonderful colours?

   #include <gtk/gtk.h>
    int main( int   argc, char *argv[] )
    {
        GtkWidget *window;
        GtkWidget *button;
        
        gtk_init(&argc, &argv);
                gtk_rc_parse("test.gtk");
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        button = gtk_button_new_with_label ("Hello World");
                gtk_widget_set_name(button, "foo");
        gtk_container_add (GTK_CONTAINER (window), button);
        gtk_widget_show (button);
        gtk_widget_show (window);
        gtk_main ();
        }

#this is test.gtk
style "foo-style"
{
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 }
}

widget "foo.*GtkButton*" style "foo-style"



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