[recipes/recipe-link: 2/6] Support recipe references in the instructions



commit 9abf1657f5e6457923c23440c25f3448f3663db4
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 1 21:43:14 2017 -0500

    Support recipe references in the instructions
    
    Support links in the text of the form <a href="recipe:ID">bla</a>,
    and go to the recipe with that ID when the link is clicked.

 src/gr-details-page.c  |   43 +++
 src/gr-details-page.ui |  675 ++++++++++++++++++++++++++----------------------
 2 files changed, 411 insertions(+), 307 deletions(-)
---
diff --git a/src/gr-details-page.c b/src/gr-details-page.c
index 26c6aac..e2346f6 100644
--- a/src/gr-details-page.c
+++ b/src/gr-details-page.c
@@ -148,6 +148,8 @@ struct _GrDetailsPage
         GtkWidget *notes_field;
         GtkWidget *description_label;
         GtkWidget *export_button;
+        GtkWidget *error_label;
+        GtkWidget *error_revealer;
 
         guint save_timeout;
 };
@@ -591,6 +593,43 @@ schedule_save (GtkTextBuffer *buffer, GrDetailsPage *page)
         page->save_timeout = g_timeout_add (250, save_notes, page);
 }
 
+static gboolean
+activate_link (GtkLabel      *label,
+               const char    *uri,
+               GrDetailsPage *page)
+{
+        if (g_str_has_prefix (uri, "recipe:")) {
+                GrRecipeStore *store;
+                const char *id;
+                g_autoptr(GrRecipe) recipe = NULL;
+
+                store = gr_app_get_recipe_store (GR_APP (g_application_get_default ()));
+
+                id = uri + strlen ("recipe:");
+                recipe = gr_recipe_store_get_recipe (store, id);
+                if (recipe) {
+                        GtkWidget *window;
+
+                        window = gtk_widget_get_ancestor (GTK_WIDGET (page), GTK_TYPE_APPLICATION_WINDOW);
+                        gr_window_edit_recipe (GR_WINDOW (window), recipe);
+                }
+                else {
+                        gtk_label_set_label (GTK_LABEL (page->error_label),
+                                             _("Could not find this recipe."));
+                        gtk_revealer_set_reveal_child (GTK_REVEALER (page->error_revealer), TRUE);
+                }
+                return TRUE;
+        }
+
+        return FALSE;
+}
+
+static void
+dismiss_error (GrDetailsPage *page)
+{
+        gtk_revealer_set_reveal_child (GTK_REVEALER (page->error_revealer), FALSE);
+}
+
 static void
 gr_details_page_init (GrDetailsPage *page)
 {
@@ -661,6 +700,8 @@ gr_details_page_class_init (GrDetailsPageClass *klass)
         gtk_widget_class_bind_template_child (widget_class, GrDetailsPage, notes_field);
         gtk_widget_class_bind_template_child (widget_class, GrDetailsPage, description_label);
         gtk_widget_class_bind_template_child (widget_class, GrDetailsPage, export_button);
+        gtk_widget_class_bind_template_child (widget_class, GrDetailsPage, error_label);
+        gtk_widget_class_bind_template_child (widget_class, GrDetailsPage, error_revealer);
 
         gtk_widget_class_bind_template_callback (widget_class, edit_recipe);
         gtk_widget_class_bind_template_callback (widget_class, delete_recipe);
@@ -673,6 +714,8 @@ gr_details_page_class_init (GrDetailsPageClass *klass)
         gtk_widget_class_bind_template_callback (widget_class, time_spin_output);
         gtk_widget_class_bind_template_callback (widget_class, check_clicked);
         gtk_widget_class_bind_template_callback (widget_class, cook_it_later);
+        gtk_widget_class_bind_template_callback (widget_class, activate_link);
+        gtk_widget_class_bind_template_callback (widget_class, dismiss_error);
 }
 
 GtkWidget *
diff --git a/src/gr-details-page.ui b/src/gr-details-page.ui
index e8cc7b8..d3f702e 100644
--- a/src/gr-details-page.ui
+++ b/src/gr-details-page.ui
@@ -11,81 +11,48 @@
     <property name="visible">True</property>
     <property name="orientation">vertical</property>
     <child>
-      <object class="GtkRevealer" id="cooking_revealer">
+      <object class="GtkOverlay">
         <property name="visible">1</property>
