[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [PATCH] Kpgp sane passphrase handling
From:       Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date:       2001-06-30 16:06:27
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 30 June 2001 16:38, Ingo Klöcker wrote:
> On Saturday, 30. June 2001 00:07, Marc Mutz wrote:
<snip>
> > Although this change looks like it would violate the message
> > freeze, this is in fact not the case, since the new dialog is from
> > kdelibs. The remaining changes that I'll make after 2.2 are
> > commented in the source.(search for ###).
>
> I have two remarks/questions:
>
> 1.) It's really annoying that I always have to check the "Keep
> password" checkbox in the new password dialog although I've checked
> the "Keep password in memory" option in the configuration dialog. I
> had a look at kpassdlg.* and it doesn't seem to be possible to call
> the dialog with the "Keep password" checkbox checked by default (if
> the user wants to keep the password in memory).

We should merge the different password dialogs that float around in 
kdelibs for KDE2.3: KIO uses it's own, KPasswordDialog is another one, 
no-one seems to use and perhaps another dozen apps do it themselves, 
too.

We could then add setKeep() to this dialog.

> Actually the checkbox is checked/unchecked according to the value of
> "Keep" in the "Passwords" section in the kdeglobals config file. This
> global value seems to be changeable in KControl->Passwords. Therefore
> I guess we can remove the extra "Keep password in memory" option in
> the configuration dialog. But this would obviously violate the GUI
> freeze. OTOH we shouldn't keep a nonfunctional checkbox (because some
> people might complain about it's nonfunctionality and by this waste
> their and our time). Therefore it might be preferable to keep the old
> password dialog till after KDE2.2. Your other non GUI changes (i.e.
> storing the password in a char * instead of a QString) can of course
> go into KDE2.2.
>

OK, I'll make a patch that contains the non-passphrase-related changes 
and another one that

a. does new-style passphrase handling (char*)
b. modifies the old passphrase dialog to use a KPasswordEdit instead of 
plain QLineEdit.

> 2.) Have a look at the following code snippet:
>       if ( passDlg->exec() == QDialog::Accepted ) {
> 	if ( !setPassPhrase( passDlg->password() ) ) {
> 	  delete passDlg;
> 	  // ### set new errmsg after message freeze:
> 	  //	  errMsg = i18n("Out of memory or passphrase too long\n"
> 	  //			"(Must be less than 1024 chacacters).");
> 	  errMsg = i18n("The passphrase is missing.");
> 	  return false;
> 	}
> 	setStorePassPhrase( passDlg->keep() );
>       } else {
> 	wipePassPhrase();
> 	setStorePassPhrase( false );
>       }
>
> Why do you setStorePassPhrase( false ) if the user hits Cancel in the
> password dialog? IMHO this line should be removed.

If the user hits cancel, we can't use data entered into the dialog. So 
we must use defaults. Not storing the passphrase is IMO a very decent 
default. The user can always switch back to storing on the next 
passphrase dialog (which comes up this way or another, since we wiped 
the passphrase).

> I noticed a typo in the new error message: "chacacters" ->
> "characters".

ack

Marc

- -- 
Marc Mutz <Marc@Mutz.com>
http://marc.mutz.com/
http://www.mathematik.uni-bielefeld.de/~mmutz/
http://EncryptionHOWTO.sourceforge.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7PhTv3oWD+L2/6DgRAi3dAJ4sz/5ZjK+lWxcZoOOxFgIdav2O9gCg3EVZ
t/yGN2Wb26mYUn95/3lQPP4=
=9MN0
-----END PGP SIGNATURE-----
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic