static void preferences_dialog(GtkWidget *w, gpointer data)
{
int result;
- GtkWidget *dialog, *font, *frame, *box, *vbox;
- GtkWidget *dialog, *font, *frame, *box, *button;
++ GtkWidget *dialog, *font, *frame, *box, *vbox, *button;
menu_units = output_units;
"Fahrenheit", set_fahrenheit, (output_units.temperature == FAHRENHEIT),
NULL);
+ frame = gtk_frame_new("Columns");
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), frame, FALSE, FALSE, 5);
+
+ box = gtk_hbox_new(FALSE, 6);
+ gtk_container_add(GTK_CONTAINER(frame), box);
+
+ button = gtk_check_button_new_with_label("Show SAC");
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), visible_cols.sac);
+ gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 6);
+ g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(sac_toggle), NULL);
+
+ button = gtk_check_button_new_with_label("Show OTU");
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), visible_cols.otu);
+ gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 6);
+ g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(otu_toggle), NULL);
+
font = gtk_font_button_new_with_font(divelist_font);
- gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), font, FALSE, FALSE, 5);
+ gtk_box_pack_start(GTK_BOX(vbox), font, FALSE, FALSE, 5);
gtk_widget_show_all(dialog);
result = gtk_dialog_run(GTK_DIALOG(dialog));