[recipes] Add a forward method to the cooking view



commit 7f206b32f460c4fa77d8f841f4944b6a53e51f48
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Feb 23 15:19:46 2017 -0500

    Add a forward method to the cooking view
    
    This is the 'do the right thing' method which will start
    the timer if there is one on the current step. next_step()
    goes back to be just step switching with out any intelligence.

 src/gr-cooking-view.c |    8 +++++++-
 src/gr-cooking-view.h |    1 +
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-cooking-view.c b/src/gr-cooking-view.c
index 9f0bd61..a5f173c 100644
--- a/src/gr-cooking-view.c
+++ b/src/gr-cooking-view.c
@@ -513,7 +513,7 @@ gr_cooking_view_set_step (GrCookingView *view,
 }
 
 void
-gr_cooking_view_next_step (GrCookingView *view)
+gr_cooking_view_forward (GrCookingView *view)
 {
         StepData *s;
 
@@ -536,6 +536,12 @@ gr_cooking_view_prev_step (GrCookingView *view)
 }
 
 void
+gr_cooking_view_next_step (GrCookingView *view)
+{
+        set_step (view, view->step + 1);
+}
+
+void
 gr_cooking_view_set_timer_box (GrCookingView *view,
                                GtkWidget     *box)
 {
diff --git a/src/gr-cooking-view.h b/src/gr-cooking-view.h
index a974800..174c633 100644
--- a/src/gr-cooking-view.h
+++ b/src/gr-cooking-view.h
@@ -41,6 +41,7 @@ int            gr_cooking_view_get_n_steps   (GrCookingView *view);
 int            gr_cooking_view_get_step      (GrCookingView *view);
 void           gr_cooking_view_set_step      (GrCookingView *view,
                                               int            step);
+void           gr_cooking_view_forward       (GrCookingView *view);
 void           gr_cooking_view_next_step     (GrCookingView *view);
 void           gr_cooking_view_prev_step     (GrCookingView *view);
 void           gr_cooking_view_set_timer_box (GrCookingView *view,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]