[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim (merge)
From:       Thomas McGuire <mcguire () kde ! org>
Date:       2010-01-26 12:19:05
Message-ID: 1264508345.203520.20466.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1080550 by tmcguire:

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.
........


 _M            . (directory)  
 M  +16 -0     kmail/kmreadermainwin.cpp  
 M  +4 -0      kmail/kmreadermainwin.h  
 M  +2 -0      kmail/messageactions.cpp  
 M  +8 -0      kmail/messageactions.h  


--- trunk/KDE/kdepim/kmail/kmreadermainwin.cpp #1080549:1080550
@@ -139,6 +139,11 @@
   toolBar( "mainToolBar" )->show();
 }
 
+void KMReaderMainWin::slotReplyOrForwardFinished()
+{
+  kDebug() << "Reply or forward done!";
+}
+
 //-----------------------------------------------------------------------------
 void KMReaderMainWin::slotTrashMsg()
 {
@@ -171,6 +176,8 @@
    } else {
     command = new KMForwardCommand( this, mReaderWin->message() );
    }
+   connect( command, SIGNAL( completed( KMCommand * ) ),
+            this, SLOT( slotReplyOrForwardFinished() ) );
    command->start();
 }
 
@@ -185,6 +192,8 @@
    } else {
      command = new KMForwardAttachedCommand( this, mReaderWin->message() );
    }
+   connect( command, SIGNAL( completed( KMCommand * ) ),
+            this, SLOT( slotReplyOrForwardFinished() ) );
    command->start();
 }
 
@@ -192,6 +201,8 @@
 void KMReaderMainWin::slotRedirectMsg()
 {
   KMCommand *command = new KMRedirectCommand( this, mReaderWin->message() );
+  connect( command, SIGNAL( completed( KMCommand * ) ),
+         this, SLOT( slotReplyOrForwardFinished() ) );
   command->start();
 }
 
@@ -202,6 +213,8 @@
                                                    mReaderWin->message(),
                                                    mReaderWin->copyText(),
                                                    tmpl );
+  connect( command, SIGNAL( completed( KMCommand * ) ),
+           this, SLOT( slotReplyOrForwardFinished() ) );
   command->start();
 }
 
@@ -239,6 +252,9 @@
 
   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() );
--- trunk/KDE/kdepim/kmail/kmreadermainwin.h #1080549:1080550
@@ -69,6 +69,10 @@
   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();
--- trunk/KDE/kdepim/kmail/messageactions.cpp #1080549:1080550
@@ -321,6 +321,8 @@
     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();
 }
 
--- trunk/KDE/kdepim/kmail/messageactions.h #1080549:1080550
@@ -81,6 +81,14 @@
 
     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();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic