Plugins/VcsPlugins/vcsMercurial/HgCommitDialog.py

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

eric ide

mercurial