25 |
25 |
26 class SvnLogBrowserDialog(QDialog, SvnDialogMixin, Ui_SvnLogBrowserDialog): |
26 class SvnLogBrowserDialog(QDialog, SvnDialogMixin, Ui_SvnLogBrowserDialog): |
27 """ |
27 """ |
28 Class implementing a dialog to browse the log history. |
28 Class implementing a dialog to browse the log history. |
29 """ |
29 """ |
30 def __init__(self, vcs, parent=None): |
30 def __init__(self, vcs, isFile=False, parent=None): |
31 """ |
31 """ |
32 Constructor |
32 Constructor |
33 |
33 |
34 @param vcs reference to the vcs object |
34 @param vcs reference to the vcs object |
|
35 @param isFile flag indicating log for a file is to be shown (boolean) |
35 @param parent parent widget (QWidget) |
36 @param parent parent widget (QWidget) |
36 """ |
37 """ |
37 super().__init__(parent) |
38 super().__init__(parent) |
38 self.setupUi(self) |
39 self.setupUi(self) |
39 SvnDialogMixin.__init__(self) |
40 SvnDialogMixin.__init__(self) |
41 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
42 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
42 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
43 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
43 |
44 |
44 self.filesTree.headerItem().setText(self.filesTree.columnCount(), "") |
45 self.filesTree.headerItem().setText(self.filesTree.columnCount(), "") |
45 self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder) |
46 self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder) |
|
47 |
|
48 self.sbsCheckBox.setEnabled(isFile) |
46 |
49 |
47 self.vcs = vcs |
50 self.vcs = vcs |
48 |
51 |
49 self.__maxDate = QDate() |
52 self.__maxDate = QDate() |
50 self.__minDate = QDate() |
53 self.__minDate = QDate() |
314 |
317 |
315 @param rev1 first revision number (integer) |
318 @param rev1 first revision number (integer) |
316 @param rev2 second revision number (integer) |
319 @param rev2 second revision number (integer) |
317 @param peg_rev revision number to use as a reference (integer) |
320 @param peg_rev revision number to use as a reference (integer) |
318 """ |
321 """ |
319 if self.diff is None: |
322 if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked(): |
320 from .SvnDiffDialog import SvnDiffDialog |
323 self.vcs.svnSbsDiff(self.filename, revisions=(str(rev1), str(rev2))) |
321 self.diff = SvnDiffDialog(self.vcs) |
324 else: |
322 self.diff.show() |
325 if self.diff is None: |
323 self.diff.raise_() |
326 from .SvnDiffDialog import SvnDiffDialog |
324 QApplication.processEvents() |
327 self.diff = SvnDiffDialog(self.vcs) |
325 self.diff.start(self.filename, [rev1, rev2], pegRev=peg_rev) |
328 self.diff.show() |
|
329 self.diff.raise_() |
|
330 QApplication.processEvents() |
|
331 self.diff.start(self.filename, [rev1, rev2], pegRev=peg_rev) |
326 |
332 |
327 def on_buttonBox_clicked(self, button): |
333 def on_buttonBox_clicked(self, button): |
328 """ |
334 """ |
329 Private slot called by a button of the button box clicked. |
335 Private slot called by a button of the button box clicked. |
330 |
336 |