diff options
author | Nathan Samson <nathansamson@gmail.com> | 2011-09-04 18:54:12 +0200 |
---|---|---|
committer | Nathan Samson <nathansamson@gmail.com> | 2011-09-04 18:54:12 +0200 |
commit | 1117cd37d71e294069a670bdf0851041575e0d5f (patch) | |
tree | 369c9bb8e3a80b49a5904cc5a7efc2584d5dd1a6 /main.c | |
parent | a6b9eaee0aa2ff67482560f4401e0dc6f2c79237 (diff) | |
download | subsurface-1117cd37d71e294069a670bdf0851041575e0d5f.tar.gz |
Use a pane so the dive list can be made wider or smaller to the users wishes
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -174,7 +174,8 @@ int main(int argc, char **argv) int i; GtkWidget *win; GtkWidget *divelist; - GtkWidget *table; + GtkWidget *paned; + GtkWidget *info_box; GtkWidget *notebook; GtkWidget *frame; GtkWidget *menubar; @@ -206,25 +207,25 @@ int main(int argc, char **argv) menubar = get_menubar_menu(win); gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0); - /* Table for the list of dives, cairo window, and dive info */ - table = gtk_table_new(2, 2, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - gtk_box_pack_end(GTK_BOX(vbox), table, TRUE, TRUE, 0); - gtk_widget_show(table); + /* HPane for left the dive list, and right the dive info */ + paned = gtk_hpaned_new(); + gtk_box_pack_end(GTK_BOX(vbox), paned, TRUE, TRUE, 0); /* Create the atual divelist */ divelist = create_dive_list(); - gtk_table_attach(GTK_TABLE(table), divelist, 0, 1, 0, 2, - 0, GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0); + gtk_paned_add1(GTK_PANED(paned), divelist); + + /* VBox for dive info, and tabs */ + info_box = gtk_vbox_new(FALSE, 5); + gtk_paned_add2(GTK_PANED(paned), info_box); /* Frame for minimal dive info */ frame = dive_info_frame(); - gtk_table_attach(GTK_TABLE(table), frame, 1, 2, 0, 1, - GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0, 0); + gtk_box_pack_start(GTK_BOX(info_box), frame, FALSE, TRUE, 5); /* Notebook for dive info vs profile vs .. */ notebook = gtk_notebook_new(); - gtk_table_attach_defaults(GTK_TABLE(table), notebook, 1, 2, 1, 2); + gtk_box_pack_start(GTK_BOX(info_box), notebook, TRUE, TRUE, 5); /* Frame for dive profile */ frame = dive_profile_frame(); |