From kfm-devel Thu May 19 00:57:28 2005 From: "Aaron J. Seigo" Date: Thu, 19 May 2005 00:57:28 +0000 To: kfm-devel Subject: don't ask again for "save password?" dialog Message-Id: <200505181857.29560.aseigo () kde ! org> X-MARC-Message: https://marc.info/?l=kfm-devel&m=111646466606751 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart19266267.ZdJVHktp92" --nextPart19266267.ZdJVHktp92 Content-Type: multipart/mixed; boundary="Boundary-01=_5R+iCJev+mBi+cJ" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_5R+iCJev+mBi+cJ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hi.. attached is a patch that adds a "Don't ask again" box to the "do you want m= e=20 to save the passwords for this form in kwallet?". this was requested on bugs.kde.org by someone i know here in calgary, so th= ey=20 mention it from time to time. nagging is a great motivator at times. =3D/=20 anyways, the love kwallet, but don't like how intrusive it is with it's=20 constant dialoging =3D) is this cool to commit, or are their objections to it? =2D-=20 Aaron J. Seigo GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 --Boundary-01=_5R+iCJev+mBi+cJ Content-Type: text/x-diff; charset="us-ascii"; name="dontaskagain_kthml.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="dontaskagain_kthml.diff" Index: html/html_formimpl.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- html/html_formimpl.cpp (revision 415448) +++ html/html_formimpl.cpp (working copy) @@ -600,22 +600,35 @@ 0, "questionYesN= oCancel", true, true, KStdGuiItem::yes= (), KGuiItem(i18n("Ne&ver for This Site")), KStdGuiItem::no()); =20 =2D bool checkboxResult =3D false; =2D const int savePassword =3D KMessageBox::createKMessageBo= x(dialog, QMessageBox::Information, =2D = i18n("Konqueror has the ability to store the password " =2D = "in an encrypted wallet. When the wallet is unlocked, it " =2D = "can then automatically restore the login information " =2D = "next time you visit this site. Do you want to store " =2D = "the information now?"), =2D = QStringList(), QString::null, &checkboxResult, KMessageBox::Notify); + KMessageBox::ButtonCode savePassword =3D KMessageBox::No; + if ( KMessageBox::shouldBeShownYesNo( "KHTMLPart_StorePass= word", savePassword ) ) + { + bool checkboxResult =3D false; + int rv =3D KMessageBox::createKMessageBox(dialog, QMes= sageBox::Information, + i18n("Konquero= r has the ability to store the password " + "in an en= crypted wallet. When the wallet is unlocked, it " + "can then= automatically restore the login information " + "next tim= e you visit this site. Do you want to store " + "the info= rmation now?"), + QStringList(),= i18n("Don't show again"), + &checkboxResul= t, KMessageBox::Notify); =20 =2D if ( savePassword =3D=3D KDialogBase::Yes ) { + if ( checkboxResult ) + { + savePassword =3D (rv =3D=3D KDialogBase::Yes ? KMe= ssageBox::Yes : + rv =3D=3D= KDialogBase::No ? KMessageBox::No : + = KMessageBox::Cancel); + KMessageBox::saveDontShowAgainYesNo( "KHTMLPart_St= orePassword", savePassword ); + } + } + + if ( savePassword =3D=3D 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. =20 getDocument()->view()->part()->saveToWallet(key, m_wal= letMap); =2D } else if ( savePassword =3D=3D KDialogBase::No ) { + } else if ( savePassword =3D=3D KMessageBox::No ) { view->addNonPasswordStorableSite(formUrl.host()); } } --Boundary-01=_5R+iCJev+mBi+cJ-- --nextPart19266267.ZdJVHktp92 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBCi+R51rcusafx20MRAp5zAJoCwpgfw5nWDca3Xc7eciLoUh3FXQCgrKPZ izIj8uadyVWA8VyUTHfO3sk= =8ON9 -----END PGP SIGNATURE----- --nextPart19266267.ZdJVHktp92--