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