summaryrefslogtreecommitdiff
path: root/src/ui-day.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui-day.c')
-rw-r--r--src/ui-day.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui-day.c b/src/ui-day.c
index 6eb055e..c8a4420 100644
--- a/src/ui-day.c
+++ b/src/ui-day.c
@@ -46,13 +46,18 @@ struct day_item *ui_day_selitem(void)
return day_get_item(listbox_get_sel(&lb_apt));
}
-void ui_day_set_selitem(struct day_item *day)
+void ui_day_set_selitem_by_aptev_ptr(union aptev_ptr p)
{
- int n = day_get_position(day);
+ int n = day_get_position_by_aptev_ptr(p);
if (n >= 0)
listbox_set_sel(&lb_apt, n);
}
+void ui_day_set_selitem(struct day_item *day)
+{
+ ui_day_set_selitem_by_aptev_ptr(day->item);
+}
+
/* Request the user to enter a new time. */
static int day_edit_time(int time, unsigned *new_hour,
unsigned *new_minute)