diff -r 8b554b390d6f -r b34f5dd3db27 RefactoringRope/ConfigurationPage/CallTipsRopePage.py --- a/RefactoringRope/ConfigurationPage/CallTipsRopePage.py Mon Oct 17 08:37:28 2022 +0200 +++ b/RefactoringRope/ConfigurationPage/CallTipsRopePage.py Mon Oct 17 16:45:23 2022 +0200 @@ -7,6 +7,8 @@ Module implementing the Rope Calltips configuration page. """ +from PyQt6.QtCore import pyqtSlot + from Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase from .Ui_CallTipsRopePage import Ui_CallTipsRopePage @@ -45,3 +47,25 @@ "CodeAssistCalltipsEnabled", self.ropeCalltipsCheckBox.isChecked() ) self.__plugin.setPreferences("CalltipsMaxFixes", self.ctMaxfixesSpinBox.value()) + + def polishPage(self): + """ + Public slot to perform some polishing actions. + """ + names = self.__plugin.getCodeAssistServer().connectionNames() + self.createPython3Button.setEnabled("Python3" in names) + self.editPython3Button.setEnabled("Python3" in names) + + @pyqtSlot() + def on_editPython3Button_clicked(self): + """ + Private slot to edit the rope configuration for Python 3. + """ + self.__plugin.getCodeAssistServer().editConfig("Python3") + + @pyqtSlot() + def on_createPython3Button_clicked(self): + """ + Private slot to create a new default rope configuration for Python 3. + """ + self.__plugin.getCodeAssistServer().createConfig("Python3")