[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCH] Fix KMessageBox::warningYesNoCancel message box creation
From: ismail donmez <kde () myrealbox ! com>
Date: 2004-06-08 11:25:41
Message-ID: 200406081425.41706.kde () myrealbox ! com
[Download RAW message or body]
Hi,
While trying to fix a Konversation bug I think I found a bug in
kmessagebox.cpp.
Looking at kmessagebox.cpp line 349 function
void KMessageBox::saveDontShowAgainYesNo(const QString &dontShowAgainName,
ButtonCode result)
If a user chooses "Do not show again" option it writes "yes" to config dialog
( according to code ) :
config->writeEntry( dontShowAgainName, result==Yes ? "yes" : "no");
But at line 319 in function
bool KMessageBox::shouldBeShownYesNo(const QString &dontShowAgainName,
ButtonCode &result)
it does
if (dontAsk == "yes") {
result = Yes;
return false;
}
if (dontAsk == "no") {
result = No;
return false; <----- This looks wrong
}
So even if user choose to show or not the show dialog again if there is a
yes/no config entry dialog will not be shown.
My patch modifies that part to :
if (dontAsk == "yes") {
result = Yes;
return false;
}
else if (dontAsk == "no") {
result = No;
return true;
}
so if the config entry is set to "no" meaning dialog should be shown again.
Should I apply the patch
or am I confused somewhere?
Regards,
/ismail
--
Time is what you make of it.
["kmessagebox.patch" (text/x-diff)]
Index: kdelibs/kdeui/kmessagebox.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kmessagebox.cpp,v
retrieving revision 1.92
diff -u -r1.92 kmessagebox.cpp
--- kdelibs/kdeui/kmessagebox.cpp 27 Mar 2004 07:52:44 -0000 1.92
+++ kdelibs/kdeui/kmessagebox.cpp 8 Jun 2004 11:06:50 -0000
@@ -328,9 +328,9 @@
result = Yes;
return false;
}
- if (dontAsk == "no") {
+ else if (dontAsk == "no") {
result = No;
- return false;
+ return true;
}
return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic