[core/widget] Make module an attribute

Instead of having an artifical getter/setter method, just make module a
plain attribute.
This commit is contained in:
tobi-wan-kenobi 2020-04-30 12:46:57 +02:00
parent 9cd9ff626d
commit b27956071f
8 changed files with 12 additions and 19 deletions

View file

@ -62,7 +62,7 @@ def get_redshift_value(module):
widget.set('state', 'transition')
match = re.search(r'(\d+)\.\d+% ([a-z]+)', line)
widget.set('transition', '({}% {})'.format(match.group(1), match.group(2)))
core.event.trigger('update', [ widget.module().id ], redraw_only=True)
core.event.trigger('update', [ widget.module.id ], redraw_only=True)
class Module(core.module.Module):
@core.decorators.every(seconds=10)