Bug 153669

Summary: [PATCH] Printing ignores changes in the header style
Product: [Applications] kmail Reporter: Jorge Salamero Sanz <bencer>
Component: messageviewerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jorge Salamero Sanz 2007-12-08 10:57:23 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Debian testing/unstable Packages

verbatim copy from bugs.debian.org/446912 with patch of Daniel Burrows

"If you change the header style from the "View" menu, then print the
current message, KMail prints the message with the previous header
style.  It doesn't change the printed header style until you exit and
restart the program.  Furthermore, if you hide the message pane, the
headers always print as "fancy" headers instead of using the mode
selected from View.  And to top things off, changes to the header mode
from a message window (what you get by double-clicking a message) are
ignored completely by the printer.

  It doesn't seem to matter how the print command is invoked (via
a menu item, right-clicking, or the toolbar); the results are the
same every time.

  It looks to me like the culprit is KMPrintCommand.  It creates
a fresh, hidden KMReaderWin to print the message -- but because
KMPrintCommand doesn't close over the currently selected print mode,
the new reader will use the global default print mode.  This should
be a pretty straightforward fix; I'll try to do it on the way to work
today.
Comment 1 Thomas McGuire 2007-12-09 15:02:03 UTC
Currently, I can't test the patch, because printing in KHTML is broken, see bug 152667.

If that gets fixed, remind me to look after this patch here again.
Comment 2 Thomas McGuire 2008-07-11 17:18:22 UTC
SVN commit 830974 by tmcguire:

Don't ignore a change in the header style when printing.
Patch by Daniel Burrows <dburrows at debian dot org>, thanks and sorry for the delay.

BUG: 153669
CCMAIL: 446912@bugs.debian.org


 M  +10 -4     kmcommands.cpp  
 M  +8 -2      kmcommands.h  
 M  +1 -0      kmmainwidget.cpp  
 M  +1 -0      kmreadermainwin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=830974
Comment 3 Thomas McGuire 2008-07-11 18:21:11 UTC
SVN commit 830993 by tmcguire:

Backport r830974 by tmcguire to the 4.1 branch:

Don't ignore a change in the header style when printing.
Patch by Daniel Burrows <dburrows at debian dot org>, thanks and sorry for the delay.

CCBUG: 153669
CCMAIL: 446912@bugs.debian.org


 M  +10 -4     kmcommands.cpp  
 M  +8 -2      kmcommands.h  
 M  +1 -0      kmmainwidget.cpp  
 M  +1 -0      kmreadermainwin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=830993