[recipes] Don't show placeholders in the details page
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Don't show placeholders in the details page
- Date: Sat, 27 May 2017 22:51:05 +0000 (UTC)
commit 72aaa531a67de7f8b6ad74708ea7fa3929fc0802
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 27 18:50:11 2017 -0400
Don't show placeholders in the details page
It is useless to see "Amount..." in the ingredients
list when we are not editing.
src/gr-ingredients-viewer-row.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-ingredients-viewer-row.c b/src/gr-ingredients-viewer-row.c
index 5a97f4c..0b47ca6 100644
--- a/src/gr-ingredients-viewer-row.c
+++ b/src/gr-ingredients-viewer-row.c
@@ -146,7 +146,7 @@ update_unit (GrIngredientsViewerRow *row)
space = amount[0] ? " " : "";
unit = row->unit ? row->unit : "";
tmp = g_strdup_printf ("%s%s%s", amount, space, unit);
- if (tmp[0] == '\0') {
+ if (tmp[0] == '\0' && row->editable) {
gtk_style_context_add_class (gtk_widget_get_style_context (row->unit_label), "dim-label");
gtk_label_set_label (GTK_LABEL (row->unit_label), _("Amount…"));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]