From kmail-devel Tue Apr 17 11:29:54 2001 From: Michael =?iso-8859-1?q?H=E4ckel?= Date: Tue, 17 Apr 2001 11:29:54 +0000 To: kmail-devel Subject: Re: [PATCH] filter changes - part I X-MARC-Message: https://marc.info/?l=kmail-devel&m=98750700702391 On Tuesday, 17. April 2001 09:41, Marc Mutz wrote: > Hi! > > I've finished the first part of the KMail filter extension and cleanup > of the accociated dialog. The patch was made from the modified 2.1.1 > against the 2.1.1 release, but I've checked that it applies cleanly > against current HEAD cvs. It indeed applied, however I had some trouble compiling it. Following the first error message. I personally didn't find out, why this command in generated and why kmfilterdlg.moc.cpp is neccessary at all. Well after adding the missing -I parameters manually to the g++ command it did pass that problem. g++ -g -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion -fno-exceptions -fno-check-new -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -Wnon-virtual-dtor -fno-builtin -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST -D_REENTRANT kmfilterdlg.moc.cpp -o kmfilterdlg.moc In file included from kmfilterdlg.h:8, from kmfilterdlg.moc.cpp:16: kmfilteraction.h:10: qlist.h: Datei oder Verzeichnis nicht gefunden kmfilteraction.h:11: qobject.h: Datei oder Verzeichnis nicht gefunden kmfilteraction.h:12: qdialog.h: Datei oder Verzeichnis nicht gefunden kmfilteraction.h:13: qguardedptr.h: Datei oder Verzeichnis nicht gefunden In file included from kmfilterdlg.h:9, from kmfilterdlg.moc.cpp:16: kmsearchpattern.h:8: qlist.h: Datei oder Verzeichnis nicht gefunden kmsearchpattern.h:9: qstring.h: Datei oder Verzeichnis nicht gefunden In file included from kmfilterdlg.moc.cpp:16: kmfilterdlg.h:11: qcombobox.h: Datei oder Verzeichnis nicht gefunden kmfilterdlg.h:12: qlineedit.h: Datei oder Verzeichnis nicht gefunden kmfilterdlg.moc.cpp:17: qmetaobject.h: Datei oder Verzeichnis nicht gefunden kmfilterdlg.moc.cpp:18: qapplication.h: Datei oder Verzeichnis nicht gefunden kmfilterdlg.moc.cpp:215: qobjectdefs.h: Datei oder Verzeichnis nicht gefunden kmfilterdlg.moc.cpp:216: qsignalslotimp.h: Datei oder Verzeichnis nicht gefundenmake[1]: *** [kmfilterdlg.moc] Error 1 make[1]: Leaving directory `/hda2/kde22src/kdenetwork/kmail.test' make: *** [all-recursive] Error 1 Then in kmkernel.cpp an include was missing. I think things would be much easier, if you would upgrade to a CVS version. > What this patch does: > > 1. Make a nice KMSearchPatternEdit in the KMFilterDlg > (cf. the screenshot I sent to this list a while ago) Is there any reason, why the combo boxes for the actions are now that fat? IMHO they looked better before. > 2. Lift the Two-rules limit. You can now have up to > eight rules by default. If you need more, you only > need to increase FILTER_MAX_RULES in kmsearchpattern.h > (up to a maximum of 26, see below) In genaral this seems to work, however when clicking on the "Fewer" button the window not not shrink again and the layout of the dialog looks bad. Layout management is not done properly in that dialog. If I resize it, only the width of the list on the left becomes bigger but not the height and all other fields still are as small as before. Especially the fields for the text that should be contained in the header is nearly always too small. Always when I select a different filter rule the size of the dialog changes back to the original size, which I consider not nice. I don't know what functionality the ESC key is supposed to have, but I think it should have the same as the Cancel button and ignore the changes made and not only hide the dialog. > 3. The filter config format has been slightly modified: It now has a > new key 'rules', that gives the number of rules in that filter. > If this key is not present, the KMSearchPattern::readConfig > assumes a legacy config and converts the operators 'ignore' and > 'unless' accordingly. The third rule is saved as > (fieldC/funcC/contentsC) and so on. At least my filter for "X-Mailing-List contains kde-devel@master.kde.org" stopped working after that upgrade, however after modifying it in the dialog it worked again. I don't know exactely what the problem was. > 4. Incorporate Don's additions to kmfilter{dlg,mgr}.{h,cpp}. Don, > could you have a look. This is the single point that I didn't > test, but then I've only made the changes I've done to > KMFilterDlg::slotBtnNew to createFilter(). There will be probably some merging required, but that doesn't look difficult. > I have tested these modifications quite heavily. But of course, I > couldn't think of all the things that people will do with their filters, > so please consider putting these changes into CVS for anyone to test. I think the problems mentioned above are already enough for now and don't see a real advantage if this patch being in CVS in its current state. That would only result in a high amount of bug reports about known problems. If you care for those things first I might put it into CVS before you start to work on the actions. Also at least the compilation problems need fixing first. > There's a known problem, though: If you use filters while the filter > dialog shows a filter, that filter may contain invalid data. This is > because the widgets operate directly on the filters. > > I will work around this problem by making KMFilterDlg a subclass of > KDialogBase, which holds a deep copy of the filter list and provides an > 'Apply' button to transfer the changes in the copy back to KMFilterMgr. Doesn't the filter dialog already have deep copies as long as the user doesn't press the Ok button? Regards, Michael Häckel _______________________________________________ Kmail Developers mailing list Kmail@master.kde.org http://master.kde.org/mailman/listinfo/kmail