diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-12-06 06:08:11 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-12-06 06:08:11 +0000 |
commit | a293afa0485e93c9eed50946a27c33c50fb27838 (patch) | |
tree | 1b03e97f176c94f2b1774f271ab4b3627292ecc7 /src | |
parent | bc64c59eb7d880af5bbc15ccc479f741bd481b33 (diff) |
added page number on printing.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1395 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/printing.c | 12 |
1 files changed, 11 insertions, 1 deletions
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); |