Plugins/VcsPlugins/vcsMercurial/HgDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2791
a9577f248f04
parent 3008
7848489bcb92
child 3058
0a02c433f52d
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
57 self.show() 57 self.show()
58 QCoreApplication.processEvents() 58 QCoreApplication.processEvents()
59 59
60 def __finish(self): 60 def __finish(self):
61 """ 61 """
62 Private slot called when the process finished or the user pressed the button. 62 Private slot called when the process finished or the user pressed
63 the button.
63 """ 64 """
64 if self.proc is not None and \ 65 if self.proc is not None and \
65 self.proc.state() != QProcess.NotRunning: 66 self.proc.state() != QProcess.NotRunning:
66 self.proc.terminate() 67 self.proc.terminate()
67 QTimer.singleShot(2000, self.proc.kill) 68 QTimer.singleShot(2000, self.proc.kill)
73 self.proc = None 74 self.proc = None
74 75
75 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) 76 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
76 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) 77 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
77 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) 78 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
78 self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason) 79 self.buttonBox.button(QDialogButtonBox.Close).setFocus(
80 Qt.OtherFocusReason)
79 81
80 if Preferences.getVCS("AutoClose") and \ 82 if Preferences.getVCS("AutoClose") and \
81 self.normal and \ 83 self.normal and \
82 self.errors.toPlainText() == "": 84 self.errors.toPlainText() == "":
83 self.accept() 85 self.accept()
118 self.errorGroup.hide() 120 self.errorGroup.hide()
119 self.normal = False 121 self.normal = False
120 self.intercept = False 122 self.intercept = False
121 123
122 self.__hasAddOrDelete = False 124 self.__hasAddOrDelete = False
123 if args[0] in ["fetch", "qpush", "qpop", "qgoto", "rebase", "transplant", 125 if args[0] in ["fetch", "qpush", "qpop", "qgoto", "rebase",
124 "update", "import", "revert", "graft"] or \ 126 "transplant", "update", "import", "revert",
127 "graft"] or \
125 (args[0] in ["pull", "unbundle"] and \ 128 (args[0] in ["pull", "unbundle"] and \
126 ("--update" in args[1:] or "--rebase" in args[1:])): 129 ("--update" in args[1:] or "--rebase" in args[1:])):
127 self.__updateCommand = True 130 self.__updateCommand = True
128 else: 131 else:
129 self.__updateCommand = False 132 self.__updateCommand = False

eric ide

mercurial