Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2302
f29e9405c851
child 2791
a9577f248f04
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog to show a list of incoming or outgoing bookmarks. 7 Module implementing a dialog to show a list of incoming or outgoing bookmarks.
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, Qt, QTimer, QCoreApplication 18 from PyQt4.QtCore import pyqtSlot, QProcess, Qt, QTimer, QCoreApplication
13 from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \ 19 from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \
34 @param vcs reference to the vcs object 40 @param vcs reference to the vcs object
35 @param mode mode of the dialog (HgBookmarksInOutDialog.INCOMING, 41 @param mode mode of the dialog (HgBookmarksInOutDialog.INCOMING,
36 HgBookmarksInOutDialog.OUTGOING) 42 HgBookmarksInOutDialog.OUTGOING)
37 @param parent reference to the parent widget (QWidget) 43 @param parent reference to the parent widget (QWidget)
38 """ 44 """
39 super().__init__(parent) 45 super(HgBookmarksInOutDialog, self).__init__(parent)
40 self.setupUi(self) 46 self.setupUi(self)
41 47
42 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) 48 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
43 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) 49 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
44 50
314 """ 320 """
315 if self.intercept: 321 if self.intercept:
316 self.intercept = False 322 self.intercept = False
317 evt.accept() 323 evt.accept()
318 return 324 return
319 super().keyPressEvent(evt) 325 super(HgBookmarksInOutDialog, self).keyPressEvent(evt)

eric ide

mercurial