When manually adding a dive allow user to set avg depth as well

So far we only allowed setting the max depth.

This changes the layout of the entry widget and makes our helper function
create_date_time_widget return the hbox in which it positions the time
entry. I plan to reuse this later when allowing to edit the duration as
well as the start date and time under certain circumstances.

This is a small part of a feature request; see #75

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-02-27 14:44:28 -08:00
parent 4c04fe5316
commit 9e8aaad133
3 changed files with 42 additions and 20 deletions

View file

@ -1537,7 +1537,7 @@ static void edit_dive_from_path_cb(GtkWidget *menuitem, GtkTreePath *path)
static void edit_dive_when_cb(GtkWidget *menuitem, struct dive *dive)
{
GtkWidget *dialog, *cal, *h, *m;
GtkWidget *dialog, *cal, *h, *m, *timehbox;
timestamp_t when;
guint yval, mval, dval;
@ -1549,7 +1549,7 @@ static void edit_dive_when_cb(GtkWidget *menuitem, struct dive *dive)
when = dive->when;
utc_mkdate(when, &tm);
dialog = create_date_time_widget(&tm, &cal, &h, &m);
dialog = create_date_time_widget(&tm, &cal, &h, &m, &timehbox);
gtk_widget_show_all(dialog);
success = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT;