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

List:       kmail-devel
Subject:    [ PATCH] wishlist item #128
From:       JES <yez () home ! nl>
Date:       2001-10-06 8:38:51
[Download RAW message or body]

Hi,
I made a patch regarding report #128. Coukd someone look into it and maybe 
apply if the patch is okay?

Thanks,
Edwin.
["kmail.diff" (text/x-diff)]

Index: kdenetwork/kmail/kmcomposewin.cpp
===================================================================
RCS file: /cvs/kdenetwork/kmail/kmcomposewin.cpp,v
retrieving revision 1.392
diff -u -r1.392 kmcomposewin.cpp
--- kdenetwork/kmail/kmcomposewin.cpp	2001/09/21 18:13:33	1.392
+++ kdenetwork/kmail/kmcomposewin.cpp	2001/10/06 08:31:28
@@ -87,7 +87,7 @@
 #include "kmcomposewin.moc"
 
 //-----------------------------------------------------------------------------
-KMComposeWin::KMComposeWin(KMMessage *aMsg, QString id )
+KMComposeWin::KMComposeWin(KMMessage *aMsg, QString id , KMMessage *bMsg, \
KMMsgStatus bMsgStatus)  : KMTopLevelWidget (), MailComposerIface(),
   mId( id )
 
@@ -199,6 +199,8 @@
   mMsg = NULL;
   if (aMsg)
     setMsg(aMsg);
+  origMsg = bMsg;
+  msgStatus = bMsgStatus;
 
   mEdtTo->setFocus();
   mDone = true;
@@ -2114,6 +2116,8 @@
   bool editSubject = true;   // This is an inverted variable due to return type
   if (busy) return;
   busy = true;
+  if ( origMsg != 0L )
+    origMsg->setStatus(msgStatus);
 
   kernel->kbp()->busy();
   //applyChanges();  // is called twice otherwise. Lars
Index: kdenetwork/kmail/kmcomposewin.h
===================================================================
RCS file: /cvs/kdenetwork/kmail/kmcomposewin.h,v
retrieving revision 1.126
diff -u -r1.126 kmcomposewin.h
--- kdenetwork/kmail/kmcomposewin.h	2001/09/20 14:11:44	1.126
+++ kdenetwork/kmail/kmcomposewin.h	2001/10/06 08:31:29
@@ -157,7 +157,7 @@
   friend class KMHeaders;         // needed for the digest forward
 
 public:
-  KMComposeWin(KMMessage* msg=0L, QString id = "unknown" );
+  KMComposeWin(KMMessage* msg=0L, QString id = "unknown" , KMMessage *bMsg=0L, const \
KMMsgStatus msgStatus=KMMsgStatusUnknown);  ~KMComposeWin();
 
   /**
@@ -497,6 +497,8 @@
   KMEdit* mEditor;
   QGridLayout* mGrid;
   KMMessage *mMsg;
+  KMMessage *origMsg;
+  KMMsgStatus msgStatus;
   QListView *mAtmListBox;
   QPtrList<QListViewItem> mAtmItemList;
   KMMsgPartList mAtmList;
Index: kdenetwork/kmail/kmheaders.cpp
===================================================================
RCS file: /cvs/kdenetwork/kmail/kmheaders.cpp,v
retrieving revision 1.323
diff -u -r1.323 kmheaders.cpp
--- kdenetwork/kmail/kmheaders.cpp	2001/09/27 11:30:35	1.323
+++ kdenetwork/kmail/kmheaders.cpp	2001/10/06 08:31:35
@@ -1375,7 +1375,7 @@
   if ( id.isEmpty() )
     id = mFolder->identity();
   kernel->kbp()->busy();
-  win = new KMComposeWin(msg->createForward(), id);
+  win = new KMComposeWin(msg->createForward(), id, msg, KMMsgStatusForwarded);
   win->setCharset(msg->codec()->name(), TRUE);
   win->show();
   kernel->kbp()->idle();
@@ -1491,7 +1491,7 @@
   id = msg->headerField( "X-KMail-Identity" );
   if ( id.isEmpty() )
     id = mFolder->identity();
-  win = new KMComposeWin(msg->createReply(FALSE, FALSE, selection),id);
+  win = new KMComposeWin(msg->createReply(FALSE, FALSE, selection),id, msg, \
KMMsgStatusReplied);  win->setCharset(msg->codec()->name(), TRUE);
   win->setReplyFocus();
   win->show();
@@ -1512,7 +1512,7 @@
   id = msg->headerField( "X-KMail-Identity" );
   if ( id.isEmpty() )
     id = mFolder->identity();
-  win = new KMComposeWin(msg->createReply(TRUE, FALSE, selection),id);
+  win = new KMComposeWin(msg->createReply(TRUE, FALSE, selection),id, msg, \
KMMsgStatusReplied);  win->setCharset(msg->codec()->name(), TRUE);
   win->setReplyFocus();
   win->show();
@@ -1532,7 +1532,7 @@
   id = msg->headerField( "X-KMail-Identity" );
   if ( id.isEmpty() )
     id = mFolder->identity();
-  win = new KMComposeWin(msg->createReply(true, true, selection),id);
+  win = new KMComposeWin(msg->createReply(true, true, selection),id, msg, \
KMMsgStatusReplied);  win->setCharset(msg->codec()->name(), TRUE);
   win->setReplyFocus();
   win->show();
Index: kdenetwork/kmail/kmmessage.cpp
===================================================================
RCS file: /cvs/kdenetwork/kmail/kmmessage.cpp,v
retrieving revision 1.227
diff -u -r1.227 kmmessage.cpp
--- kdenetwork/kmail/kmmessage.cpp	2001/09/22 15:58:15	1.227
+++ kdenetwork/kmail/kmmessage.cpp	2001/10/06 08:31:39
@@ -809,8 +809,6 @@
   if (!recognized)
     msg->setSubject("Re: " + subject());
 
-  setStatus(KMMsgStatusReplied);
-
   return msg;
 }
 
@@ -1043,7 +1041,6 @@
   }
   if (!recognized)
     msg->setSubject("Fwd: " + subject());
-  setStatus(KMMsgStatusForwarded);
 
   return msg;
 }


_______________________________________________
Kmail Developers mailing list
Kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail


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

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