-        <child>
-          <object class="GtkBox">
+        <child type="overlay">
+          <object class="GtkRevealer" id="error_revealer">
             <property name="visible">1</property>
-            <property name="spacing">10</property>
-            <property name="hexpand">1</property>
-            <style>
-              <class name="location-bar"/>
-            </style>
-            <child>
-              <object class="GrToggleButton" id="ingredients_check">
-                <property name="visible">1</property>
-                <property name="halign">center</property>
-                <property name="relief">none</property>
-                <property name="label" translatable="yes">Ingredients
-gathered</property>
-                <signal name="clicked" handler="check_clicked"/>
-              </object>
-              <packing>
-                <property name="expand">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GrToggleButton" id="preheat_check">
-                <property name="visible">1</property>
-                <property name="halign">center</property>
-                <property name="relief">none</property>
-                <property name="label" translatable="yes">Oven
-preheated</property>
-                <signal name="clicked" handler="check_clicked"/>
-              </object>
-              <packing>
-                <property name="expand">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GrToggleButton" id="instructions_check">
-                <property name="visible">1</property>
-                <property name="halign">center</property>
-                <property name="relief">none</property>
-                <property name="label" translatable="yes">Instructions
-followed</property>
-                <signal name="clicked" handler="check_clicked"/>
-              </object>
-              <packing>
-                <property name="expand">1</property>
-              </packing>
-            </child>
+            <property name="halign">center</property>
+            <property name="valign">start</property>
             <child>
-              <object class="GtkMenuButton">
+              <object class="GtkFrame">
                 <property name="visible">1</property>
-                <property name="relief">none</property>
-                <property name="popover">timer_popover</property>
+                <style>
+                  <class name="app-notification"/>
+                </style>
                 <child>
-                  <object class="GtkStack" id="timer_stack">
+                  <object class="GtkBox">
                     <property name="visible">1</property>
+                    <property name="spacing">20</property>
+                    <property name="margin">10</property>
                     <child>
-                      <object class="GtkImage">
+                      <object class="GtkLabel" id="error_label">
                         <property name="visible">1</property>
-                        <property name="icon-name">alarm-symbolic</property>
-                        <property name="pixel-size">24</property>
+                        <property name="hexpand">1</property>
+                        <property name="halign">start</property>
                       </object>
-                      <packing>
-                        <property name="name">icon</property>
-                      </packing>
                     </child>
                     <child>
-                      <object class="GrTimerWidget" id="timer">
+                      <object class="GtkButton">
                         <property name="visible">1</property>
-                        <property name="valign">center</property>
+                        <property name="focus-on-click">0</property>
+                        <property name="relief">none</property>
+                        <signal name="clicked" handler="dismiss_error" swapped="yes"/>
+                        <style>
+                          <class name="image-button"/>
+                        </style>
+                        <child>
+                          <object class="GtkImage">
+                            <property name="visible">1</property>
+                            <property name="icon-name">window-close-symbolic</property>
+                            <property name="icon-size">1</property>
+                          </object>
+                        </child>
                       </object>
-                      <packing>
-                        <property name="name">timer</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
@@ -93,278 +60,370 @@ followed</property>
             </child>
           </object>
         </child>
-      </object>
-    </child>
-    <child>
-      <object class="GtkScrolledWindow">
-        <property name="visible">1</property>
-        <property name="hscrollbar-policy">never</property>
         <child>
           <object class="GtkBox">
             <property name="visible">1</property>
-            <property name="homogeneous">1</property>
-            <property name="expand">1</property>
-            <property name="halign">center</property>
-            <property name="valign">start</property>
-            <property name="margin-start">40</property>
-            <property name="margin-end">40</property>
-            <property name="margin-top">20</property>
-            <property name="margin-bottom">20</property>
-            <property name="spacing">20</property>
+            <property name="orientation">vertical</property>
             <child>
-              <object class="GtkBox">
+              <object class="GtkRevealer" id="cooking_revealer">
                 <property name="visible">1</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">10</property>
-                <property name="valign">start</property>
-                <child>
-                  <object class="GrImageViewer" id="recipe_image">
-                    <property name="visible">1</property>
-                  </object>
-                </child>
                 <child>
                   <object class="GtkBox">
                     <property name="visible">1</property>
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">6</property>
+                    <property name="spacing">10</property>
+                    <property name="hexpand">1</property>
+                    <style>
+                      <class name="location-bar"/>
+                    </style>
                     <child>
