Propagate the current value of the Use Fixed Font option to the separate message window.

CCBUG:56302

svn path=/trunk/kdepim/; revision=387579
wilder-work
Ingo Klcker 21 years ago
parent faedae547f
commit 4404c80afd
  1. 4
      kmmainwidget.cpp
  2. 14
      kmreadermainwin.cpp
  3. 3
      kmreadermainwin.h

@ -2034,6 +2034,10 @@ void KMMainWidget::slotMsgActivated(KMMessage *msg)
assert( msg != 0 );
KMReaderMainWin *win = new KMReaderMainWin( mFolderHtmlPref, mFolderHtmlLoadExtPref );
KConfigGroup reader( KMKernel::config(), "Reader" );
bool useFixedFont = mMsgView ? mMsgView->isFixedFont()
: reader.readBoolEntry( "useFixedFont", false );
win->setUseFixedFont( useFixedFont );
KMMessage *newMessage = new KMMessage(*msg);
newMessage->setParent( msg->parent() );
newMessage->setMsgSerNum( msg->getMsgSerNum() );

@ -30,7 +30,7 @@
#include "kmreadermainwin.h"
KMReaderMainWin::KMReaderMainWin( bool htmlOverride, bool htmlLoadExtOverride,
KMReaderMainWin::KMReaderMainWin( bool htmlOverride, bool htmlLoadExtOverride,
char *name )
: KMail::SecondaryWindow( name ? name : "readerwindow#" ),
mMsg( 0 )
@ -86,6 +86,12 @@ KMReaderMainWin::~KMReaderMainWin()
saveMainWindowSettings( KMKernel::config(), "Separate Reader Window" );
}
//-----------------------------------------------------------------------------
void KMReaderMainWin::setUseFixedFont( bool useFixedFont )
{
mReaderWin->setUseFixedFont( useFixedFont );
}
//-----------------------------------------------------------------------------
void KMReaderMainWin::showMsg( const QTextCodec *codec, KMMessage *msg )
{
@ -100,7 +106,7 @@ void KMReaderMainWin::showMsg( const QTextCodec *codec, KMMessage *msg )
void KMReaderMainWin::slotPrintMsg()
{
KMCommand *command = new KMPrintCommand( this, mReaderWin->message(),
mReaderWin->htmlOverride(), mReaderWin->htmlLoadExtOverride(),
mReaderWin->htmlOverride(), mReaderWin->htmlLoadExtOverride(),
mReaderWin->overrideCodec() );
command->start();
}
@ -291,7 +297,7 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi
KPopupMenu * menu = new KPopupMenu;
mUrl = aUrl;
mMsg = &aMsg;
if(mReaderWin && !mReaderWin->copyText().isEmpty()) {
mReaderWin->copyAction()->plug( menu );
mReaderWin->selectAllAction()->plug( menu );
@ -331,7 +337,7 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi
QPopupMenu* copyMenu = new QPopupMenu(menu);
KMMainWidget* mainwin = kmkernel->getKMMainWidget();
if ( mainwin )
mainwin->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, this,
mainwin->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, this,
&mMenuToFolder, copyMenu );
menu->insertItem( i18n("&Copy To" ), copyMenu );
menu->insertSeparator();

@ -27,6 +27,9 @@ public:
bool aHTML, const QString& aFileName, const QString& pname,
const QTextCodec *codec, char *name = 0 );
virtual ~KMReaderMainWin();
void setUseFixedFont( bool useFixedFont );
// take ownership of and show @param msg
void showMsg( const QTextCodec *codec, KMMessage *msg );

Loading…
Cancel
Save