After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779637 - Make the recipe printer respect the default image
Make the recipe printer respect the default image
Status: RESOLVED FIXED
Product: recipes
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Recipes maintainer(s)
Recipes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-03-06 01:43 UTC by Matthias Clasen
Modified: 2017-03-07 18:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Makes gr-recipe-printer respect the default image (2.50 KB, patch)
2017-03-07 14:58 UTC, Ekta Nandwani
none Details | Review
Makes gr-recipe-printer respect the default image (1.01 KB, patch)
2017-03-07 15:38 UTC, Ekta Nandwani
committed Details | Review

Description Matthias Clasen 2017-03-06 01:43:58 UTC
The recipe printer currently displays the first image, always.

It should use the default-image key that we store for each recipe now.
Comment 1 Ekta Nandwani 2017-03-07 14:58:05 UTC
Created attachment 347398 [details] [review]
Makes gr-recipe-printer respect the default image
Comment 2 Matthias Clasen 2017-03-07 15:05:17 UTC
Review of attachment 347398 [details] [review]:

::: src/gr-recipe-printer.c
@@ +133,3 @@
         if (images && images->len > 0) {
+                int def_index = gr_recipe_store_get_default_image(store,printer->recipe);
+                ri = &g_array_index (images, GrImage, def_index);

I don't think you need to add a store api here. You can just use gr_recipe_get_default_image, since you have the recipe object in hands anways.
Comment 3 Ekta Nandwani 2017-03-07 15:38:34 UTC
Created attachment 347405 [details] [review]
Makes gr-recipe-printer respect the default image

Here is the one with the changes incorporated.
Comment 4 Matthias Clasen 2017-03-07 17:14:19 UTC
Review of attachment 347405 [details] [review]:

looks good now