rc files



My rc file don't work, why? I need help. 

example.c---------------------------------------------

int main (int argc, char *argv[])
{
    GtkWidget *window;
    GtkWidget *vbox;
    GtkWidget *label1, *label2, *label3;

    gtk_init (&argc, &argv);
    gtk_rc_parse ("./filerc");

    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

    gtk_signal_connect (GTK_OBJECT (window), "delete_event",
                        GTK_SIGNAL_FUNC (delete_event), NULL);
		
    vbox = gtk_vbox_new (FALSE, 20);
    gtk_container_add (GTK_CONTAINER (window), vbox);

    label1 = gtk_label_new ("Label Style_normal");
  	gtk_box_pack_start (GTK_BOX (vbox), label1, FALSE, FALSE, 0);
	gtk_widget_show (label1);

	label2 = gtk_label_new ("Label Style_1");
	gtk_widget_set_name(label2, "Style_1");
  	gtk_box_pack_start (GTK_BOX (vbox), label2, FALSE, FALSE, 0);
	gtk_widget_show (label2);

	label3 = gtk_label_new ("Label Style_2");
	gtk_widget_set_name(label3, "Style_2");
  	gtk_box_pack_start (GTK_BOX (vbox), label3, FALSE, FALSE, 0);
	gtk_widget_show (label3);

    gtk_widget_show (vbox);
    gtk_widget_show (window);

    gtk_main ();

    return 0;
}/* main */


filerc------------------------------------

style "Label1_style"
{
  font = "-adobe-helvetica-bold-r-normal--12-*-*-*-*-*-*-*"
}

style "Label2_style"
{
  font = "-adobe-helvetica-bold-r-normal--18-*-*-*-*-*-*-*"
}

widget "Style_1.GtkLabel" style "Label1_style"
widget "Style_2.GtkLabel" style "Label2_style"





Thanks.



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