src/eric7/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesRenamePatchDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9653
e67609152c5e
--- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesRenamePatchDialog.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesRenamePatchDialog.py	Wed Jul 13 14:55:47 2022 +0200
@@ -17,27 +17,26 @@
     """
     Class implementing a dialog to enter the data to rename a patch.
     """
+
     def __init__(self, currentPatch, patchesList, parent=None):
         """
         Constructor
-        
+
         @param currentPatch name of the current patch (string)
         @param patchesList list of patches to select from (list of strings)
         @param parent reference to the parent widget (QWidget)
         """
         super().__init__(parent)
         self.setupUi(self)
-        
-        self.currentButton.setText(
-            self.tr("Current Patch ({0})").format(currentPatch))
+
+        self.currentButton.setText(self.tr("Current Patch ({0})").format(currentPatch))
         self.nameCombo.addItems([""] + patchesList)
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Ok).setEnabled(False)
-        
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
+
         msh = self.minimumSizeHint()
         self.resize(max(self.width(), msh.width()), msh.height())
-    
+
     def __updateUI(self):
         """
         Private slot to update the UI.
@@ -45,46 +44,45 @@
         enable = self.nameEdit.text() != ""
         if self.namedButton.isChecked():
             enable = enable and self.nameCombo.currentText() != ""
-        
-        self.buttonBox.button(
-            QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
-    
+
+        self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
+
     @pyqtSlot(str)
     def on_nameEdit_textChanged(self, txt):
         """
         Private slot to handle changes of the new name.
-        
+
         @param txt text of the edit (string)
         """
         self.__updateUI()
-    
+
     @pyqtSlot(bool)
     def on_namedButton_toggled(self, checked):
         """
         Private slot to handle changes of the selection method.
-        
+
         @param checked state of the check box (boolean)
         """
         self.__updateUI()
-    
+
     @pyqtSlot(int)
     def on_nameCombo_currentIndexChanged(self, index):
         """
         Private slot to handle changes of the selected patch name.
-        
+
         @param index current index
         @type int
         """
         self.__updateUI()
-    
+
     def getData(self):
         """
         Public method to retrieve the entered data.
-        
+
         @return tuple of new name and selected patch (string, string)
         """
         selectedPatch = ""
         if self.namedButton.isChecked():
             selectedPatch = self.nameCombo.currentText()
-        
+
         return self.nameEdit.text().replace(" ", "_"), selectedPatch

eric ide

mercurial