[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: PATCH: filter configuration (destination folder ComboBox)
From: Ingo =?iso-8859-1?q?Kl=F6cker?= <ingo.kloecker () epost ! de>
Date: 2001-04-28 22:52:24
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
actually this is no real bug. But it's something Marc should change
while he is working on the filters.
Buggy behaviour which should be changed:
If you delete a folder which was the destination folder of a filter,
and then open the configuration for this filter, the destination folder
will be set to the first non-system-folder. Or at least it seems to be
set to this folder although the destination folder is undefined (NULL).
This is really irritating. IMHO the first entry in the destination
folder combo box should be something like "<undefined>" (similar to the
<nothing> in the action ComboBox).
The attached patch adds the "<undefined>" entry to the destination
folder ComboBox.
I don't know if it's better to apply this small patch directly to cvs
or if it's better to let Marc add this patch to his work on the filters.
Regards,
Ingo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE660msGnR+RTDgudgRAgQbAJ96hEfs9HPhvrc7W45lDApzdQqM2ACg2oHK
UKHVTZGcnKzDrLrUotnDH3g=
=82Rc
-----END PGP SIGNATURE-----
["filtertransferactioncombobox.diff" (text/x-c++)]
Index: kmfilteraction.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmfilteraction.cpp,v
retrieving revision 1.41
diff -u -3 -p -r1.41 kmfilteraction.cpp
--- kmfilteraction.cpp 2001/04/17 20:45:44 1.41
+++ kmfilteraction.cpp 2001/04/28 22:00:00
@@ -150,8 +150,8 @@ QWidget* KMFilterActionMove::createParam
void KMFilterActionMove::applyParamWidgetValue(QWidget* aParamWidget)
{
QComboBox* cbx = (QComboBox*)aParamWidget;
- if ((cbx->currentItem() >= 0) && (cbx->currentItem() < (int)gfolders.count()))
- mDest = (*gfolders.at(cbx->currentItem()));
+ if ((cbx->currentItem() > 0) && (cbx->currentItem() <= (int)gfolders.count()))
+ mDest = (*gfolders.at(cbx->currentItem() - 1)); // -1 because of the additional \
"<undefined>" entry in the ComboBox else
mDest = 0;
}
Index: kmfilterdlg.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmfilterdlg.cpp,v
retrieving revision 1.53
diff -u -3 -p -r1.53 kmfilterdlg.cpp
--- kmfilterdlg.cpp 2001/04/17 20:45:44 1.53
+++ kmfilterdlg.cpp 2001/04/28 22:00:00
@@ -430,15 +430,14 @@ QComboBox* KMFilterDlg::createFolderComb
cbx->setFixedHeight(mCbxHeight);
- QStringList::Iterator st;
- for( st = str->begin(); st != str->end(); ++st)
- cbx->insertItem(*st);
+ cbx->insertItem(i18n("<undefined>"));
+ cbx->insertStringList(*str);
QGuardedPtr<KMFolder> folder;
while (folders->at(i) != folders->end()) {
folder = *folders->at(i);
if (folder == curFolder)
- idx = i;
+ idx = i+1; // +1 because of the additional "<undefined>" entry
++i;
}
if (idx>=0) cbx->setCurrentItem(idx);
_______________________________________________
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