[recipes] Don't drop rows with empty amount when saving
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Don't drop rows with empty amount when saving
- Date: Sat, 27 May 2017 22:59:44 +0000 (UTC)
commit eb0fd912ddca0c800c195a3b30047fc3fe7a3be2
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 27 18:59:01 2017 -0400
Don't drop rows with empty amount when saving
We were not careful enough when saving a recipe, and
didn't handle empty amounts right.
src/gr-ingredients-viewer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-ingredients-viewer.c b/src/gr-ingredients-viewer.c
index 882f101..33441c3 100644
--- a/src/gr-ingredients-viewer.c
+++ b/src/gr-ingredients-viewer.c
@@ -157,7 +157,7 @@ collect_ingredients (GrIngredientsViewer *viewer)
if (s->len > 0)
g_string_append (s, "\n");
g_string_append_printf (s, "%s\t%s\t%s\t%s",
- amount, unit, id ? id : ingredient, viewer->title);
+ amount ? amount : "", unit ? unit : "", id ? id : ingredient,
viewer->title);
}
g_list_free (children);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]