Ejemplo n.º 1
0
    def deactivate(self):
        """Deactivates the plugin.

        The plugin may override the method to do specific
        plugin deactivation handling.
        Note: if overriden do not forget to call the
              base class deactivate()
        """
        self.hpy = None

        self.__memtopButton.disconnect()
        self.__debuggerButton.disconnect()
        self.__repeatButton.disconnect()
        self.__resetButton.disconnect()

        mainToolbar = self.ide.mainWindow.getToolbar()
        mainToolbar.removeAction(self.__separator)
        mainToolbar.removeAction(self.__debuggerButton)
        mainToolbar.removeAction(self.__memtopButton)
        mainToolbar.removeAction(self.__repeatButton)
        mainToolbar.removeAction(self.__resetButton)

        self.__separator.deleteLater()
        self.__memtopButton.deleteLater()
        self.__debuggerButton.deleteLater()
        self.__repeatButton.deleteLater()
        self.__resetButton.deleteLater()

        WizardInterface.deactivate(self)
Ejemplo n.º 2
0
    def deactivate(self):
        """ The plugin may override the method to do specific
            plugin deactivation handling.
            Note: if overriden do not forget to call the
                  base class deactivate() """

        self.ide.project.projectChanged.disconnect(self.__collectGarbage)
        self.disconnect(self.ide.editorsManager, SIGNAL('tabClosed'),
                        self.__collectGarbage)

        WizardInterface.deactivate(self)
        return
Ejemplo n.º 3
0
    def deactivate( self ):
        """ The plugin may override the method to do specific
            plugin deactivation handling.
            Note: if overriden do not forget to call the
                  base class deactivate() """

        self.ide.project.projectChanged.disconnect( self.__collectGarbage )
        self.disconnect( self.ide.editorsManager, SIGNAL( 'tabClosed' ),
                         self.__collectGarbage )

        WizardInterface.deactivate( self )
        return
Ejemplo n.º 4
0
    def deactivate(self):
        """Deactivates the plugin.

        The plugin may override the method to do specific
        plugin deactivation handling.
        Note: if overriden do not forget to call the
              base class deactivate()
        """
        self.__globalShortcut.setKey(0)

        self.__resultViewer = None
        self.ide.sideBars['bottom'].removeTab('pylint')
        self.__pylintDriver = None

        # Remove buttons
        for _, _, tabWidget in self.ide.editorsManager.getTextEditors():
            pylintAction = tabWidget.toolbar.findChild(QAction, 'pylint')
            tabWidget.toolbar.removeAction(pylintAction)

            # deleteLater() is essential. Otherwise the button is not removed
            # really from the list of children
            pylintAction.deleteLater()

            tabWidget.getEditor().modificationChanged.disconnect(
                self.__modificationChanged)

        self.ide.editorsManager.sigTextEditorTabAdded.disconnect(
            self.__textEditorTabAdded)
        self.ide.editorsManager.sigFileTypeChanged.disconnect(
            self.__fileTypeChanged)

        # Remove main menu items
        self.__mainRunAction.deleteLater()
        self.__mainRunAction = None
        self.__mainGenerateAction.deleteLater()
        self.__mainGenerateAction = None
        self.__mainMenu.deleteLater()
        self.__mainMenu = None
        self.__mainMenuSeparator.deleteLater()
        self.__mainMenuSeparator = None

        WizardInterface.deactivate(self)