void theme_init(GtkThemeEngine * engine) { GtkRangeClass *rangeclass; GtkCheckButtonClass *checkbuttonclass; GtkCheckButtonClass *radiobuttonclass; /* g_print("theme_init\n"); */ engine->parse_rc_style = theme_parse_rc_style; engine->merge_rc_style = theme_merge_rc_style; engine->rc_style_to_style = theme_rc_style_to_style; engine->duplicate_style = theme_duplicate_style; engine->realize_style = theme_realize_style; engine->unrealize_style = theme_unrealize_style; engine->destroy_rc_style = theme_destroy_rc_style; engine->destroy_style = theme_destroy_style; engine->set_background = theme_set_background; rangeclass = (GtkRangeClass *)gtk_type_class(gtk_range_get_type()); rangeclass->slider_width = 11; rangeclass->stepper_size = 11; rangeclass->min_slider_size = 15; radiobuttonclass = (GtkCheckButtonClass*)gtk_type_class (gtk_radio_button_get_type ()); radiobuttonclass->indicator_size = 12; checkbuttonclass = (GtkCheckButtonClass*)gtk_type_class (gtk_check_button_get_type ()); checkbuttonclass->indicator_size = 10; }
void ok_cb (GtkWidget *w, void *v) { gboolean edit=TRUE; GtkWidget *widget; GtkType type; GSList *current = widgets; while (current) { edit=TRUE; widget = (GtkWidget *)current->data; current = current->next; type = GTK_OBJECT_TYPE(widget); if (type == gtk_entry_get_type()) output_entry(widget); if (type == gtk_text_get_type()) output_text(widget,&edit); if (type == gtk_combo_get_type()) output_combo(widget); if (type == gtk_check_button_get_type()) output_check_button(widget); if (type == gtk_option_menu_get_type()) output_option_menu(widget); /* if there are more widgets with output values, separate them */ if (current && edit) { putchar ('\v'); } } quit(RETURN_OK); }