diff options
author | Vibha Yadav <yvibha@novell.com> | 2010-05-07 14:00:49 +0800 |
---|---|---|
committer | Bharath Acharya <abharath@novell.com> | 2010-05-07 14:00:49 +0800 |
commit | 37b839a2d3be8bacf160df237e673d33b1689204 (patch) | |
tree | d2f4f4f76537734deff5ea9d91a24e6349413673 /widgets/table/e-table-group-container.c | |
parent | 0b743a787cf5cc69b2521d41e1c7f5ec8a798101 (diff) | |
download | gsoc2013-evolution-37b839a2d3be8bacf160df237e673d33b1689204.tar.gz gsoc2013-evolution-37b839a2d3be8bacf160df237e673d33b1689204.tar.zst gsoc2013-evolution-37b839a2d3be8bacf160df237e673d33b1689204.zip |
Bug #545462 - Printing of contacts is weird.
Lot of improvements in contact printing. A few more to follow suit.
Diffstat (limited to 'widgets/table/e-table-group-container.c')
-rw-r--r-- | widgets/table/e-table-group-container.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index 72f2323acd..cf8aae1aff 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -1191,7 +1191,9 @@ e_table_group_container_print_page (EPrintable *ep, ETGCPrintContext *groupcontext) { cairo_t *cr; + GtkPageSetup *setup; gdouble yd; + gdouble page_height, page_margin; gdouble child_height; ETableGroupContainerChildNode *child_node; GList *child; @@ -1202,7 +1204,10 @@ e_table_group_container_print_page (EPrintable *ep, child_printable = groupcontext->child_printable; child = groupcontext->child; - yd = 6.5 * 72; + setup = gtk_print_context_get_page_setup (context); + page_height = gtk_page_setup_get_page_height (setup, GTK_UNIT_POINTS); + page_margin = gtk_page_setup_get_bottom_margin (setup, GTK_UNIT_POINTS) + gtk_page_setup_get_top_margin (setup, GTK_UNIT_POINTS); + yd = page_height - page_margin; if (child_printable) { if (child) @@ -1266,7 +1271,7 @@ e_table_group_container_print_page (EPrintable *ep, cairo_rectangle (cr, 0, 0, width - 2 * TEXT_AREA_HEIGHT,child_height); cairo_clip(cr); - e_printable_print_page (child_printable, context, width-2 * TEXT_AREA_HEIGHT, 0, quantize); + e_printable_print_page (child_printable, context, width-2 * TEXT_AREA_HEIGHT, height , quantize); yd += child_height + TEXT_AREA_HEIGHT; if (e_printable_data_left(child_printable)) |