PATCH: printing of message header lines (slightly modified resent)



First thanks to all for getting 1.2 ready! Balsa really improves with every
release, and I can hardly imagine that I ever used Nutscrape for my e-mail...

Attached is a patch for src/print.c against 1.2 which has been in my
"pipeline" waiting for it... With it, balsa now prints no, selected, or
all headers according to the setting for the message display window. The
ordering is eaxctly the same as on the screen.

Hope you like it,
Cheers,
	Albrecht.



Code Details:
=============

* print_wrap_string() had a bug in the calculation of the line width which
resulted in too long lines after inserting a newline

* the info struct for printing the headers now has a GList instead of a
(small) gchar**

* introduce two helper functions to add (if enabled) a `label: header' pair to
the GList: sprint_header_tring() adds a string, print_header_list() a list

* prepare_header(): lots of changes to collect all header lines (this was
mostly stolen from src/balsa-message.c)

* print_header_val(): start a new page when printing header values if
necessary

* print_header(): take header data from the GList and free memory after
printing. Also take care of moving the ps cursor and starting a new page if
necessary

* print_default(): move ps cursor due to changed routine print_header_val()

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Albrecht Dreß  -  Monschauer Straße 22  -  D-53121 Bonn (Germany)
      Phone (+49) 228 6199571  -  mailto:albrecht.dress@arcormail.de
_________________________________________________________________________

balsa-1.2.0-print-patch.gz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]