Plugins/VcsPlugins/vcsMercurial/HgCommitDialog.py

changeset 1855
93bf1823466a
parent 1509
c0b5e693b0eb
child 1906
8487f9c2533b
--- a/Plugins/VcsPlugins/vcsMercurial/HgCommitDialog.py	Sat May 05 19:23:18 2012 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/HgCommitDialog.py	Wed May 09 20:07:29 2012 +0200
@@ -34,6 +34,9 @@
         """
         super().__init__(parent, Qt.WindowFlags(Qt.Window))
         self.setupUi(self)
+        
+        if vcs.version < (2, 2):
+            self.amendCheckBox.setEnabled(False)
     
     def showEvent(self, evt):
         """
@@ -65,6 +68,14 @@
                 self.recentCommitMessages)
         return msg
     
+    def amend(self):
+        """
+        Public method to retrieve the state of the amend flag.
+        
+        @return state of the amend flag (boolean)
+        """
+        return self.amendCheckBox.isChecked()
+    
     def on_buttonBox_clicked(self, button):
         """
         Private slot called by a button of the button box clicked.

eric ide

mercurial