~ubuntu-branches/debian/sid/tortoisehg/sid

« back to all changes in this revision

Viewing changes to tortoisehg/hgqt/thread.py

  • Committer: Package Import Robot
  • Author(s): Ludovico Cavedon
  • Date: 2012-02-20 22:03:12 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20120220220312-11yhqpn8suxvwyg4
Tags: 2.3-1
* Imported Upstream version 2.3 (Closes: #660387, #658140).
* Update dependency on Merurual (2.1, 2.2).

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
import Queue
11
11
import time
12
12
import urllib2
 
13
import socket
13
14
import errno
14
15
 
15
16
from PyQt4.QtCore import *
238
239
        else:
239
240
            mode = password and QLineEdit.Password \
240
241
                             or QLineEdit.Normal
241
 
            dlg = QInputDialog(self.parent(), Qt.Sheet)
242
 
            dlg.setWindowModality(Qt.WindowModal)
243
 
            dlg.setWindowTitle(_('TortoiseHg Prompt'))
244
 
            dlg.setLabelText(prompt.title())
245
 
            dlg.setTextEchoMode(mode)
246
 
            if dlg.exec_():
247
 
                text = hglib.fromunicode(dlg.textValue())
 
242
            text, ok = qtlib.getTextInput(self.parent(),
 
243
                         _('TortoiseHg Prompt'),
 
244
                         prompt.title(),
 
245
                         mode=mode)
 
246
            if ok:
 
247
                text = hglib.fromunicode(text)
248
248
            else:
249
249
                text = None
250
250
            self.responseq.put(text)
328
328
                ui.warn("\n%r\n" % util.ellipsis(inst.args[1]))
329
329
        except error.RevlogError, inst:
330
330
            ui.warn(local._("abort: %s!\n") % inst)
 
331
        except socket.error, inst:
 
332
            ui.warn(local._("abort: %s!\n") % str(inst))
331
333
        except IOError, inst:
332
334
            if hasattr(inst, "code"):
333
335
                ui.warn(local._("abort: %s\n") % inst)