aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-06 06:08:11 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-06 06:08:11 +0000
commita293afa0485e93c9eed50946a27c33c50fb27838 (patch)
tree1b03e97f176c94f2b1774f271ab4b3627292ecc7
parentbc64c59eb7d880af5bbc15ccc479f741bd481b33 (diff)
added page number on printing.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1395 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.ja4
-rw-r--r--src/printing.c12
3 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f6dd079..a33872c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2006-12-06
+ * src/printing.c: added page number.
+
+2006-12-06
+
* src/printing.c: more proper implementetion.
2006-12-05
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 2ca645a0..42f6720b 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,9 @@
2006-12-06
+ * src/printing.c: ページ番号を付加。
+
+2006-12-06
+
* src/printing.c: より正確な実装。
2006-12-05
diff --git a/src/printing.c b/src/printing.c
index cdfb74b8..bf0191ca 100644
--- a/src/printing.c
+++ b/src/printing.c
@@ -366,6 +366,16 @@ static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context,
}
g_print("count = %d\n", count);
+ desc = gtkut_get_default_font_desc();
+ pango_font_description_set_size(desc, 12.0 * PANGO_SCALE);
+ pango_layout_set_font_description(layout, desc);
+ pango_font_description_free(desc);
+ g_snprintf(buf, sizeof(buf), "- %d -", pinfo->page_nr_per_msg + 1);
+ pango_layout_set_text(layout, buf, -1);
+ pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
+ cairo_move_to(cr, 0, height);
+ pango_cairo_show_layout(cr, layout);
+
g_object_unref(layout);
}
@@ -414,7 +424,7 @@ gint printing_print_messages_gtk(GSList *mlist, gboolean all_headers)
}
g_object_unref(op);
- for (i = 0; i < print_data->n_pages; i++) {
+ for (i = 0; i < print_data->pages->len; i++) {
PageInfo *pinfo;
pinfo = g_ptr_array_index(print_data->pages, i);
g_free(pinfo);