[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kio
From: Marcel Partap <mpartap () gmx ! net>
Date: 2010-05-29 18:22:28
Message-ID: 20100529182228.D0025AC8C2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1132103 by mpartap:
add icons to the invalid certificate confirmation dialog
M +23 -6 kio/slaveinterface.cpp
M +4 -4 kssl/sslui.cpp
--- trunk/KDE/kdelibs/kio/kio/slaveinterface.cpp #1132102:1132103
@@ -403,25 +403,42 @@
KConfig *config = new KConfig("kioslaverc");
KMessageBox::setDontShowAskAgainConfig(config);
+ // SMELL: the braindead way to support button icons
+ KGuiItem buttonYesGui, buttonNoGui;
+
+ if (buttonYes == i18n("&Details"))
+ buttonYesGui = KGuiItem(buttonYes, "help-about");
+ else if (buttonYes == i18n("&Forever"))
+ buttonYesGui = KGuiItem(buttonYes, "flag-green");
+ else
+ buttonYesGui = KGuiItem(buttonYes);
+
+ if (buttonNo == i18n("Co&ntinue"))
+ buttonNoGui = KGuiItem(buttonNo, "arrow-right");
+ else if (buttonNo == i18n("&Current Session only"))
+ buttonNoGui = KGuiItem(buttonNo, "chronometer");
+ else
+ buttonNoGui = KGuiItem(buttonNo);
+
switch (type) {
case KIO::SlaveBase::QuestionYesNo:
result = KMessageBox::questionYesNo(
- 0, text, caption, KGuiItem(buttonYes),
- KGuiItem(buttonNo), dontAskAgainName);
+ 0, text, caption, buttonYesGui,
+ buttonNoGui, dontAskAgainName);
break;
case KIO::SlaveBase::WarningYesNo:
result = KMessageBox::warningYesNo(
- 0, text, caption, KGuiItem(buttonYes),
- KGuiItem(buttonNo), dontAskAgainName);
+ 0, text, caption, buttonYesGui,
+ buttonNoGui, dontAskAgainName);
break;
case KIO::SlaveBase::WarningContinueCancel:
result = KMessageBox::warningContinueCancel(
- 0, text, caption, KGuiItem(buttonYes),
+ 0, text, caption, buttonYesGui,
KStandardGuiItem::cancel(), dontAskAgainName);
break;
case KIO::SlaveBase::WarningYesNoCancel:
result = KMessageBox::warningYesNoCancel(
- 0, text, caption, KGuiItem(buttonYes), KGuiItem(buttonNo),
+ 0, text, caption, buttonYesGui, buttonNoGui,
KStandardGuiItem::cancel(), dontAskAgainName);
break;
case KIO::SlaveBase::Information:
--- trunk/KDE/kdelibs/kio/kssl/sslui.cpp #1132102:1132103
@@ -78,8 +78,8 @@
int msgResult;
do {
msgResult = KMessageBox::warningYesNoCancel(0, message, i18n("Server Authentication"),
- KGuiItem(i18n("&Details")),
- KGuiItem(i18n("Co&ntinue")));
+ KGuiItem(i18n("&Details"), "help-about"),
+ KGuiItem(i18n("Co&ntinue"), "arrow-right"));
if (msgResult == KMessageBox::Yes) {
//Details was chosen - show the certificate and error details
@@ -117,8 +117,8 @@
"certificate forever without "
"being prompted?"),
i18n("Server Authentication"),
- KGuiItem(i18n("&Forever")),
- KGuiItem(i18n("&Current Session only")));
+ KGuiItem(i18n("&Forever"), "flag-green"),
+ KGuiItem(i18n("&Current Session only"), "chronometer"));
QDateTime ruleExpiry = QDateTime::currentDateTime();
if (msgResult == KMessageBox::Yes) {
//accept forever ("for a very long time")
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic