Plugins/VcsPlugins/vcsMercurial/HgCommitDialog.py

branch
Py2 comp.
changeset 2847
1843ef6e2656
parent 2525
8b507a9a2d40
parent 2815
53c1d1f9ec86
child 3057
10516539f238
equal deleted inserted replaced
2846:b852fe4d153a 2847:1843ef6e2656
25 @signal rejected() emitted, if the dialog was rejected 25 @signal rejected() emitted, if the dialog was rejected
26 """ 26 """
27 accepted = pyqtSignal() 27 accepted = pyqtSignal()
28 rejected = pyqtSignal() 28 rejected = pyqtSignal()
29 29
30 def __init__(self, vcs, parent=None): 30 def __init__(self, vcs, mq, parent=None):
31 """ 31 """
32 Constructor 32 Constructor
33 33
34 @param vcs reference to the vcs object 34 @param vcs reference to the vcs object
35 @param mq flag indicating a queue commit (boolean)
35 @param parent parent widget (QWidget) 36 @param parent parent widget (QWidget)
36 """ 37 """
37 super(HgCommitDialog, self).__init__(parent, Qt.WindowFlags(Qt.Window)) 38 super(HgCommitDialog, self).__init__(parent, Qt.WindowFlags(Qt.Window))
38 self.setupUi(self) 39 self.setupUi(self)
39 40
40 if vcs.version < (2, 2): 41 if mq:
41 self.amendCheckBox.setEnabled(False) 42 self.amendCheckBox.setVisible(False)
42 43 self.subrepoCheckBox.setVisible(False)
43 self.subrepoCheckBox.setVisible(vcs.hasSubrepositories()) 44 else:
45 if vcs.version < (2, 2):
46 self.amendCheckBox.setEnabled(False)
47
48 self.subrepoCheckBox.setVisible(vcs.hasSubrepositories())
44 49
45 def showEvent(self, evt): 50 def showEvent(self, evt):
46 """ 51 """
47 Public method called when the dialog is about to be shown. 52 Public method called when the dialog is about to be shown.
48 53

eric ide

mercurial