Prop: new print routine



Hi all!

During the last days I tried to write an improved printing routine, and here
is the result... As I almost completely rewrote src/print.c, I did not attach
a patch but the complete file. *Please* make a copy of the old one before
replacing it! I also attach a diff (against the cvs) for src/sendmsg-window.c
which fixes a bug when trying to print a message with attachments from the
composer (up to now the file names of the attachments are freed when
assembling the printout, thus leading to any type of problems).

The features of the new style print routine are---

* Print all parts of a message separated by lines. A text part is printed as
usual, an image is printed if gdk_pixbuf can load it, and everything else is
printed as a little icon plus a short info.

* Print the header only on the first page.

* Print a small footer with the more important information from the header on
every page in a smaller font. This stuff goes into the bottom margin.

* Move the page number in the top margin as it could interfere with very long
"from" fields.

* Take care of character conversion via iconv(). It also detects the glibc
minor version and adds a cast for iconv() to get rid of the compiler warnings
some people reported.

* Now for every type (text, image, ...) two routines exist. One is used to
prepare all necessary data and to count lines and pages, and the second one
prints the part. This layout makes it very easy to add new "handlers" for
other mime types.

* Enables I18N for the printout (the old version had a bad order of include
statements).

Please tell me what you think of this, *any* comment is *really* welcome!

Yours, Albrecht.

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

balsa-src-sendmsg-window-patch.gz

print.c.gz



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