RefactoringRope/ConfigurationPage/CallTipsRopePage.py

branch
eric7
changeset 394
b34f5dd3db27
parent 389
4f53795beff0
child 396
933b8fcd854f
--- 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")

eric ide

mercurial