-                      <object class="GtkBox" id="warning_box">
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkImage" id="garlic_warning">
-                            <property name="icon-name">garlic-content-symbolic</property>
-                            <property name="tooltip-text" translatable="yes">Contains garlic</property>
-                            <property name="icon-size">1</property>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkImage" id="dairy_warning">
-                            <property name="icon-name">dairy-content-symbolic</property>
-                            <property name="tooltip-text" translatable="yes">Contains dairy 
products</property>
-                            <property name="icon-size">1</property>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkImage" id="gluten_warning">
-                            <property name="icon-name">wheat-content-symbolic</property>
-                            <property name="tooltip-text" translatable="yes">Contains Gluten</property>
-                            <property name="icon-size">1</property>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkImage" id="spicy_warning">
-                            <property name="icon-name">spicy-content-symbolic</property>
-                            <property name="tooltip-text" translatable="yes">Spicy</property>
-                            <property name="icon-size">1</property>
-                          </object>
-                        </child>
+                      <object class="GrToggleButton" id="ingredients_check">
+                        <property name="visible">1</property>
+                        <property name="halign">center</property>
+                        <property name="relief">none</property>
+                        <property name="label" translatable="yes">Ingredients
+gathered</property>
+                        <signal name="clicked" handler="check_clicked"/>
                       </object>
+                      <packing>
+                        <property name="expand">1</property>
+                      </packing>
                     </child>
                     <child>
-                      <object class="GtkBox" id="ingredients_box">
+                      <object class="GrToggleButton" id="preheat_check">
                         <property name="visible">1</property>
-                        <property name="orientation">vertical</property>
-                        <property name="margin-top">30</property>
+                        <property name="halign">center</property>
+                        <property name="relief">none</property>
+                        <property name="label" translatable="yes">Oven
+preheated</property>
+                        <signal name="clicked" handler="check_clicked"/>
+                      </object>
+                      <packing>
+                        <property name="expand">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GrToggleButton" id="instructions_check">
+                        <property name="visible">1</property>
+                        <property name="halign">center</property>
+                        <property name="relief">none</property>
+                        <property name="label" translatable="yes">Instructions
+followed</property>
+                        <signal name="clicked" handler="check_clicked"/>
+                      </object>
+                      <packing>
+                        <property name="expand">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkMenuButton">
+                        <property name="visible">1</property>
+                        <property name="relief">none</property>
+                        <property name="popover">timer_popover</property>
+                        <child>
+                          <object class="GtkStack" id="timer_stack">
+                            <property name="visible">1</property>
+                            <child>
+                              <object class="GtkImage">
+                                <property name="visible">1</property>
+                                <property name="icon-name">alarm-symbolic</property>
+                                <property name="pixel-size">24</property>
+                              </object>
+                              <packing>
+                                <property name="name">icon</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GrTimerWidget" id="timer">
+                                <property name="visible">1</property>
+                                <property name="valign">center</property>
+                              </object>
+                              <packing>
+                                <property name="name">timer</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
                       </object>
                     </child>
                   </object>
                 </child>
               </object>
-              <packing>
-                <property name="expand">1</property>
-              </packing>
             </child>
             <child>
-              <object class="GtkGrid">
+              <object class="GtkScrolledWindow">
                 <property name="visible">1</property>
