PATCH: printing of message header lines



Hi all!

Attached to this mail is a patch for src/print.c which 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.

Although the patch is not complicated, I don't know if this feature should be
included in 1.2 or kept for the 1.3 series (Pawel?). As always, I am not sure
if I introduced any leaks (of course I tried to avoid them... ;-)). However,
it would be really nice if the people who wanted this feature (thanks for
pointing me to that, btw!) could test it and report problems, if there are
any.

Cheers, Albrecht.


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

* print_wrap_string() [line 143ff.] had problems to calculate the width of
lines in Helvetica due to the use of gnome_font_get_width_string_n().
gnome_font_get_width_string() works fine, but needs some smaller chamges.

* the info struct for printing the headers now has a GList instead of a
(small) gchar** [line 301 ff.]

* introduce two helper functions to add (if enabled) a `label: header' pair to
the GList [line 307ff.]

* 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-print-headers.gz



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