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

List:       kmail-devel
Subject:    [Bug 71385] "Save as" in separate reader win doesn't work
From:       Till Adam <adam () kde ! org>
Date:       2003-12-30 13:59:38
Message-ID: 20031230135938.624.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=71385     
adam@kde.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From adam@kde.org  2003-12-30 14:59 -------
Subject: kdepim/kmail

CVS commit by tilladam: 

Make saveMsgAs() in external reader windows work by:

o readding the action to the menu
o making sure there is an actual slot behind the action
o preventing the command from being prematurely deleted
o making sure the KMMessage object used has a size and a serial number

CCMAIL: 71385-done@bugs.kde.org


  M +1 -0      kmcommands.cpp   1.96
  M +2 -0      kmmainwidget.cpp   1.129
  M +1 -1      kmreadermainwin.cpp   1.25
  M +11 -0     kmreaderwin.cpp   1.729
  M +1 -0      kmreaderwin.h   1.185


--- kdepim/kmail/kmcommands.cpp  #1.95:1.96
@@ -576,4 +576,5 @@ KMSaveMsgCommand::KMSaveMsgCommand( QWid
 {
   if ( !msg ) return;
+  setDeletesItself( true );
   mMsgList.append( msg->getMsgSerNum() );
   mUrl = subjectToUrl( msg->subject() );

--- kdepim/kmail/kmmainwidget.cpp  #1.128:1.129
@@ -1916,4 +1916,6 @@ void KMMainWidget::slotMsgActivated(KMMe
   newMessage->setStatus( msg->status() );
   newMessage->setParent( msg->parent() );
+  newMessage->setMsgSize( msg->msgSize() );
+  newMessage->setMsgSerNum( msg->getMsgSerNum() );
   win->showMsg( mCodec, newMessage );
   win->resize( 550, 600 );

--- kdepim/kmail/kmreadermainwin.cpp  #1.24:1.25
@@ -304,5 +304,5 @@ void KMReaderMainWin::slotMsgPopup(KMMes
 
     mPrintAction->plug( menu );
-
+    menu->insertItem(  i18n( "Save &As..." ), mReaderWin, SLOT( slotSaveMsg() ) );
     menu->insertItem( i18n("Save Attachments..."), mReaderWin, SLOT(slotSaveAttachments()) );
   }

--- kdepim/kmail/kmreaderwin.cpp  #1.728:1.729
@@ -2162,4 +2162,15 @@ void KMReaderWin::slotSaveAttachments()
 
 //-----------------------------------------------------------------------------
+void KMReaderWin::slotSaveMsg()
+{
+  KMSaveMsgCommand *saveCommand = new KMSaveMsgCommand( mMainWindow, message() );
+
+  if (saveCommand->url().isEmpty())
+    delete saveCommand;
+  else
+    saveCommand->start();
+}
+
+//-----------------------------------------------------------------------------
 #include "kmreaderwin.moc"
 

--- kdepim/kmail/kmreaderwin.h  #1.184:1.185
@@ -309,4 +309,5 @@ public slots:
   void slotAddBookmarks();
   void slotShowMsgSrc();
+  void slotSaveMsg();
   void slotSaveAttachments();
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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