-                <property name="valign">start</property>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="visible">1</property>
-                    <property name="label" translatable="yes">Serves</property>
-                    <property name="valign">baseline</property>
-                    <property name="xalign">1</property>
-                    <property name="margin-start">20</property>
-                    <property name="margin-end">20</property>
-                    <property name="margin-bottom">15</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkSpinButton" id="serves_spin">
-                    <property name="visible">1</property>
-                    <property name="halign">start</property>
-                    <property name="valign">baseline</property>
-                    <property name="hexpand">1</property>
-                    <property name="adjustment">serves_adjustment</property>
-                    <property name="width-chars">2</property>
-                    <property name="margin-bottom">8</property>
-                    <signal name="value-changed" handler="serves_value_changed" swapped="yes"/>
-                  </object>
-                  <packing>
-                    <property name="left-attach">1</property>
-                    <property name="top-attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="visible">1</property>
-                    <property name="label" translatable="yes">Preparation time</property>
-                    <property name="xalign">1</property>
-                    <property name="valign">baseline</property>
-                    <property name="margin-start">20</property>
-                    <property name="margin-end">20</property>
-                    <property name="margin-bottom">15</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="prep_time_label">
-                    <property name="visible">1</property>
-                    <property name="xalign">0</property>
-                    <property name="valign">baseline</property>
-                    <property name="hexpand">1</property>
-                  </object>
-                  <packing>
-                    <property name="left-attach">1</property>
-                    <property name="top-attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="visible">1</property>
-                    <property name="label" translatable="yes">Cooking time</property>
-                    <property name="xalign">1</property>
-                    <property name="valign">baseline</property>
-                    <property name="margin-start">20</property>
-                    <property name="margin-end">20</property>
-                    <property name="margin-bottom">30</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="cook_time_label">
-                    <property name="visible">1</property>
-                    <property name="xalign">0</property>
-                    <property name="valign">baseline</property>
-                    <property name="hexpand">1</property>
-                  </object>
-                  <packing>
-                    <property name="left-attach">1</property>
-                    <property name="top-attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="description_label">
-                    <property name="visible">1</property>
-                    <property name="xalign">0</property>
-                    <property name="wrap">1</property>
-                    <property name="max-width-chars">45</property>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">3</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
+                <property name="hscrollbar-policy">never</property>
                 <child>
-                  <object class="GtkLabel">
-                    <property name="visible">1</property>
-                    <property name="label" translatable="yes">Directions</property>
-                    <property name="xalign">0</property>
-                    <style>
-                      <class name="heading"/>
-                    </style>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">4</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="instructions_label">
-                    <property name="visible">1</property>
-                    <property name="xalign">0</property>
-                    <property name="wrap">1</property>
-                    <property name="max-width-chars">45</property>
-                    <property name="margin-bottom">30</property>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">5</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="chef_label">
-                    <property name="visible">1</property>
-                    <property name="xalign">0</property>
-                    <property name="wrap">1</property>
-                    <signal name="activate-link" handler="more_recipes" swapped="yes"/>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">6</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="visible">1</property>
-                    <property name="label" translatable="yes">Notes</property>
-                    <property name="xalign">0</property>
-                    <style>
-                      <class name="heading"/>
-                    </style>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">7</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkScrolledWindow">
+                  <object class="GtkBox">
                     <property name="visible">1</property>
-                    <property name="shadow-type">in</property>
-                    <property name="hscrollbar-policy">never</property>
-                    <property name="vscrollbar-policy">automatic</property>
-                    <property name="min-content-height">240</property>
+                    <property name="homogeneous">1</property>
+                    <property name="expand">1</property>
+                    <property name="halign">center</property>
+                    <property name="valign">start</property>
+                    <property name="margin-start">40</property>
+                    <property name="margin-end">40</property>
+                    <property name="margin-top">20</property>
+                    <property name="margin-bottom">20</property>
+                    <property name="spacing">20</property>
                     <child>
-                      <object class="GtkTextView" id="notes_field">
+                      <object class="GtkBox">
                         <property name="visible">1</property>
