[recipes] Don't be fooled by whitespace
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Don't be fooled by whitespace
- Date: Sat, 27 May 2017 22:51:00 +0000 (UTC)
commit 8b02085b2a1ef10e363b10f5aff30a1be1233d24
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 27 18:49:26 2017 -0400
Don't be fooled by whitespace
We also don't want to error underline the placeholder
if the entry contains only whitespace.
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 1651fbd..5a97f4c 100644
--- a/src/gr-ingredients-viewer-row.c
+++ b/src/gr-ingredients-viewer-row.c
@@ -406,7 +406,7 @@ save_unit (GrIngredientsViewerRow *row)
text = gtk_entry_get_text (GTK_ENTRY (row->unit_entry));
if (!parse_unit (text, &row->amount, &row->unit)) {
- if (text && *text)
+ if (text && text[strspn (text, " ")])
set_unit_error (row, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]