def deactivate_components_ui(self):
        """
        Deactivates user selected Components.

        :return: Method success.
        :rtype: bool

        :note: May require user interaction.
        """

        selected_components = self.get_selected_components()

        self.__engine.start_processing("Deactivating Components ...", len(selected_components))
        deactivation_failed_components = []
        for component in selected_components:
            if component.interface.activated:
                if component.interface.deactivatable:
                    success = self.deactivate_component(component.name) or False
                    if not success:
                        deactivation_failed_components.append(component)
                else:
                    self.__engine.notifications_manager.warnify(
                        "{0} | '{1}' Component cannot be deactivated!".format(self.__class__.__name__, component.name))
            else:
                self.__engine.notifications_manager.warnify(
                    "{0} | '{1}' Component is already deactivated!".format(self.__class__.__name__, component.name))
            self.__engine.step_processing()
        self.__engine.stop_processing()

        self.__store_deactivated_components()

        if not deactivation_failed_components:
            return True
        else:
            raise manager.exceptions.ComponentDeactivationError(
                "{0} | Exception(s) raised while deactivating '{1}' Component(s)!".format(self.__class__.__name__,
                                                                                          ", ".join((
                                                                                          deactivation_failed_component.name
                                                                                          for
                                                                                          deactivation_failed_component
                                                                                          in
                                                                                          deactivation_failed_components))))
def deactivate_components_ui ( self ) : selected_components = self . get_selected_components ( ) self . __engine . start_processing ( "Deactivating Components ..." , len ( selected_components ) ) deactivation_failed_components = [ ] for component in selected_components : if component . interface . activated : if component . interface . deactivatable : success = self . deactivate_component ( component . name ) or False if not success : deactivation_failed_components . append ( component ) else : self . __engine . notifications_manager . warnify ( "{0} | '{1}' Component cannot be deactivated!" . format ( self . __class__ . __name__ , component . name ) ) else : self . __engine . notifications_manager . warnify ( "{0} | '{1}' Component is already deactivated!" . format ( self . __class__ . __name__ , component . name ) ) self . __engine . step_processing ( ) self . __engine . stop_processing ( ) self . __store_deactivated_components ( ) if not deactivation_failed_components : return True else : raise manager . exceptions . ComponentDeactivationError ( "{0} | Exception(s) raised while deactivating '{1}' Component(s)!" . format ( self . __class__ . __name__ , ", " . join ( ( deactivation_failed_component . name for deactivation_failed_component in deactivation_failed_components ) ) ) )
Deactivates user selected Components.

        :return: Method success.
        :rtype: bool

        :note: May require user interaction.