]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Merge branch 'otu-tracking-v2' of git://github.com/dirkhh/subsurface
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Sep 2011 18:05:39 +0000 (11:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Sep 2011 18:05:39 +0000 (11:05 -0700)
* '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)

1  2 
gtk-gui.c

diff --cc gtk-gui.c
index 0c235b492d50a3e859962bf0142f4ac7cc3c7ae5,77e46c952da358e983caeb8c8102b81d91e507b5..4b6795621be141f4131b84ebd8ef4e22bd5203c9
+++ 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;
  
                "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));