[recipes/chef-bio: 3/5] Refine the diet page content
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes/chef-bio: 3/5] Refine the diet page content
- Date: Mon, 12 Dec 2016 14:13:00 +0000 (UTC)
commit eb7efe4a6a4c72ecaebffe2d6065fdac32388f7c
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 12 07:14:48 2016 -0500
Refine the diet page content
Make it possible to have markup there, and add wikipedia
links for more information.
src/gr-category-tile.c | 4 ++--
src/gr-list-page.c | 2 +-
src/gr-list-page.ui | 1 -
3 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/gr-category-tile.c b/src/gr-category-tile.c
index 5786bba..e7b12a8 100644
--- a/src/gr-category-tile.c
+++ b/src/gr-category-tile.c
@@ -89,10 +89,10 @@ gr_diet_get_description (GrDiets diet)
label = _("A tree nut allergy is a hypersensitivity to dietary substances from tree nuts and
edible tree seeds causing an overreaction of the immune system which may lead to severe physical symptoms.
Tree nuts include, but are not limited to, almonds, Brazil nuts, cashews, chestnuts, filberts/hazelnuts,
macadamia nuts, pecans, pistachios, pine nuts,[2] shea nuts and walnuts.");
break;
case GR_DIET_VEGAN:
- label = _("Veganism is both the practice of abstaining from the use of animal products,
particularly in diet, and an associated philosophy that rejects the commodity status of animals.");
+ label = _("Veganism is both the practice of abstaining from the use of animal products,
particularly in diet, and an associated philosophy that rejects the commodity status of animals.\n<a
href=\"https://en.wikipedia.org/wiki/Veganism\">Learn more...</a>");
break;
case GR_DIET_VEGETARIAN:
- label = _("Vegetarian cuisine is based on food that meets vegetarian standards by not
including meat and animal tissue products (such as gelatin or animal-derived rennet). For lacto-ovo
vegetarianism (the most common type of vegetarianism in the Western world), eggs and dairy products such as
milk and cheese are permitted. For lacto vegetarianism, the earliest known type of vegetarianism (recorded in
India), dairy products such as milk and cheese are permitted.[1] The strictest forms of vegetarianism are
veganism and fruitarianism, which exclude all animal products, including dairy products as well as honey, and
even some refined sugars if filtered and whitened with bone char.");
+ label = _("Vegetarian cuisine is based on food that meets vegetarian standards by not
including meat and animal tissue products (such as gelatin or animal-derived rennet). For lacto-ovo
vegetarianism (the most common type of vegetarianism in the Western world), eggs and dairy products such as
milk and cheese are permitted. For lacto vegetarianism, the earliest known type of vegetarianism (recorded in
India), dairy products such as milk and cheese are permitted.\nThe strictest forms of vegetarianism are
veganism and fruitarianism, which exclude all animal products, including dairy products as well as honey, and
even some refined sugars if filtered and whitened with bone char.\n<a
href=\"https://en.wikipedia.org/wiki/Vegetarianism\">Learn more...</a>");
break;
case GR_DIET_MILK_FREE:
label = _("Lactose intolerance is a condition in which people have symptoms due to the
decreased ability to digest lactose, a sugar found in milk products. Those affected vary in the amount of
lactose they can tolerate before symptoms develop. Symptoms may include abdominal pain, bloating, diarrhea,
gas, and nausea. These typically start between half and two hours after drinking milk. Severity depends on
the amount a person eats or drinks. It does not cause damage to the gastrointestinal tract.");
diff --git a/src/gr-list-page.c b/src/gr-list-page.c
index 8f01d83..21cb512 100644
--- a/src/gr-list-page.c
+++ b/src/gr-list-page.c
@@ -168,7 +168,7 @@ gr_list_page_populate_from_diet (GrListPage *self,
gtk_widget_show (self->heading);
gtk_label_set_label (GTK_LABEL (self->heading), gr_diet_get_label (diet));
- gtk_label_set_label (GTK_LABEL (self->diet_description), gr_diet_get_description (diet));
+ gtk_label_set_markup (GTK_LABEL (self->diet_description), gr_diet_get_description (diet));
container_remove_all (GTK_CONTAINER (self->flow_box));
tmp = g_strdup_printf (_("No %s found"), get_category_title (diet));
diff --git a/src/gr-list-page.ui b/src/gr-list-page.ui
index 7fe9bf1..b4f2035 100644
--- a/src/gr-list-page.ui
+++ b/src/gr-list-page.ui
@@ -137,7 +137,6 @@
<property name="xalign">0</property>
<property name="wrap">1</property>
<property name="margin-top">20</property>
- <property name="margin-bottom">20</property>
</object>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]