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

List:       kde-devel
Subject:    several kmail patches
From:       Daniel Naber <dnaber () mini ! gt ! owl ! de>
Date:       1999-05-25 17:50:05
[Download RAW message or body]

Hi,

I wrote several kmail patches - unfortunately Stefan Taferner (kmailīs
maintainer) doesnīt have enough time to care about these at the
moment. All patches are bugfixes, thus intended for KDE 1.1.2.

I would like you to test them and commit them, if they are okay.
Theyīre very small, so Iīll attach them.

Short description:

bugfix-1037: fixes #1037 (deleting a message in trash seemed to delete
two messages)

cancel-filter, filter-help-button: dialogīs ok-, cancel- und
help-button work correct now

sig-append: append the signature with "-- \n" instead of "--\n"
(note the sapce). This should be correct, isnīt it?

updown-bugfix: moving a filter up could screw the filter list -> fixed
(with a sempahore workaround, which is probably stupid. But I donīt
know the signal/slot stuff good enough for a better solution).

Another point: kmail doesnīt generate an in-reply-to header. I guess
(and only guess) that some software needs this to recognize threads?
Is this important? If so, is it difficult to include?

TIA
 Daniel

-- 
PGP Key fingerprint = 3D 98 9E D2 00 B6 E0 9D  7E B9 77 23 17 E2 11 6A

["bugfix-1037.diff" (text/plain)]

--- kmail_org/kmheaders.cpp	Mon Apr 26 16:50:00 1999
+++ kmail/kmheaders.cpp	Sat May  8 22:10:13 1999
@@ -582,10 +582,14 @@
 
   for (rc=0, msg=msgList->first(); msg && !rc; msg=msgList->next())
   {
-    if (destFolder) rc = destFolder->moveMsg(msg);
+    if (destFolder) {
+      // "deleting" messages means moving them into the trash folder
+      rc = destFolder->moveMsg(msg);
+    }
     else
     {
-      if (!doUpd) removeItem(cur);
+      // really delete messages that are already in the trash folder
+      if (doUpd) removeItem(cur);
       mFolder->removeMsg(msg);
       delete msg;
     }

["cancel-filter.diff" (text/plain)]

--- kmail_org/kmfilterdlg.cpp	Sat May  8 16:36:28 1999
+++ kmail/kmfilterdlg.cpp	Sat May  8 19:59:52 1999
@@ -511,7 +511,10 @@
 //-----------------------------------------------------------------------------
 void KMFilterDlg::slotBtnOk()
 {
-  if (mFilter) applyFilterChanges();
+  if (mFilter) {
+    applyFilterChanges();
+    filterMgr->writeConfig();
+  }
   accept();
 }
 
@@ -519,6 +522,7 @@
 //-----------------------------------------------------------------------------
 void KMFilterDlg::slotBtnCancel()
 {
+  filterMgr->readConfig();
   reject();
 }
 

["filter-help-button.diff" (text/plain)]

--- kmail_org/kmfilterdlg.cpp	Sat May  8 16:36:28 1999
+++ kmail/kmfilterdlg.cpp	Sat May  8 17:34:03 1999
@@ -526,6 +526,7 @@
 //-----------------------------------------------------------------------------
 void KMFilterDlg::slotBtnHelp()
 {
+  app->invokeHTMLHelp( app->appName() + "/" + "index-3.html", "ss3.5" );
 }
 
 

["sig-append.diff" (text/plain)]

--- kmail_org/kmcomposewin.cpp	Tue Apr 13 14:23:55 1999
+++ kmail/kmcomposewin.cpp	Sat May  8 16:58:07 1999
@@ -1632,7 +1632,7 @@
 
   if (!sigText.isEmpty())
   {
-    mEditor->insertLine("--", -1);
+    mEditor->insertLine("-- ", -1);
     mEditor->insertLine(sigText, -1);
     mEditor->toggleModified(mod);
   }

["updown-bugfix.diff" (text/plain)]

--- kmail_org/kmfilterdlg.cpp	Thu Jan 21 21:41:37 1999
+++ kmail/kmfilterdlg.cpp	Sat May  8 00:15:17 1999
@@ -53,7 +53,8 @@
   QGridLayout *fgrid, *grid, *agrid;
   int h, w, i;
   QSize sz;
-
+  updown_move_semaphore = 1;
+  
   initMetaObject();
 
   grid  = new QGridLayout(this, 4, 2, 4, 4);
@@ -296,7 +297,7 @@
   KMFilterAction* action;
   int i;
 
-  if (!mFilter) return;
+  if (!mFilter || !updown_move_semaphore) return;
 
   mFilter->ruleA().init(mRuleFieldA->currentText(), 
 			(KMFilterRule::Function)mRuleFuncA->currentItem(),
@@ -434,6 +435,8 @@
 
   if (idx < 1) return;
 
+  updown_move_semaphore = 0;
+
   filter = filterMgr->take(idx);
   assert(filter != NULL);
   filterMgr->insert(idx-1, filter);
@@ -442,6 +445,8 @@
   mFilterList->insertItem(filter->name(), idx-1);
 
   mFilterList->setCurrentItem(idx-1);
+
+  updown_move_semaphore = 1;
 }
 
 
@@ -453,6 +458,8 @@
 
   if (idx < 0 || idx >= (int)mFilterList->count()-1) return;
 
+  updown_move_semaphore = 0;
+
   filter = filterMgr->take(idx);
   assert(filter != NULL);
   filterMgr->insert(idx+1, filter);
@@ -461,6 +468,8 @@
   mFilterList->insertItem(filter->name(), idx+1);
 
   mFilterList->setCurrentItem(idx+1);
+
+  updown_move_semaphore = 1;
 }
 
 
--- kmail_org/kmfilterdlg.h	Thu Jan 21 21:41:39 1999
+++ kmail/kmfilterdlg.h	Fri May  7 23:53:05 1999
@@ -78,6 +78,10 @@
   QComboBox   *mRuleFieldA, *mRuleFieldB;
   QLineEdit   *mRuleValueA, *mRuleValueB;
   QComboBox   *mRuleFuncA, *mRuleFuncB, *mRuleOp;
+
+private:
+  // ugly workaround against filter-up-down-move bug
+  bool updown_move_semaphore;
 };
 
 


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

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