Version: (using KDE 3.2.90 (3.3 alpha1, CVS >= 20040522), compiled sources) Compiler: gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) OS: Linux (i686) release 2.4.21-0.13mdk I think the Cancel button should be named "No" when konqueror offer to save the passwd. "Cancel" means to me, cancel my click, I dont want to click on this anymore, cancel my request. should be "No" I dont want to save this passwd in my wallet.
CVS commit by woebbe: Fixed BR #84072. It's a but ugly to copy KMessageBox::questionYesNoCancelWId() but you can't pass a KGuiItem for the Cancel button. Maybe this is changed with KDE 4. Patch is reviewed by Stephan Binner. CCMAIL: 84072-done@bugs.kde.org M +28 -21 html_formimpl.cpp 1.376 --- kdelibs/khtml/html/html_formimpl.cpp #1.375:1.376 @@ -513,5 +513,4 @@ void HTMLFormElementImpl::submit( ) } - int savePassword = KMessageBox::Yes; QString key = calculateAutoFillKey(*this); bool doesnotexist = KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), @@ -540,7 +539,14 @@ void HTMLFormElementImpl::submit( ) } - if ( ( doesnotexist || login_changed ) && - (savePassword=KMessageBox::questionYesNoCancel( - 0, + if ( doesnotexist || login_changed ) { + // TODO use KMessageBox::questionYesNoCancel() again, if you can pass a KGuiItem for Cancel + KDialogBase* dialog = new KDialogBase(i18n("Save Login Information"), + KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel, + KDialogBase::Yes, KDialogBase::Cancel, + 0, "questionYesNoCancel", true, true, + KStdGuiItem::yes(), KGuiItem(i18n("Never 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 " @@ -548,7 +554,7 @@ void HTMLFormElementImpl::submit( ) "next time you visit this site. Do you want to store " "the information now?"), - i18n("Save Login Information"), - KStdGuiItem::yes(), - KGuiItem(i18n("Never for This Site")))) == KMessageBox::Yes) { + QStringList(), QString::null, &checkboxResult, KMessageBox::Notify); + + if ( savePassword == KDialogBase::Yes ) { // ensure that we have the user / password inside the url // otherwise we might have a potential security problem @@ -557,8 +563,9 @@ void HTMLFormElementImpl::submit( ) w->setFolder(KWallet::Wallet::FormDataFolder()); w->writeMap(key, walletMap); - } else if (savePassword == KMessageBox::No) + } else if ( savePassword == KDialogBase::No ) view->addNonPasswordStorableSite(formUrl.host()); } } + } DOMString url(khtml::parseURL(getAttribute(ATTR_ACTION)));
*** Bug 77066 has been marked as a duplicate of this bug. ***