36 @param log optional log message (string) |
36 @param log optional log message (string) |
37 """ |
37 """ |
38 super(SvnDialog, self).__init__(parent) |
38 super(SvnDialog, self).__init__(parent) |
39 self.setupUi(self) |
39 self.setupUi(self) |
40 SvnDialogMixin.__init__(self, log) |
40 SvnDialogMixin.__init__(self, log) |
41 self.setWindowFlags(Qt.Window) |
41 self.setWindowFlags(Qt.WindowType.Window) |
42 |
42 |
43 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
43 self.buttonBox.button( |
44 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
44 QDialogButtonBox.StandardButton.Close).setEnabled(False) |
|
45 self.buttonBox.button( |
|
46 QDialogButtonBox.StandardButton.Cancel).setDefault(True) |
45 |
47 |
46 self.outputGroup.setTitle(text) |
48 self.outputGroup.setTitle(text) |
47 self.errorGroup.hide() |
49 self.errorGroup.hide() |
48 |
50 |
49 pysvnClient.callback_cancel = self._clientCancelCallback |
51 pysvnClient.callback_cancel = self._clientCancelCallback |
126 def finish(self): |
128 def finish(self): |
127 """ |
129 """ |
128 Public slot called when the process finished or the user pressed the |
130 Public slot called when the process finished or the user pressed the |
129 button. |
131 button. |
130 """ |
132 """ |
131 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
133 self.buttonBox.button( |
132 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
134 QDialogButtonBox.StandardButton.Close).setEnabled(True) |
133 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
135 self.buttonBox.button( |
|
136 QDialogButtonBox.StandardButton.Cancel).setEnabled(False) |
|
137 self.buttonBox.button( |
|
138 QDialogButtonBox.StandardButton.Close).setDefault(True) |
134 |
139 |
135 self._cancel() |
140 self._cancel() |
136 |
141 |
137 if Preferences.getVCS("AutoClose"): |
142 if Preferences.getVCS("AutoClose"): |
138 self.accept() |
143 self.accept() |
141 """ |
146 """ |
142 Private slot called by a button of the button box clicked. |
147 Private slot called by a button of the button box clicked. |
143 |
148 |
144 @param button button that was clicked (QAbstractButton) |
149 @param button button that was clicked (QAbstractButton) |
145 """ |
150 """ |
146 if button == self.buttonBox.button(QDialogButtonBox.Close): |
151 if button == self.buttonBox.button( |
|
152 QDialogButtonBox.StandardButton.Close |
|
153 ): |
147 self.close() |
154 self.close() |
148 elif button == self.buttonBox.button(QDialogButtonBox.Cancel): |
155 elif button == self.buttonBox.button( |
|
156 QDialogButtonBox.StandardButton.Cancel |
|
157 ): |
149 self.finish() |
158 self.finish() |
150 |
159 |
151 def hasAddOrDelete(self): |
160 def hasAddOrDelete(self): |
152 """ |
161 """ |
153 Public method to check, if the last action contained an add or delete. |
162 Public method to check, if the last action contained an add or delete. |