[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: Bug#128: Patch
From: Michael =?iso-8859-1?q?H=E4ckel?= <Michael () Haeckel ! Net>
Date: 2000-11-21 17:38:12
[Download RAW message or body]
On Wednesday, 22. November 2000 11:11, Nicholas Hagen wrote:
> I've developed a patch to this bug/wishlist. The attached file shows what
> files need to be editted and what needs to be added. Not sure if this is
> the best way around to fix this, but it works.
At least my compiler does not support declarations of variables and functions
with the same name. I changed the variable to mReplyMsg.
After I finally got it compiling it didn't work. I'm not sure if I did
something wrong with your changes. It is not easy to changes files according
to such instructions.
Please use "diff -u <oldfile> <newfile> > patch.diff" to create patches. Also
when changing different files either cat the diffs together of use diff to
compare whole directories.
That saves a lot of work for me and prevents errors.
As attachment I send the changes I finally made.
Regards,
Michael Häckel
["128.diff" (text/plain)]
Index: kmcomposewin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmcomposewin.cpp,v
retrieving revision 1.271
diff -u -3 -p -r1.271 kmcomposewin.cpp
--- kmcomposewin.cpp 2000/11/19 16:33:43 1.271
+++ kmcomposewin.cpp 2000/11/21 17:35:54
@@ -104,7 +104,7 @@ WindowList* windowList=new WindowList;
#include "kmcomposewin.moc"
//-----------------------------------------------------------------------------
-KMComposeWin::KMComposeWin(KMMessage *aMsg, QString id )
+KMComposeWin::KMComposeWin(KMMessage *aMsg, QString id, KMMessage *rMsg )
: KMTopLevelWidget (),
mMainWidget(this),
mIdentity(&mMainWidget), mTransport(true, &mMainWidget),
@@ -135,6 +135,7 @@ KMComposeWin::KMComposeWin(KMMessage *aM
mAutoDeleteMsg = FALSE;
mEditor = NULL;
disableBreaking = false;
+ mReplyMsg = rMsg;
mSpellCheckInProgress=FALSE;
@@ -918,6 +919,12 @@ void KMComposeWin::verifyWordWrapLengthI
}
//-----------------------------------------------------------------------------
+void KMComposeWin::setReplyMsg(KMMessage* newReplyMsg)
+{
+ mReplyMsg = newReplyMsg;
+}
+
+//-----------------------------------------------------------------------------
void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign)
{
KMMessagePart bodyPart, *msgPart;
@@ -1919,6 +1926,7 @@ void KMComposeWin::doSend(int aSendNow,
if (sentOk)
{
+ if (mReplyMsg) mReplyMsg->setStatus(KMMsgStatusReplied);
mAutoDeleteMsg = FALSE;
close();
}
Index: kmcomposewin.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmcomposewin.h,v
retrieving revision 1.99
diff -u -3 -p -r1.99 kmcomposewin.h
--- kmcomposewin.h 2000/11/16 17:15:27 1.99
+++ kmcomposewin.h 2000/11/21 17:35:56
@@ -142,7 +142,8 @@ class KMComposeWin : public KMTopLevelWi
friend class KMHeaders; // needed for the digest forward
public:
- KMComposeWin(KMMessage* msg=NULL, QString id = "unknown" );
+ KMComposeWin(KMMessage* msg=NULL, QString id = "unknown",
+ KMMessage* rMsg = NULL );
~KMComposeWin();
/** To catch palette changes */
@@ -162,10 +163,16 @@ public:
previous messages without calling applyChanges() on them before. */
void setMsg(KMMessage* newMsg, bool mayAutoSign=TRUE);
+ /** Set the message that this message is being replied to */
+ void setReplyMsg(KMMessage* newRMsg);
+
/** Returns message of the composer. To apply the user changes to the
message, call applyChanges() first. */
KMMessage* msg(void) const { return mMsg; }
+ /** Returns the message this message is in reply to if any */
+ KMMessage* replyMsg(void) const { return mReplyMsg; }
+
/** Applies the user changes to the message object of the composer
and signs/encrypts the message if activated. Returns FALSE in
case of an error (e.g. if PGP encryption fails). */
@@ -368,6 +375,7 @@ protected:
QGridLayout* mGrid;
//KDNDDropZone *mDropZone;
KMMessage *mMsg;
+ KMMessage *mReplyMsg;
QListView *mAtmListBox;
QList<QListViewItem> mAtmItemList;
KMMsgPartList mAtmList;
Index: kmheaders.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmheaders.cpp,v
retrieving revision 1.213
diff -u -3 -p -r1.213 kmheaders.cpp
--- kmheaders.cpp 2000/11/17 09:17:31 1.213
+++ kmheaders.cpp 2000/11/21 17:36:00
@@ -1168,7 +1168,7 @@ void KMHeaders::replyToMsg ()
kernel->kbp()->busy();
win = new KMComposeWin(msg->createReply(FALSE),
- msg->headerField( "X-KMail-Identity" ));
+ msg->headerField( "X-KMail-Identity" ), msg);
win->show();
kernel->kbp()->idle();
}
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.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