27 |
27 |
28 class SvnLogBrowserDialog(QDialog, SvnDialogMixin, Ui_SvnLogBrowserDialog): |
28 class SvnLogBrowserDialog(QDialog, SvnDialogMixin, Ui_SvnLogBrowserDialog): |
29 """ |
29 """ |
30 Class implementing a dialog to browse the log history. |
30 Class implementing a dialog to browse the log history. |
31 """ |
31 """ |
32 def __init__(self, vcs, parent=None): |
32 def __init__(self, vcs, isFile=False, parent=None): |
33 """ |
33 """ |
34 Constructor |
34 Constructor |
35 |
35 |
36 @param vcs reference to the vcs object |
36 @param vcs reference to the vcs object |
|
37 @param isFile flag indicating log for a file is to be shown (boolean) |
37 @param parent parent widget (QWidget) |
38 @param parent parent widget (QWidget) |
38 """ |
39 """ |
39 super(SvnLogBrowserDialog, self).__init__(parent) |
40 super(SvnLogBrowserDialog, self).__init__(parent) |
40 self.setupUi(self) |
41 self.setupUi(self) |
41 SvnDialogMixin.__init__(self) |
42 SvnDialogMixin.__init__(self) |
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() |
316 |
319 |
317 @param rev1 first revision number (integer) |
320 @param rev1 first revision number (integer) |
318 @param rev2 second revision number (integer) |
321 @param rev2 second revision number (integer) |
319 @param peg_rev revision number to use as a reference (integer) |
322 @param peg_rev revision number to use as a reference (integer) |
320 """ |
323 """ |
321 if self.diff is None: |
324 if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked(): |
322 from .SvnDiffDialog import SvnDiffDialog |
325 self.vcs.svnSbsDiff(self.filename, revisions=(str(rev1), str(rev2))) |
323 self.diff = SvnDiffDialog(self.vcs) |
326 else: |
324 self.diff.show() |
327 if self.diff is None: |
325 self.diff.raise_() |
328 from .SvnDiffDialog import SvnDiffDialog |
326 QApplication.processEvents() |
329 self.diff = SvnDiffDialog(self.vcs) |
327 self.diff.start(self.filename, [rev1, rev2], pegRev=peg_rev) |
330 self.diff.show() |
|
331 self.diff.raise_() |
|
332 QApplication.processEvents() |
|
333 self.diff.start(self.filename, [rev1, rev2], pegRev=peg_rev) |
328 |
334 |
329 def on_buttonBox_clicked(self, button): |
335 def on_buttonBox_clicked(self, button): |
330 """ |
336 """ |
331 Private slot called by a button of the button box clicked. |
337 Private slot called by a button of the button box clicked. |
332 |
338 |