[recipes] printing: Add notes to the printout
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] printing: Add notes to the printout
- Date: Wed, 31 May 2017 21:03:56 +0000 (UTC)
commit 38762d53c7e439a5bf33aca36cd374dc28d7e305
Author: Matthias Clasen <mclasen redhat com>
Date: Wed May 31 17:03:24 2017 -0400
printing: Add notes to the printout
These are important information, don't leave them out.
src/gr-recipe-printer.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-recipe-printer.c b/src/gr-recipe-printer.c
index 3a7df80..d3ed1fc 100644
--- a/src/gr-recipe-printer.c
+++ b/src/gr-recipe-printer.c
@@ -216,6 +216,19 @@ begin_print (GtkPrintOperation *operation,
attrs = pango_attr_list_new ();
+ value = gr_recipe_get_notes (printer->recipe);
+ if (value && *value) {
+ attr = pango_attr_font_desc_new (title_font);
+ attr->start_index = s->len;
+ g_string_append (s, _("Notes"));
+ attr->end_index = s->len + 1;
+ pango_attr_list_insert (attrs, attr);
+
+ g_string_append (s, "\n");
+ g_string_append (s, value);
+ g_string_append (s, "\n\n");
+ }
+
tabs = pango_tab_array_new (2, FALSE);
pango_tab_array_set_tab (tabs, 0, PANGO_TAB_LEFT, 0);
pango_tab_array_set_tab (tabs, 1, PANGO_TAB_LEFT, amount_width);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]