mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
4c04fe5316
commit
9e8aaad133
3 changed files with 42 additions and 20 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue