# HG changeset patch # User Chris Cannam # Date 1294847184 0 # Node ID a574b89bfddd14bc914e5b8dde3545f4bf625039 # Parent 4adccef8964d20b203fa01cf2f27de31db8b81f4 * Attempt to pop input dialog to front instead of permitting it to open behind EasyMercurial window diff -r 4adccef8964d -r a574b89bfddd easyhg.py --- 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: