51 self.show() |
51 self.show() |
52 QCoreApplication.processEvents() |
52 QCoreApplication.processEvents() |
53 |
53 |
54 def __finish(self): |
54 def __finish(self): |
55 """ |
55 """ |
56 Private slot called when the process finished or the user pressed the button. |
56 Private slot called when the process finished or the user pressed |
|
57 the button. |
57 """ |
58 """ |
58 if self.proc is not None and \ |
59 if self.proc is not None and \ |
59 self.proc.state() != QProcess.NotRunning: |
60 self.proc.state() != QProcess.NotRunning: |
60 self.proc.terminate() |
61 self.proc.terminate() |
61 QTimer.singleShot(2000, self.proc.kill) |
62 QTimer.singleShot(2000, self.proc.kill) |
67 self.proc = None |
68 self.proc = None |
68 |
69 |
69 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
70 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
70 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
71 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
71 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
72 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
72 self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason) |
73 self.buttonBox.button(QDialogButtonBox.Close).setFocus( |
|
74 Qt.OtherFocusReason) |
73 |
75 |
74 if Preferences.getVCS("AutoClose") and \ |
76 if Preferences.getVCS("AutoClose") and \ |
75 self.normal and \ |
77 self.normal and \ |
76 self.errors.toPlainText() == "": |
78 self.errors.toPlainText() == "": |
77 self.accept() |
79 self.accept() |
112 self.errorGroup.hide() |
114 self.errorGroup.hide() |
113 self.normal = False |
115 self.normal = False |
114 self.intercept = False |
116 self.intercept = False |
115 |
117 |
116 self.__hasAddOrDelete = False |
118 self.__hasAddOrDelete = False |
117 if args[0] in ["fetch", "qpush", "qpop", "qgoto", "rebase", "transplant", |
119 if args[0] in ["fetch", "qpush", "qpop", "qgoto", "rebase", |
118 "update", "import", "revert", "graft"] or \ |
120 "transplant", "update", "import", "revert", |
|
121 "graft"] or \ |
119 (args[0] in ["pull", "unbundle"] and \ |
122 (args[0] in ["pull", "unbundle"] and \ |
120 ("--update" in args[1:] or "--rebase" in args[1:])): |
123 ("--update" in args[1:] or "--rebase" in args[1:])): |
121 self.__updateCommand = True |
124 self.__updateCommand = True |
122 else: |
125 else: |
123 self.__updateCommand = False |
126 self.__updateCommand = False |