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

List:       kmail-devel
Subject:    Question: Why does KMFilterActionMove::process() for
From:       Marc Mutz <Marc () Mutz ! com>
Date:       2001-04-25 16:09:08
[Download RAW message or body]

Hi!

I don't understand the following code snipped in 
KMFilterActionMove::process() (kmfilteraction.cpp):

int KMFilterActionMove::process(KMMessage* msg, bool&stopIt)
{
  if (!mDest) return 1;
  KMFilterAction::tempOpenFolder(mDest);
  if (msg->parent())  // <===============
    return 0;
  if (mDest->moveMsg(msg) == 0)
    return 0; // ok, added
  else {
    kdDebug() << "KMfilteraction - couldn't move msg" << endl;
    stopIt = TRUE;
    return 2; // critical error: couldn't add
  }
}

Why should messages be moved only when they have no parent (and when 
_do_ message have no parent? On fetching? Aren't they children of 
Inbox, then?

TIA,
Marc

PS: I'm quite through with the filter changes. I'm just now compiling 
kdebase from HEAD, then I'll see if kdenetwork compiles and if it does, 
I port my changes from the 2.1.1 branch i worked on to HEAD, test it 
there a bit and then send a patch here for comments. Next step will be 
the fun part: extending the filters (bounce, redirect, set status, 
copy) and search rules (date, size).

PPS: Current filter dialog attached as teaser :-)
Do you think using toolbuttons for 'up' , 'down', 'new', 'delete' and 
'rename' would be OK?

-- 
Marc Mutz <Marc@Mutz.com>
http://marc.mutz.com/
http://www.mathematik.uni-bielefeld.de/~mmutz/
http://EncryptionHOWTO.sourceforge.net/

["FilterDlg.png;" (image/png)]
_______________________________________________
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