Hi All, Kindly review the attached patch for the following bug Bug #6520675: "Lengthy lines present in a mail are chopped to the right when they are printed/print previewed"
Attached patches wrap.diff and html.diff are applicable to the 2.20 branch of SNV spec-files. Problem : Lengthy lines present in a mail are chopped to the right when they are printed/print previewed. Steps to Simulate the Problem : 1 - Open a mail having lengthy lines in its body. 2 - Select "Print Preview" from "File" menu. 3 - You can notice that long lines are chopped. Analysis 'n Solution : It is observed that the lengthy lines in the mail are actually enclosed within the '<pre wrap=""> </pre>' tag. While displaying such mails, evolution does not wrap the lines in the mail display view even though the 'wrap' attribute is present for the 'PRE' element. This causes the line to be chopped in print/print preview. According to http://www.w3.org/TR/REC-html40/struct/text.html#h-9.3.4, the 'wrap' attribute is not part of the HTML 4.01 specifications for the 'PRE' element. Since the 'wrap' attribute is not standard, the way it is interpreted is left to the browsers/mailers. Browsers like IE (6.0 and 7.0) and Opera(9.02) display the line (embedded in '<PRE wrap=""> in one single line (without wrapping). Whereas, Netscape (6.2.2), Mozilla (1.7) and Firefox (1.0) wrap the line. Evolution too behaves the way IE and Opera do and does not wrap the lengthy line while displaying it in the display view which results in print preview chopping it. Hence in order to fix this issue, a 'Wrap' option is provided to the user in Preferences, wherein, o if the option is selected, then the long line in the display view will be wrapped. o if the option is not selected, then the line in the display view will not be wrapped. However, this is not instant apply on the currently displayed message. User has to switch between two messages to see the changes. The changes made for the above include o A new checkbox 'Wrap text to fit window width' in Tools->Settings->Mail Preferences->General tab o A new gconf key '/apps/evolution/mail/display/wrap_text'. Please note that 'lengthy html links' and 'lengthy single words' will not be wrapped. Thanks and Regards, Amit Sharma -------------- next part -------------- A non-text attachment was scrubbed... Name: evolution-08-wrap.diff Type: text/x-patch Size: 3546 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/jds-review/attachments/20080326/8c5a3376/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: gtkhtml-wrap.diff Type: text/x-patch Size: 696 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/jds-review/attachments/20080326/8c5a3376/attachment-0001.bin>
