How to use the toast.ToastMachine.setEnabled function in toast

To help you get started, we’ve selected a few toast examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github illuminatedwax / pesterchum / toast.py View on Github external
def setEnabled(self, on):
        oldon = self.on
        ToastMachine.setEnabled(self, on)
        if oldon != self.on:
            self.parent.config.set('notify', self.on)
            if self.on:
                self.timer.start()
            else:
                self.timer.stop()