summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-09 08:38:48 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-09 10:31:51 -0700
commit9437a6512a3b353197146c077c1816f0565e0981 (patch)
treee493bbc96ea193e5727d7582cc19cfcf7fb2ad1e /main.c
parent86e48bfe10d271f86c896e64350c35d59c94c331 (diff)
downloadsubsurface-9437a6512a3b353197146c077c1816f0565e0981.tar.gz
Add a notebook for cylinder information
Ok, so it's not connected to anything yet, and the tank choices (that don't do anything) are some random hardcoded collection, but maybe it will do something some day. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/main.c b/main.c
index 7088a6dfa..dc5453892 100644
--- a/main.c
+++ b/main.c
@@ -215,11 +215,9 @@ static void create_radio(GtkWidget *dialog, const char *name, ...)
box = gtk_hbox_new(TRUE, 10);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), box);
- gtk_widget_show(box);
label = gtk_label_new(name);
gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 0);
- gtk_widget_show(label);
va_start(args, name);
for (;;) {
@@ -239,7 +237,6 @@ static void create_radio(GtkWidget *dialog, const char *name, ...)
gtk_box_pack_start(GTK_BOX(box), button, TRUE, TRUE, 0);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), enabled);
g_signal_connect(button, "toggled", G_CALLBACK(callback_fn), NULL);
- gtk_widget_show(button);
}
va_end(args);
}
@@ -296,7 +293,7 @@ static void unit_dialog(GtkWidget *w, gpointer data)
"Fahrenheit", set_fahrenheit, (output_units.temperature == FAHRENHEIT),
NULL);
- gtk_widget_show(dialog);
+ gtk_widget_show_all(dialog);
result = gtk_dialog_run(GTK_DIALOG(dialog));
if (result == GTK_RESPONSE_ACCEPT) {
output_units = menu_units;
@@ -359,6 +356,7 @@ int main(int argc, char **argv)
GtkWidget *notebook;
GtkWidget *frame;
GtkWidget *dive_info;
+ GtkWidget *cylinder_management;
GtkWidget *menubar;
GtkWidget *vbox;
@@ -417,7 +415,11 @@ int main(int argc, char **argv)
/* Frame for extended dive info */
dive_info = extended_dive_info_widget();
- gtk_notebook_append_page(GTK_NOTEBOOK(notebook), dive_info, gtk_label_new("Extended Dive Info"));
+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), dive_info, gtk_label_new("Dive Notes"));
+
+ /* Frame for extended dive info */
+ cylinder_management = cylinder_management_widget();
+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), cylinder_management, gtk_label_new("Cylinders"));
gtk_widget_set_app_paintable(win, TRUE);
gtk_widget_show_all(win);