Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesHeaderDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2791
a9577f248f04
parent 3008
7848489bcb92
child 3058
0a02c433f52d
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
25 import Preferences 25 import Preferences
26 26
27 27
28 class HgQueuesHeaderDialog(QDialog, Ui_HgQueuesHeaderDialog): 28 class HgQueuesHeaderDialog(QDialog, Ui_HgQueuesHeaderDialog):
29 """ 29 """
30 Class implementing a dialog to show the commit message of the current patch. 30 Class implementing a dialog to show the commit message of the current
31 patch.
31 """ 32 """
32 def __init__(self, vcs, parent=None): 33 def __init__(self, vcs, parent=None):
33 """ 34 """
34 Constructor 35 Constructor
35 36
116 'Ensure, that it is in the search path.' 117 'Ensure, that it is in the search path.'
117 ).format('hg')) 118 ).format('hg'))
118 119
119 def __finish(self): 120 def __finish(self):
120 """ 121 """
121 Private slot called when the process finished or the user pressed the button. 122 Private slot called when the process finished or the user pressed
123 the button.
122 """ 124 """
123 if self.process is not None and \ 125 if self.process is not None and \
124 self.process.state() != QProcess.NotRunning: 126 self.process.state() != QProcess.NotRunning:
125 self.process.terminate() 127 self.process.terminate()
126 QTimer.singleShot(2000, self.process.kill) 128 QTimer.singleShot(2000, self.process.kill)
127 self.process.waitForFinished(3000) 129 self.process.waitForFinished(3000)
128 130
129 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) 131 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
130 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) 132 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
131 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) 133 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
132 self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason) 134 self.buttonBox.button(QDialogButtonBox.Close).setFocus(
135 Qt.OtherFocusReason)
133 136
134 self.process = None 137 self.process = None
135 138
136 def on_buttonBox_clicked(self, button): 139 def on_buttonBox_clicked(self, button):
137 """ 140 """

eric ide

mercurial