28 |
28 |
29 class SvnLogBrowserDialog(QDialog, Ui_SvnLogBrowserDialog): |
29 class SvnLogBrowserDialog(QDialog, Ui_SvnLogBrowserDialog): |
30 """ |
30 """ |
31 Class implementing a dialog to browse the log history. |
31 Class implementing a dialog to browse the log history. |
32 """ |
32 """ |
33 def __init__(self, vcs, parent=None): |
33 def __init__(self, vcs, isFile=False, parent=None): |
34 """ |
34 """ |
35 Constructor |
35 Constructor |
36 |
36 |
37 @param vcs reference to the vcs object |
37 @param vcs reference to the vcs object |
|
38 @param isFile flag indicating log for a file is to be shown (boolean) |
38 @param parent parent widget (QWidget) |
39 @param parent parent widget (QWidget) |
39 """ |
40 """ |
40 super(SvnLogBrowserDialog, self).__init__(parent) |
41 super(SvnLogBrowserDialog, self).__init__(parent) |
41 self.setupUi(self) |
42 self.setupUi(self) |
42 |
43 |
43 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
44 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
44 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
45 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
45 |
46 |
46 self.filesTree.headerItem().setText(self.filesTree.columnCount(), "") |
47 self.filesTree.headerItem().setText(self.filesTree.columnCount(), "") |
47 self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder) |
48 self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder) |
|
49 |
|
50 self.sbsCheckBox.setEnabled(isFile) |
48 |
51 |
49 self.vcs = vcs |
52 self.vcs = vcs |
50 |
53 |
51 self.__maxDate = QDate() |
54 self.__maxDate = QDate() |
52 self.__minDate = QDate() |
55 self.__minDate = QDate() |
415 Private method to do a diff of two revisions. |
418 Private method to do a diff of two revisions. |
416 |
419 |
417 @param rev1 first revision number (integer) |
420 @param rev1 first revision number (integer) |
418 @param rev2 second revision number (integer) |
421 @param rev2 second revision number (integer) |
419 """ |
422 """ |
420 if self.diff is None: |
423 if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked(): |
421 from .SvnDiffDialog import SvnDiffDialog |
424 self.vcs.svnSbsDiff(self.filename, revisions=(str(rev1), str(rev2))) |
422 self.diff = SvnDiffDialog(self.vcs) |
425 else: |
423 self.diff.show() |
426 if self.diff is None: |
424 self.diff.raise_() |
427 from .SvnDiffDialog import SvnDiffDialog |
425 self.diff.start(self.filename, [rev1, rev2]) |
428 self.diff = SvnDiffDialog(self.vcs) |
|
429 self.diff.show() |
|
430 self.diff.raise_() |
|
431 self.diff.start(self.filename, [rev1, rev2]) |
426 |
432 |
427 def on_buttonBox_clicked(self, button): |
433 def on_buttonBox_clicked(self, button): |
428 """ |
434 """ |
429 Private slot called by a button of the button box clicked. |
435 Private slot called by a button of the button box clicked. |
430 |
436 |