diff --git a/core/module.py b/core/module.py index 41f1866..e45d3f1 100644 --- a/core/module.py +++ b/core/module.py @@ -3,6 +3,7 @@ import logging import core.input import core.widget +import core.decorators log = logging.getLogger(__name__) @@ -47,7 +48,10 @@ class Error(Module): self._module = module self._error = error - def full_text(self): + self.widgets()[0].set('theme.width', 15) + + @core.decorators.scrollable + def full_text(self, widget): return '{}: {}'.format(self._module, self._error) # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 diff --git a/core/widget.py b/core/widget.py index 650fd4c..cd1d8bf 100644 --- a/core/widget.py +++ b/core/widget.py @@ -11,7 +11,7 @@ class Widget(util.store.Store, core.input.Object): self._full_text = value else: if callable(self._full_text): - return self._full_text() + return self._full_text(self) return self._full_text # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 diff --git a/modules/__pulseaudio.py b/modules/__pulseaudio.py index c8e058f..56d732e 100644 --- a/modules/__pulseaudio.py +++ b/modules/__pulseaudio.py @@ -113,7 +113,7 @@ class Module(core.module.Module): logging.error('no pulseaudio device found') return 'n/a' - def volume(self): + def volume(self, widget): if self._failed == True: return 'n/a' if int(self._mono) > 0: diff --git a/modules/datetime.py b/modules/datetime.py index 744498a..8d03a9c 100644 --- a/modules/datetime.py +++ b/modules/datetime.py @@ -33,7 +33,7 @@ class Module(core.module.Module): def default_format(self): return '%x %X' - def full_text(self): + def full_text(self, widget): enc = locale.getpreferredencoding() retval = datetime.datetime.now().strftime(self._fmt) if hasattr(retval, 'decode'):