13 import sys |
13 import sys |
14 |
14 |
15 import pysvn |
15 import pysvn |
16 |
16 |
17 from PyQt4.QtCore import QMutexLocker, Qt |
17 from PyQt4.QtCore import QMutexLocker, Qt |
18 from PyQt4.QtGui import QHeaderView, QDialog, QDialogButtonBox, QFont, \ |
18 from PyQt4.QtGui import QHeaderView, QDialog, QDialogButtonBox, QTreeWidgetItem |
19 QTreeWidgetItem |
|
20 |
19 |
21 from .SvnDialogMixin import SvnDialogMixin |
20 from .SvnDialogMixin import SvnDialogMixin |
22 from .Ui_SvnBlameDialog import Ui_SvnBlameDialog |
21 from .Ui_SvnBlameDialog import Ui_SvnBlameDialog |
23 |
22 |
24 import Utilities |
23 import Preferences |
25 |
24 |
26 |
25 |
27 class SvnBlameDialog(QDialog, SvnDialogMixin, Ui_SvnBlameDialog): |
26 class SvnBlameDialog(QDialog, SvnDialogMixin, Ui_SvnBlameDialog): |
28 """ |
27 """ |
29 Class implementing a dialog to show the output of the svn blame command. |
28 Class implementing a dialog to show the output of the svn blame command. |
43 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
42 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
44 |
43 |
45 self.vcs = vcs |
44 self.vcs = vcs |
46 |
45 |
47 self.blameList.headerItem().setText(self.blameList.columnCount(), "") |
46 self.blameList.headerItem().setText(self.blameList.columnCount(), "") |
48 font = QFont(self.blameList.font()) |
47 font = Preferences.getEditorOtherFonts("MonospacedFont") |
49 if Utilities.isWindowsPlatform(): |
|
50 font.setFamily("Lucida Console") |
|
51 else: |
|
52 font.setFamily("Monospace") |
|
53 self.blameList.setFont(font) |
48 self.blameList.setFont(font) |
54 |
49 |
55 self.client = self.vcs.getClient() |
50 self.client = self.vcs.getClient() |
56 self.client.callback_cancel = \ |
51 self.client.callback_cancel = \ |
57 self._clientCancelCallback |
52 self._clientCancelCallback |