diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-05-27 05:19:41 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-05-27 05:19:41 +0800 |
commit | 0b1cd2dd5b0b2b35a0c12032b54ac51b97b22110 (patch) | |
tree | d282033033e0fd8bb3c1632084d4c09f90dbbb2b /addressbook/printing | |
parent | 3f213cfbef9142d117fbd9219cf12cbecc39f59e (diff) | |
download | gsoc2013-evolution-0b1cd2dd5b0b2b35a0c12032b54ac51b97b22110.tar.gz gsoc2013-evolution-0b1cd2dd5b0b2b35a0c12032b54ac51b97b22110.tar.zst gsoc2013-evolution-0b1cd2dd5b0b2b35a0c12032b54ac51b97b22110.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook/printing')
-rw-r--r-- | addressbook/printing/e-contact-print.c | 26 | ||||
-rw-r--r-- | addressbook/printing/e-contact-print.h | 4 |
2 files changed, 17 insertions, 13 deletions
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index eca65221be..7eb955bba7 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -277,7 +277,6 @@ e_contact_get_contact_height (EContact *contact, EContactPrintContext *ctxt) return cntct_height; } - static void e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt) { @@ -338,10 +337,16 @@ e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt) ctxt->context, ctxt->style->body_font, ctxt->x, ctxt->y, ctxt->column_width + 4, text); - if ( get_font_width (ctxt->context, ctxt->style->body_font, text) > ctxt->column_width) - wrapped_lines = ( get_font_width (ctxt->context, ctxt->style->body_font, text) / (ctxt->column_width+4)) + 1; - ctxt->y = ctxt->y + ((wrapped_lines+1) *e_contact_text_height ( - ctxt->context, ctxt->style->body_font, text)); + if (get_font_width (ctxt->context, + ctxt->style->body_font, text) > ctxt->column_width) + wrapped_lines = + (get_font_width (ctxt->context, + ctxt->style->body_font, text) / + (ctxt->column_width+4)) + 1; + ctxt->y = + ctxt->y + ((wrapped_lines + 1) * + e_contact_text_height (ctxt->context, + ctxt->style->body_font, text)); ctxt->y += .2 * get_font_height (ctxt->style->body_font); @@ -353,8 +358,6 @@ e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt) cairo_restore (cr); } - - static gint contact_compare (EContact *contact1, EContact *contact2) { @@ -651,7 +654,8 @@ contact_draw (EContact *contact, EContactPrintContext *ctxt) ctxt->first_section = FALSE; } - else if (!ctxt->first_contact && (( ctxt->y + e_contact_get_contact_height (contact, ctxt)) > page_height)) { + else if (!ctxt->first_contact && ((ctxt->y + + e_contact_get_contact_height (contact, ctxt)) > page_height)) { e_contact_start_new_column (ctxt); if (ctxt->style->letter_headings) e_contact_print_letter_heading (ctxt, ctxt->section); @@ -712,8 +716,8 @@ contact_begin_print (GtkPrintOperation *operation, } } -/* contact_page_draw_footer inserts the - * page number at the end of each page +/* contact_page_draw_footer inserts the + * page number at the end of each page * while printing*/ void contact_page_draw_footer (GtkPrintOperation *operation, @@ -727,7 +731,7 @@ contact_page_draw_footer (GtkPrintOperation *operation, gchar *text; cairo_t *cr; GtkPageSetup *setup; - + /*Uncomment next if it is successful to get total number if pages in list view * g_object_get (operation, "n-pages", &n_pages, NULL)*/ text = g_strdup_printf (_("Page %d"), page_nr + 1); diff --git a/addressbook/printing/e-contact-print.h b/addressbook/printing/e-contact-print.h index e16abf2435..d87a3e6fcb 100644 --- a/addressbook/printing/e-contact-print.h +++ b/addressbook/printing/e-contact-print.h @@ -31,8 +31,8 @@ void e_contact_print (EBook *book, EBookQuery *query, GList *contact_list, GtkPrintOperationAction action); -void contact_page_draw_footer (GtkPrintOperation *operation, - GtkPrintContext *context, +void contact_page_draw_footer (GtkPrintOperation *operation, + GtkPrintContext *context, gint page_nr); #endif /* E_CONTACT_PRINT_H */ |