Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesHeaderDialog.py

changeset 3008
7848489bcb92
parent 2771
281c9b30dd91
child 3020
542e97d4ecb3
child 3057
10516539f238
equal deleted inserted replaced
3007:bad2e89047e7 3008:7848489bcb92
19 import Preferences 19 import Preferences
20 20
21 21
22 class HgQueuesHeaderDialog(QDialog, Ui_HgQueuesHeaderDialog): 22 class HgQueuesHeaderDialog(QDialog, Ui_HgQueuesHeaderDialog):
23 """ 23 """
24 Class implementing a dialog to show the commit message of the current patch. 24 Class implementing a dialog to show the commit message of the current
25 patch.
25 """ 26 """
26 def __init__(self, vcs, parent=None): 27 def __init__(self, vcs, parent=None):
27 """ 28 """
28 Constructor 29 Constructor
29 30
110 'Ensure, that it is in the search path.' 111 'Ensure, that it is in the search path.'
111 ).format('hg')) 112 ).format('hg'))
112 113
113 def __finish(self): 114 def __finish(self):
114 """ 115 """
115 Private slot called when the process finished or the user pressed the button. 116 Private slot called when the process finished or the user pressed
117 the button.
116 """ 118 """
117 if self.process is not None and \ 119 if self.process is not None and \
118 self.process.state() != QProcess.NotRunning: 120 self.process.state() != QProcess.NotRunning:
119 self.process.terminate() 121 self.process.terminate()
120 QTimer.singleShot(2000, self.process.kill) 122 QTimer.singleShot(2000, self.process.kill)
121 self.process.waitForFinished(3000) 123 self.process.waitForFinished(3000)
122 124
123 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) 125 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
124 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) 126 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
125 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) 127 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
126 self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason) 128 self.buttonBox.button(QDialogButtonBox.Close).setFocus(
129 Qt.OtherFocusReason)
127 130
128 self.process = None 131 self.process = None
129 132
130 def on_buttonBox_clicked(self, button): 133 def on_buttonBox_clicked(self, button):
131 """ 134 """

eric ide

mercurial