From: Linus Torvalds Date: Tue, 27 Sep 2011 18:05:39 +0000 (-0700) Subject: Merge branch 'otu-tracking-v2' of git://github.com/dirkhh/subsurface X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=30ee87be92f0a0fffc98106852d9623a65dfe4ed;p=ext%2Fsubsurface.git Merge branch 'otu-tracking-v2' of git://github.com/dirkhh/subsurface * 'otu-tracking-v2' of git://github.com/dirkhh/subsurface: Store options in gconf Add preference option to chose if SAC and/or OTU should be in divelist Fix up trivial conflicts in gtk-gui.c (cleanup in gtk dialog wrt gtk_dialog_get_content_area() having introduced a new 'vbox' widget) --- 30ee87be92f0a0fffc98106852d9623a65dfe4ed diff --cc gtk-gui.c index 0c235b4,77e46c9..4b67956 --- a/gtk-gui.c +++ b/gtk-gui.c @@@ -256,7 -257,7 +267,7 @@@ OPTIONCALLBACK(sac_toggle, visible_cols 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; @@@ -294,8 -294,24 +305,24 @@@ "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));