[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: [patch] readBoolEntry
From: Stephan Kulow <coolo () kde ! org>
Date: 2003-09-03 12:28:11
[Download RAW message or body]
Hi!
I noticed a difference between leaving the default config and
applying the default config in behaviour to expiring folders.
A patch to "fix" that problem is attached, but I feel this should
be fixed more generic (for 3.1 the diff may be ok, but for 3.2
we should use some generic pref storage - don't know how
mature kpref is)
Greetings, Stephan
--
There may be no I in TEAM, but a M and an E.
["kmail.patch" (text/x-diff)]
Index: kmfoldermgr.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmfoldermgr.cpp,v
retrieving revision 1.87
diff -u -3 -p -u -r1.87 kmfoldermgr.cpp
--- kmfoldermgr.cpp 26 Jul 2003 19:22:46 -0000 1.87
+++ kmfoldermgr.cpp 3 Sep 2003 12:25:44 -0000
@@ -59,7 +59,7 @@ void KMFolderMgr::expireAll() {
KConfigGroupSaver saver(config, "General");
int ret = KMessageBox::Continue;
- if (config->readBoolEntry("warn-before-expire")) {
+ if (config->readBoolEntry("warn-before-expire", true)) {
ret = KMessageBox::warningContinueCancel(KMainWindow::memberList->first(),
i18n("Are you sure you want to expire old messages?"),
i18n("Expire old messages?"), i18n("Expire"));
Index: kmkernel.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmkernel.cpp,v
retrieving revision 1.196
diff -u -3 -p -u -r1.196 kmkernel.cpp
--- kmkernel.cpp 27 Aug 2003 13:48:51 -0000 1.196
+++ kmkernel.cpp 3 Sep 2003 12:25:44 -0000
@@ -948,7 +948,7 @@ void KMKernel::cleanupLoop()
if (config->readNumEntry("when-to-expire")==expireAtExit) {
expire = true;
- if (config->readBoolEntry("warn-before-expire")) {
+ if (config->readBoolEntry("warn-before-expire", true)) {
expire = canExpire();
}
}
Index: kmmainwidget.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmmainwidget.cpp,v
retrieving revision 1.79
diff -u -3 -p -u -r1.79 kmmainwidget.cpp
--- kmmainwidget.cpp 28 Aug 2003 19:22:56 -0000 1.79
+++ kmmainwidget.cpp 3 Sep 2003 12:25:44 -0000
@@ -289,7 +289,7 @@ void KMMainWidget::readConfig(void)
mSendOnCheck = config->readBoolEntry("sendOnCheck",false);
mBeepOnNew = config->readBoolEntry("beep-on-mail", false);
mSystemTrayOnNew = config->readBoolEntry("systray-on-mail", false);
- mSystemTrayMode = config->readBoolEntry("systray-on-new", false) ?
+ mSystemTrayMode = config->readBoolEntry("systray-on-new", true) ?
KMSystemTray::OnNewMail :
KMSystemTray::AlwaysOn;
mConfirmEmpty = config->readBoolEntry("confirm-before-empty", true);
@@ -781,7 +781,7 @@ void KMMainWidget::slotExpireFolder()
KConfig *config = KMKernel::config();
KConfigGroupSaver saver(config, "General");
- if (config->readBoolEntry("warn-before-expire")) {
+ if (config->readBoolEntry("warn-before-expire", true)) {
str = i18n("<qt>Are you sure you want to expire the folder <b>%1</b>?</qt>").arg(mFolder->label());
if (KMessageBox::warningContinueCancel(this, str, i18n("Expire Folder"),
i18n("&Expire"))
@@ -948,7 +948,7 @@ void KMMainWidget::slotExpireAll() {
KConfigGroupSaver saver(config, "General");
- if (config->readBoolEntry("warn-before-expire")) {
+ if (config->readBoolEntry("warn-before-expire", true)) {
ret = KMessageBox::warningContinueCancel(KMainWindow::memberList->first(),
i18n("Are you sure you want to expire all old messages?"),
i18n("Expire old Messages?"), i18n("Expire"));
Index: kmmainwin.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmmainwin.cpp,v
retrieving revision 1.567
diff -u -3 -p -u -r1.567 kmmainwin.cpp
--- kmmainwin.cpp 26 Aug 2003 23:50:33 -0000 1.567
+++ kmmainwin.cpp 3 Sep 2003 12:25:44 -0000
@@ -192,7 +192,7 @@ bool KMMainWin::queryClose() {
return true;
}
- if (config->readBoolEntry("warn-before-expire")) {
+ if (config->readBoolEntry("warn-before-expire", true)) {
ret = KMessageBox::warningContinueCancel(KMainWindow::memberList->first(),
str, i18n("Expire old Messages?"), i18n("Expire"));
if (ret == KMessageBox::Continue) {
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.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