diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-04-15 15:33:07 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-04-15 15:33:07 +0100 |
commit | 07c8fb7f7add9248492672b00f9078e55cf28292 (patch) | |
tree | 919619f7cbccee9d1ffb2ee4a5ad54a8e9acc758 | |
parent | 679fb17bad17d85c950d258b713050a8e293ccd4 (diff) | |
download | python-ttystatus-07c8fb7f7add9248492672b00f9078e55cf28292.tar.gz |
Actually update widgets when values change
Also, don't update them when rendering.
-rw-r--r-- | ttystatus/status.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ttystatus/status.py b/ttystatus/status.py index ca1f873..772273b 100644 --- a/ttystatus/status.py +++ b/ttystatus/status.py @@ -69,13 +69,13 @@ class TerminalStatus(object): def __setitem__(self, key, value): '''Set value for key.''' self._values[key] = value + for w in self._widgets: + w.update(self) if self._m.time_to_write(): self._format() def _format(self): '''Format and output all widgets.''' - for w in self._widgets: - w.update(self) self._m.write(''.join(str(w) for w in self._widgets)) def increase(self, key, delta): |