-                        <property name="wrap-mode">word</property>
-                        <property name="top-margin">10</property>
-                        <property name="left-margin">10</property>
-                        <property name="right-margin">10</property>
-                        <property name="bottom-margin">10</property>
+                        <property name="orientation">vertical</property>
+                        <property name="spacing">10</property>
+                        <property name="valign">start</property>
+                        <child>
+                          <object class="GrImageViewer" id="recipe_image">
+                            <property name="visible">1</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkBox">
+                            <property name="visible">1</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkBox" id="warning_box">
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkImage" id="garlic_warning">
+                                    <property name="icon-name">garlic-content-symbolic</property>
+                                    <property name="tooltip-text" translatable="yes">Contains 
garlic</property>
+                                    <property name="icon-size">1</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="dairy_warning">
+                                    <property name="icon-name">dairy-content-symbolic</property>
+                                    <property name="tooltip-text" translatable="yes">Contains dairy 
products</property>
+                                    <property name="icon-size">1</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="gluten_warning">
+                                    <property name="icon-name">wheat-content-symbolic</property>
+                                    <property name="tooltip-text" translatable="yes">Contains 
Gluten</property>
+                                    <property name="icon-size">1</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="spicy_warning">
+                                    <property name="icon-name">spicy-content-symbolic</property>
+                                    <property name="tooltip-text" translatable="yes">Spicy</property>
+                                    <property name="icon-size">1</property>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkBox" id="ingredients_box">
+                                <property name="visible">1</property>
+                                <property name="orientation">vertical</property>
+                                <property name="margin-top">30</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkGrid">
+                        <property name="visible">1</property>
+                        <property name="valign">start</property>
+                        <child>
+                          <object class="GtkLabel">
+                            <property name="visible">1</property>
+                            <property name="label" translatable="yes">Serves</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">1</property>
+                            <property name="margin-start">20</property>
+                            <property name="margin-end">20</property>
+                            <property name="margin-bottom">15</property>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="serves_spin">
+                            <property name="visible">1</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="hexpand">1</property>
+                            <property name="adjustment">serves_adjustment</property>
+                            <property name="width-chars">2</property>
+                            <property name="margin-bottom">8</property>
+                            <signal name="value-changed" handler="serves_value_changed" swapped="yes"/>
+                          </object>
+                          <packing>
+                            <property name="left-attach">1</property>
+                            <property name="top-attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel">
+                            <property name="visible">1</property>
+                            <property name="label" translatable="yes">Preparation time</property>
+                            <property name="xalign">1</property>
+                            <property name="valign">baseline</property>
+                            <property name="margin-start">20</property>
+                            <property name="margin-end">20</property>
+                            <property name="margin-bottom">15</property>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="prep_time_label">
+                            <property name="visible">1</property>
+                            <property name="xalign">0</property>
+                            <property name="valign">baseline</property>
+                            <property name="hexpand">1</property>
+                          </object>
+                          <packing>
+                            <property name="left-attach">1</property>
+                            <property name="top-attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel">
+                            <property name="visible">1</property>
+                            <property name="label" translatable="yes">Cooking time</property>
+                            <property name="xalign">1</property>
+                            <property name="valign">baseline</property>
+                            <property name="margin-start">20</property>
+                            <property name="margin-end">20</property>
+                            <property name="margin-bottom">30</property>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="cook_time_label">
+                            <property name="visible">1</property>
+                            <property name="xalign">0</property>
+                            <property name="valign">baseline</property>
+                            <property name="hexpand">1</property>
+                          </object>
+                          <packing>
+                            <property name="left-attach">1</property>
+                            <property name="top-attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="description_label">
+                            <property name="visible">1</property>
+                            <property name="xalign">0</property>
+                            <property name="wrap">1</property>
+                            <property name="max-width-chars">45</property>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">3</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel">
+                            <property name="visible">1</property>
+                            <property name="label" translatable="yes">Directions</property>
+                            <property name="xalign">0</property>
+                            <style>
+                              <class name="heading"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">4</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="instructions_label">
+                            <property name="visible">1</property>
+                            <property name="xalign">0</property>
+                            <property name="use-markup">1</property>
+                            <property name="wrap">1</property>
+                            <property name="max-width-chars">45</property>
+                            <property name="margin-bottom">30</property>
+                            <signal name="activate-link" handler="activate_link"/>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">5</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="chef_label">
+                            <property name="visible">1</property>
+                            <property name="xalign">0</property>
+                            <property name="wrap">1</property>
+                            <signal name="activate-link" handler="more_recipes" swapped="yes"/>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">6</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel">
+                            <property name="visible">1</property>
+                            <property name="label" translatable="yes">Notes</property>
+                            <property name="xalign">0</property>
+                            <style>
+                              <class name="heading"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">7</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkScrolledWindow">
+                            <property name="visible">1</property>
+                            <property name="shadow-type">in</property>
+                            <property name="hscrollbar-policy">never</property>
+                            <property name="min-content-height">240</property>
+                            <child>
+                              <object class="GtkTextView" id="notes_field">
+                                <property name="visible">1</property>
+                                <property name="wrap-mode">word</property>
+                                <property name="top-margin">10</property>
+                                <property name="left-margin">10</property>
+                                <property name="right-margin">10</property>
+                                <property name="bottom-margin">10</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">8</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
                   </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">8</property>
-                    <property name="width">2</property>
-                  </packing>
                 </child>
               </object>
             </child>
@@ -388,7 +447,9 @@ followed</property>
             <property name="visible">1</property>
             <property name="use-underline">1</property>
             <property name="label" translatable="yes">_Delete</property>
-            <style> <class name="destructive-action"/> </style>
+            <style>
+              <class name="destructive-action"/>
+            </style>
             <signal name="clicked" handler="delete_recipe" swapped="true"/>
           </object>
         </child>



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