25 Class implementing a dialog to show the output of the svn log command process. |
25 Class implementing a dialog to show the output of the svn log command process. |
26 |
26 |
27 The dialog is nonmodal. Clicking a link in the upper text pane shows |
27 The dialog is nonmodal. Clicking a link in the upper text pane shows |
28 a diff of the versions. |
28 a diff of the versions. |
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 |
40 |
74 self.revisions = [] # stack of remembered revisions |
75 self.revisions = [] # stack of remembered revisions |
75 self.revString = self.trUtf8('revision') |
76 self.revString = self.trUtf8('revision') |
76 |
77 |
77 self.buf = [] # buffer for stdout |
78 self.buf = [] # buffer for stdout |
78 self.diff = None |
79 self.diff = None |
|
80 |
|
81 self.sbsCheckBox.setEnabled(isFile) |
79 |
82 |
80 def closeEvent(self, e): |
83 def closeEvent(self, e): |
81 """ |
84 """ |
82 Private slot implementing a close event handler. |
85 Private slot implementing a close event handler. |
83 |
86 |
264 v2 = ver.split('_')[1] |
267 v2 = ver.split('_')[1] |
265 if v1 == "" or v2 == "": |
268 if v1 == "" or v2 == "": |
266 return |
269 return |
267 self.contents.scrollToAnchor(ver) |
270 self.contents.scrollToAnchor(ver) |
268 |
271 |
269 if self.diff is None: |
272 if self.sbsCheckBox.isEnabled() and self.sbsCheckBox.isChecked(): |
270 from .SvnDiffDialog import SvnDiffDialog |
273 self.vcs.svnSbsDiff(filename, revisions=(v1, v2)) |
271 self.diff = SvnDiffDialog(self.vcs) |
274 else: |
272 self.diff.show() |
275 if self.diff is None: |
273 self.diff.start(filename, [v1, v2]) |
276 from .SvnDiffDialog import SvnDiffDialog |
|
277 self.diff = SvnDiffDialog(self.vcs) |
|
278 self.diff.show() |
|
279 self.diff.start(filename, [v1, v2]) |
274 |
280 |
275 def on_passwordCheckBox_toggled(self, isOn): |
281 def on_passwordCheckBox_toggled(self, isOn): |
276 """ |
282 """ |
277 Private slot to handle the password checkbox toggled. |
283 Private slot to handle the password checkbox toggled. |
278 |
284 |