Mercurial > hg > easyhg
changeset 428:a47eac9c7fea
Small tidy to login dialog
author | Chris Cannam |
---|---|
date | Thu, 23 Jun 2011 21:04:25 +0100 |
parents | 8edf76b57bd9 |
children | 6a9756700fd1 |
files | easyhg2.py |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/easyhg2.py Thu Jun 23 20:36:23 2011 +0100 +++ b/easyhg2.py Thu Jun 23 21:04:25 2011 +0100 @@ -115,7 +115,7 @@ layout = QtGui.QGridLayout() dialog.setLayout(layout) - layout.addWidget(QtGui.QLabel(_('Please supply your user name and password for\n%s:') % uri), 0, 0, 1, 2) + layout.addWidget(QtGui.QLabel(_('<h3>Login required</h3><p>Please provide your user name and password for the repository at<br><code>%s:</code>') % uri), 0, 0, 1, 2) userfield = QtGui.QLineEdit() if user: @@ -126,7 +126,7 @@ passfield = QtGui.QLineEdit() passfield.setEchoMode(QtGui.QLineEdit.Password) if passwd: - userfield.setText(passwd) + passfield.setText(passwd) layout.addWidget(QtGui.QLabel(_('Password:')), 2, 0) layout.addWidget(passfield, 2, 1) @@ -140,8 +140,14 @@ bb.connect(cancel, Qt.SIGNAL("clicked()"), dialog, Qt.SLOT("reject()")) layout.addWidget(bb, 3, 0, 1, 2) - dialog.setWindowTitle(_('EasyMercurial: Password')) + dialog.setWindowTitle(_('EasyMercurial: Login')) dialog.show() + + if not user: + userfield.setFocus(True) + elif not passwd: + passfield.setFocus(True) + dialog.raise_() ok = dialog.exec_() if ok: @@ -150,7 +156,7 @@ passwd = passfield.text() if passwd and keyring_key != '' and not from_keyring: keyring_key = '%s@@%s' % (uri, user) - keyring.set_password('Mercurial', keyring_key, passwd) +# keyring.set_password('Mercurial', keyring_key, passwd) self.add_password(realm, authuri, user, passwd) else: raise util.Abort(_('password entry cancelled'))