40 self.setupUi(self) |
40 self.setupUi(self) |
41 |
41 |
42 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
42 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
43 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
43 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
44 |
44 |
45 self.process = QProcess() |
|
46 self.vcs = vcs |
45 self.vcs = vcs |
47 self.__hgClient = vcs.getClient() |
46 self.__hgClient = vcs.getClient() |
48 |
47 |
49 self.patchesList.header().setSortIndicator(0, Qt.AscendingOrder) |
48 self.patchesList.header().setSortIndicator(0, Qt.AscendingOrder) |
50 |
49 |
51 self.process.finished.connect(self.__procFinished) |
50 if self.__hgClient: |
52 self.process.readyReadStandardOutput.connect(self.__readStdout) |
51 self.process = None |
53 self.process.readyReadStandardError.connect(self.__readStderr) |
52 else: |
|
53 self.process = QProcess() |
|
54 self.process.finished.connect(self.__procFinished) |
|
55 self.process.readyReadStandardOutput.connect(self.__readStdout) |
|
56 self.process.readyReadStandardError.connect(self.__readStderr) |
54 |
57 |
55 self.__statusDict = { |
58 self.__statusDict = { |
56 "A": self.tr("applied"), |
59 "A": self.tr("applied"), |
57 "U": self.tr("not applied"), |
60 "U": self.tr("not applied"), |
58 "G": self.tr("guarded"), |
61 "G": self.tr("guarded"), |
219 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
222 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
220 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
223 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
221 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
224 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
222 self.buttonBox.button(QDialogButtonBox.Close).setFocus( |
225 self.buttonBox.button(QDialogButtonBox.Close).setFocus( |
223 Qt.OtherFocusReason) |
226 Qt.OtherFocusReason) |
224 |
|
225 self.process = None |
|
226 |
227 |
227 if self.patchesList.topLevelItemCount() == 0: |
228 if self.patchesList.topLevelItemCount() == 0: |
228 # no patches present |
229 # no patches present |
229 self.__generateItem( |
230 self.__generateItem( |
230 0, "", self.tr("no patches found"), "", True) |
231 0, "", self.tr("no patches found"), "", True) |