Bug 84072 - (typo) confusing button in konq when offering to save a passwd
Summary: (typo) confusing button in konq when offering to save a passwd
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kwallet (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: George Staikos
URL:
Keywords:
: 77066 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-27 07:23 UTC by Mathieu Jobin
Modified: 2004-09-09 18:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Jobin 2004-06-27 07:23:21 UTC
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.
Comment 1 Andre Woebbeking 2004-07-17 11:47:34 UTC
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)));


Comment 2 Stephan Binner 2004-09-09 18:39:10 UTC
*** Bug 77066 has been marked as a duplicate of this bug. ***