eric6/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesRenamePatchDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
30 30
31 self.currentButton.setText( 31 self.currentButton.setText(
32 self.tr("Current Patch ({0})").format(currentPatch)) 32 self.tr("Current Patch ({0})").format(currentPatch))
33 self.nameCombo.addItems([""] + patchesList) 33 self.nameCombo.addItems([""] + patchesList)
34 34
35 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) 35 self.buttonBox.button(
36 QDialogButtonBox.StandardButton.Ok).setEnabled(False)
36 37
37 msh = self.minimumSizeHint() 38 msh = self.minimumSizeHint()
38 self.resize(max(self.width(), msh.width()), msh.height()) 39 self.resize(max(self.width(), msh.width()), msh.height())
39 40
40 def __updateUI(self): 41 def __updateUI(self):
43 """ 44 """
44 enable = self.nameEdit.text() != "" 45 enable = self.nameEdit.text() != ""
45 if self.namedButton.isChecked(): 46 if self.namedButton.isChecked():
46 enable = enable and self.nameCombo.currentText() != "" 47 enable = enable and self.nameCombo.currentText() != ""
47 48
48 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) 49 self.buttonBox.button(
50 QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
49 51
50 @pyqtSlot(str) 52 @pyqtSlot(str)
51 def on_nameEdit_textChanged(self, txt): 53 def on_nameEdit_textChanged(self, txt):
52 """ 54 """
53 Private slot to handle changes of the new name. 55 Private slot to handle changes of the new name.
63 65
64 @param checked state of the check box (boolean) 66 @param checked state of the check box (boolean)
65 """ 67 """
66 self.__updateUI() 68 self.__updateUI()
67 69
68 @pyqtSlot(str) 70 @pyqtSlot(int)
69 def on_nameCombo_currentIndexChanged(self, txt): 71 def on_nameCombo_currentIndexChanged(self, index):
70 """ 72 """
71 Private slot to handle changes of the selected patch name. 73 Private slot to handle changes of the selected patch name.
72 74
73 @param txt selected patch name (string) 75 @param index current index
76 @type int
74 """ 77 """
75 self.__updateUI() 78 self.__updateUI()
76 79
77 def getData(self): 80 def getData(self):
78 """ 81 """

eric ide

mercurial