Mercurial > hg > easyhg
changeset 258:a574b89bfddd
* Attempt to pop input dialog to front instead of permitting it to open behind EasyMercurial window
author | Chris Cannam |
---|---|
date | Wed, 12 Jan 2011 15:46:24 +0000 |
parents | 4adccef8964d |
children | f32465eba055 |
files | easyhg.py |
diffstat | 1 files changed, 18 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/easyhg.py Wed Jan 12 15:46:05 2011 +0000 +++ b/easyhg.py Wed Jan 12 15:46:24 2011 +0000 @@ -55,8 +55,15 @@ return default if msg == _('user:'): msg = _('User:') - (r,ok) = QtGui.QInputDialog.getText(None, _('Information needed'), - msg, QtGui.QLineEdit.Normal) + d = QtGui.QInputDialog() + d.setInputMode(QtGui.QInputDialog.TextInput) + d.setTextEchoMode(QtGui.QLineEdit.Normal) + d.setLabelText(prompt) + d.setWindowTitle(_('EasyMercurial: Information')) + d.show() + d.raise_() + ok = d.exec_() + r = d.textValue() if not ok: raise util.Abort(_('response expected')) if not r: @@ -68,8 +75,15 @@ return default if not prompt or prompt == _('password:'): prompt = _('Password:'); - (r,ok) = QtGui.QInputDialog.getText(None, _('Password'), prompt, - QtGui.QLineEdit.Password) + d = QtGui.QInputDialog() + d.setInputMode(QtGui.QInputDialog.TextInput) + d.setTextEchoMode(QtGui.QLineEdit.Password) + d.setLabelText(prompt) + d.setWindowTitle(_('EasyMercurial: Password')) + d.show() + d.raise_() + ok = d.exec_() + r = d.textValue() if not ok: raise util.Abort(_('response expected')) if not r: