Plugins/VcsPlugins/vcsSubversion/SvnBlameDialog.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3192
34689c08f095
child 3591
2f2a4a76dd22
equal deleted inserted replaced
3456:96232974dcdb 3484:645c12de6b0c
7 Module implementing a dialog to show the output of the svn blame command. 7 Module implementing a dialog to show the output of the svn blame command.
8 """ 8 """
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 try: 11 try:
12 str = unicode # __IGNORE_WARNING__ 12 str = unicode
13 except (NameError): 13 except NameError:
14 pass 14 pass
15 15
16 import os 16 import os
17 17
18 from PyQt4.QtCore import QTimer, QProcess, Qt, pyqtSlot 18 from PyQt4.QtCore import QTimer, QProcess, Qt, pyqtSlot
19 from PyQt4.QtGui import QHeaderView, QLineEdit, QDialog, QDialogButtonBox, \ 19 from PyQt4.QtGui import QHeaderView, QLineEdit, QDialog, QDialogButtonBox, \
20 QFont, QTreeWidgetItem 20 QTreeWidgetItem
21 21
22 from E5Gui import E5MessageBox 22 from E5Gui import E5MessageBox
23 23
24 from .Ui_SvnBlameDialog import Ui_SvnBlameDialog 24 from .Ui_SvnBlameDialog import Ui_SvnBlameDialog
25 25
26 import Preferences 26 import Preferences
27 import Utilities
28 27
29 28
30 class SvnBlameDialog(QDialog, Ui_SvnBlameDialog): 29 class SvnBlameDialog(QDialog, Ui_SvnBlameDialog):
31 """ 30 """
32 Class implementing a dialog to show the output of the svn blame command. 31 Class implementing a dialog to show the output of the svn blame command.
46 45
47 self.process = QProcess() 46 self.process = QProcess()
48 self.vcs = vcs 47 self.vcs = vcs
49 48
50 self.blameList.headerItem().setText(self.blameList.columnCount(), "") 49 self.blameList.headerItem().setText(self.blameList.columnCount(), "")
51 font = QFont(self.blameList.font()) 50 font = Preferences.getEditorOtherFonts("MonospacedFont")
52 if Utilities.isWindowsPlatform():
53 font.setFamily("Lucida Console")
54 else:
55 font.setFamily("Monospace")
56 self.blameList.setFont(font) 51 self.blameList.setFont(font)
57 52
58 self.__ioEncoding = Preferences.getSystem("IOEncoding") 53 self.__ioEncoding = Preferences.getSystem("IOEncoding")
59 54
60 self.process.finished.connect(self.__procFinished) 55 self.process.finished.connect(self.__procFinished)
102 if not procStarted: 97 if not procStarted:
103 self.inputGroup.setEnabled(False) 98 self.inputGroup.setEnabled(False)
104 self.inputGroup.hide() 99 self.inputGroup.hide()
105 E5MessageBox.critical( 100 E5MessageBox.critical(
106 self, 101 self,
107 self.trUtf8('Process Generation Error'), 102 self.tr('Process Generation Error'),
108 self.trUtf8( 103 self.tr(
109 'The process {0} could not be started. ' 104 'The process {0} could not be started. '
110 'Ensure, that it is in the search path.' 105 'Ensure, that it is in the search path.'
111 ).format('svn')) 106 ).format('svn'))
112 else: 107 else:
113 self.inputGroup.setEnabled(True) 108 self.inputGroup.setEnabled(True)

eric ide

mercurial