[recipes] edit page: Show the default image
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] edit page: Show the default image
- Date: Sat, 28 Jan 2017 12:43:59 +0000 (UTC)
commit ea49264f2aa84aaf057eb67fc802c1e5e3a7683e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 28 10:13:15 2017 +0100
edit page: Show the default image
src/gr-edit-page.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-edit-page.c b/src/gr-edit-page.c
index a7006c7..d2cfa53 100644
--- a/src/gr-edit-page.c
+++ b/src/gr-edit-page.c
@@ -1800,6 +1800,7 @@ gr_edit_page_edit (GrEditPage *page,
const char *instructions;
const char *ingredients;
GrDiets diets;
+ int index;
g_autoptr(GArray) images = NULL;
g_autoptr(GrChef) chef = NULL;
GrRecipeStore *store;
@@ -1819,6 +1820,7 @@ gr_edit_page_edit (GrEditPage *page,
instructions = gr_recipe_get_instructions (recipe);
ingredients = gr_recipe_get_ingredients (recipe);
author = gr_recipe_get_author (recipe);
+ index = gr_recipe_get_default_image (recipe);
g_object_get (recipe, "images", &images, NULL);
@@ -1846,6 +1848,7 @@ gr_edit_page_edit (GrEditPage *page,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->milk_free_check), (diets & GR_DIET_MILK_FREE)
!= 0);
gr_image_viewer_set_images (GR_IMAGE_VIEWER (page->images), images);
+ gr_image_viewer_show_image (GR_IMAGE_VIEWER (page->images), index);
if (chef) {
g_autofree char *tmp = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]