[recipes] Change the way the next button behaves on timer pages
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Change the way the next button behaves on timer pages
- Date: Thu, 23 Feb 2017 01:36:01 +0000 (UTC)
commit f9f7d77b1c0c1a01e23a08aa74949d332f06ff40
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 22 20:27:49 2017 -0500
Change the way the next button behaves on timer pages
Make the next button start the timer if it is not started
yet, instead of going to the next page.
src/gr-cooking-view.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-cooking-view.c b/src/gr-cooking-view.c
index 9c4b3fa..375c8f6 100644
--- a/src/gr-cooking-view.c
+++ b/src/gr-cooking-view.c
@@ -482,6 +482,17 @@ gr_cooking_view_set_step (GrCookingView *view,
void
gr_cooking_view_next_step (GrCookingView *view)
{
+ StepData *s;
+
+ s = g_ptr_array_index (view->steps, view->step);
+
+ if (s->timer &&
+ !gr_timer_get_active (s->timer) &&
+ gr_timer_get_remaining (s->timer) > 0) {
+ gr_timer_start (s->timer);
+ return;
+ }
+
set_step (view, view->step + 1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]