[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: don't ask again for "save password?" dialog
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2005-05-19 0:57:28
Message-ID: 200505181857.29560.aseigo () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/mixed)]
hi..
attached is a patch that adds a "Don't ask again" box to the "do you want me
to save the passwords for this form in kwallet?".
this was requested on bugs.kde.org by someone i know here in calgary, so they
mention it from time to time. nagging is a great motivator at times. =/
anyways, the love kwallet, but don't like how intrusive it is with it's
constant dialoging =)
is this cool to commit, or are their objections to it?
--
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
["dontaskagain_kthml.diff" (text/x-diff)]
Index: html/html_formimpl.cpp
===================================================================
--- html/html_formimpl.cpp (revision 415448)
+++ html/html_formimpl.cpp (working copy)
@@ -600,22 +600,35 @@
0, "questionYesNoCancel", \
true, true,
KStdGuiItem::yes(), \
KGuiItem(i18n("Ne&ver for This Site")), KStdGuiItem::no());
- bool checkboxResult = false;
- const int savePassword = KMessageBox::createKMessageBox(dialog, \
QMessageBox::Information,
- \
i18n("Konqueror has the ability to store the password "
- "in \
an encrypted wallet. When the wallet is unlocked, it "
- \
"can then automatically restore the login information "
- \
"next time you visit this site. Do you want to store "
- \
"the information now?"),
- \
QStringList(), QString::null, &checkboxResult, KMessageBox::Notify); + \
KMessageBox::ButtonCode savePassword = KMessageBox::No; + if ( \
KMessageBox::shouldBeShownYesNo( "KHTMLPart_StorePassword", savePassword ) ) + \
{ + bool checkboxResult = false;
+ int rv = KMessageBox::createKMessageBox(dialog, \
QMessageBox::Information, + \
i18n("Konqueror has the ability to store the password " + \
"in an encrypted wallet. When the wallet is unlocked, it " + \
"can then automatically restore the login information " + \
"next time you visit this site. Do you want to store " + \
"the information now?"), + \
QStringList(), i18n("Don't show again"), + \
&checkboxResult, KMessageBox::Notify);
- if ( savePassword == KDialogBase::Yes ) {
+ if ( checkboxResult )
+ {
+ savePassword = (rv == KDialogBase::Yes ? KMessageBox::Yes :
+ rv == \
KDialogBase::No ? KMessageBox::No : + \
KMessageBox::Cancel); + KMessageBox::saveDontShowAgainYesNo( \
"KHTMLPart_StorePassword", savePassword ); + }
+ }
+
+ if ( savePassword == KMessageBox::Yes ) {
// ensure that we have the user / password inside the url
// otherwise we might have a potential security problem
// by saving passwords under wrong lookup key.
getDocument()->view()->part()->saveToWallet(key, m_walletMap);
- } else if ( savePassword == KDialogBase::No ) {
+ } else if ( savePassword == KMessageBox::No ) {
view->addNonPasswordStorableSite(formUrl.host());
}
}
[Attachment #6 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic