Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2302
f29e9405c851
child 2575
cbdf5b8a5bc5
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog to show the output of the hg diff command process. 7 Module implementing a dialog to show the output of the hg diff command process.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
11 try:
12 str = unicode
13 except (NameError):
14 pass
9 15
10 import os 16 import os
11 17
12 from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, QFileInfo, Qt 18 from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, QFileInfo, Qt
13 from PyQt4.QtGui import QWidget, QDialogButtonBox, QBrush, QColor, \ 19 from PyQt4.QtGui import QWidget, QDialogButtonBox, QBrush, QColor, \
31 Constructor 37 Constructor
32 38
33 @param vcs reference to the vcs object 39 @param vcs reference to the vcs object
34 @param parent parent widget (QWidget) 40 @param parent parent widget (QWidget)
35 """ 41 """
36 super().__init__(parent) 42 super(HgDiffDialog, self).__init__(parent)
37 self.setupUi(self) 43 self.setupUi(self)
38 44
39 self.buttonBox.button(QDialogButtonBox.Save).setEnabled(False) 45 self.buttonBox.button(QDialogButtonBox.Save).setEnabled(False)
40 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) 46 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
41 47
479 """ 485 """
480 if self.intercept: 486 if self.intercept:
481 self.intercept = False 487 self.intercept = False
482 evt.accept() 488 evt.accept()
483 return 489 return
484 super().keyPressEvent(evt) 490 super(HgDiffDialog, self).keyPressEvent(evt)

eric ide

mercurial