[output] Allow modules to pass back a single widget
Since "single widget" is the 99% use-case, make it easier for a module to return a single widget.
This commit is contained in:
parent
2cfb0997a0
commit
286aff2aa0
5 changed files with 9 additions and 14 deletions
|
@ -42,7 +42,7 @@ class Output(bumblebee.output.Output):
|
|||
def start(self):
|
||||
print json.dumps({ "version": 1, "click_events": True }) + "["
|
||||
|
||||
def draw(self, widgets, theme):
|
||||
def _draw(self, widgets, theme):
|
||||
for widget in widgets:
|
||||
if theme.separator(widget):
|
||||
self._data.append({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue