Couldn't really test this yet because of bug 223809.

SVN_MERGE:
Merged revisions 1080495 via svnmerge from 
svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim

........
  r1080495 | tmcguire | 2010-01-26 12:07:50 +0100 (Tue, 26 Jan 2010) | 3 lines
  
  Call a slot when a reply/foward is done in the seperate reader.
  Doesn't do anything meaningful yet.
........

svn path=/trunk/KDE/kdepim/kmail/; revision=1080550
wilder-work
Thomas McGuire 16 years ago
parent b4fe084cc0
commit 794600cbd5
  1. 16
      kmreadermainwin.cpp
  2. 4
      kmreadermainwin.h
  3. 2
      messageactions.cpp
  4. 8
      messageactions.h

@ -139,6 +139,11 @@ void KMReaderMainWin::showMessage( const QString & encoding, const Akonadi::Item
toolBar( "mainToolBar" )->show();
}
void KMReaderMainWin::slotReplyOrForwardFinished()
{
kDebug() << "Reply or forward done!";
}
//-----------------------------------------------------------------------------
void KMReaderMainWin::slotTrashMsg()
{
@ -171,6 +176,8 @@ void KMReaderMainWin::slotForwardInlineMsg()
} else {
command = new KMForwardCommand( this, mReaderWin->message() );
}
connect( command, SIGNAL( completed( KMCommand * ) ),
this, SLOT( slotReplyOrForwardFinished() ) );
command->start();
}
@ -185,6 +192,8 @@ void KMReaderMainWin::slotForwardAttachedMsg()
} else {
command = new KMForwardAttachedCommand( this, mReaderWin->message() );
}
connect( command, SIGNAL( completed( KMCommand * ) ),
this, SLOT( slotReplyOrForwardFinished() ) );
command->start();
}
@ -192,6 +201,8 @@ void KMReaderMainWin::slotForwardAttachedMsg()
void KMReaderMainWin::slotRedirectMsg()
{
KMCommand *command = new KMRedirectCommand( this, mReaderWin->message() );
connect( command, SIGNAL( completed( KMCommand * ) ),
this, SLOT( slotReplyOrForwardFinished() ) );
command->start();
}
@ -202,6 +213,8 @@ void KMReaderMainWin::slotCustomReplyToMsg( const QString &tmpl )
mReaderWin->message(),
mReaderWin->copyText(),
tmpl );
connect( command, SIGNAL( completed( KMCommand * ) ),
this, SLOT( slotReplyOrForwardFinished() ) );
command->start();
}
@ -239,6 +252,9 @@ void KMReaderMainWin::setupAccel()
mMsgActions = new KMail::MessageActions( actionCollection(), this );
mMsgActions->setMessageView( mReaderWin );
connect( mMsgActions, SIGNAL( replyActionFinished() ),
this, SLOT( slotReplyOrForwardFinished() ) );
//----- File Menu
mSaveAsAction = KStandardAction::saveAs( mReaderWin->viewer(), SLOT( slotSaveMessage() ),
actionCollection() );

@ -69,6 +69,10 @@ private slots:
void slotConfigChanged();
void slotUpdateToolbars();
/// This closes the window if the setting to close the window after replying or
/// forwarding is set.
void slotReplyOrForwardFinished();
private:
void initKMReaderMainWin();
void setupAccel();

@ -321,6 +321,8 @@ template<typename T> void MessageActions::replyCommand()
return;
const QString text = mMessageView ? mMessageView->copyText() : QString();
KMCommand *command = new T( mParent, mCurrentItem, text );
connect( command, SIGNAL( completed( KMCommand * ) ),
this, SIGNAL( replyActionFinished() ) );
command->start();
}

@ -81,6 +81,14 @@ class MessageActions : public QObject
KActionMenu* mailingListActionMenu() const { return mMailingListActionMenu; }
signals:
// This signal is emitted when a reply is triggered and the
// action has finished.
// This is useful for the stand-alone reader, it might want to close the window in
// that case.
void replyActionFinished();
public slots:
void editCurrentMessage();
void annotateMessage();

Loading…
Cancel
Save