From: Nathan Samson Date: Sun, 4 Sep 2011 20:15:55 +0000 (+0200) Subject: Merge hbonse's UI tweaks, but fixing the compile warnings. Also bringing it up to... X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=6b075e0339f419555f08ece3a6c4a29407ecc32b;p=ext%2Fsubsurface.git Merge hbonse's UI tweaks, but fixing the compile warnings. Also bringing it up to date with the master (and my own UI improvements) Signed-off-by: Nathan Samson --- 6b075e0339f419555f08ece3a6c4a29407ecc32b diff --cc info.c index beadda0,62a72e1..c3b5140 --- a/info.c +++ b/info.c @@@ -118,15 -119,15 +119,15 @@@ GtkWidget *dive_info_frame(void frame = gtk_frame_new("Dive info"); gtk_widget_show(frame); -- vbox = gtk_vbox_new(TRUE, 5); ++ vbox = gtk_vbox_new(TRUE, 6); gtk_container_set_border_width(GTK_CONTAINER(vbox), 3); gtk_container_add(GTK_CONTAINER(frame), vbox); -- hbox = gtk_hbox_new(TRUE, 5); ++ hbox = gtk_hbox_new(TRUE, 6); gtk_container_set_border_width(GTK_CONTAINER(hbox), 3); gtk_container_add(GTK_CONTAINER(vbox), hbox); -- hbox2 = gtk_hbox_new(FALSE, 0); ++ hbox2 = gtk_hbox_new(FALSE, 6); gtk_container_set_border_width(GTK_CONTAINER(hbox2), 3); gtk_container_add(GTK_CONTAINER(vbox), hbox2); @@@ -164,14 -181,14 +181,15 @@@ static GtkTextBuffer *text_view(GtkWidg return buffer; } - GtkWidget *extended_dive_info_box(void) + GtkWidget *extended_dive_info_widget(void) { GtkWidget *vbox; + - vbox = gtk_vbox_new(FALSE, 5); + vbox = gtk_vbox_new(FALSE, 6); - location = text_entry(vbox, "Location", FALSE); + location = text_entry(vbox, "Location"); + gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); - notes = text_entry(vbox, "Notes", TRUE); + notes = text_view(vbox, "Notes", TRUE); /* Add extended info here: name, description, yadda yadda */ update_dive_info(current_dive); diff --cc main.c index 99c4b6f,57c8f70..b2fa617 --- a/main.c +++ b/main.c @@@ -217,27 -214,27 +215,27 @@@ int main(int argc, char **argv /* 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); ++ info_box = gtk_vbox_new(FALSE, 6); + 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, 6, 6); - gtk_box_pack_start(GTK_BOX(info_box), frame, FALSE, TRUE, 5); ++ gtk_box_pack_start(GTK_BOX(info_box), frame, FALSE, TRUE, 6); /* Notebook for dive info vs profile vs .. */ notebook = gtk_notebook_new(); - gtk_table_attach(GTK_TABLE(table), notebook, 1, 2, 1, 2, - GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 6, 6); - gtk_box_pack_start(GTK_BOX(info_box), notebook, TRUE, TRUE, 5); ++ gtk_box_pack_start(GTK_BOX(info_box), notebook, TRUE, TRUE, 6); /* Frame for dive profile */ - frame = dive_profile_frame(); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, gtk_label_new("Dive Profile")); - dive_profile = frame; + dive_profile = dive_profile_widget(); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), dive_profile, gtk_label_new("Dive Profile")); /* Frame for extended dive info */ - box = extended_dive_info_box(); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), box, gtk_label_new("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("Extended Dive Info")); gtk_widget_set_app_paintable(win, TRUE); gtk_widget_show_all(win);