[core/output] Add id of widget and module to output
In the process of that, fix a bug in how the parent class constructors were invoked.
This commit is contained in:
parent
4d34fa9261
commit
fca364554e
4 changed files with 8 additions and 6 deletions
|
@ -38,7 +38,9 @@ class i3(object):
|
|||
for module in self._modules:
|
||||
for widget in module.widgets():
|
||||
status.append({
|
||||
'full_text': widget.full_text()
|
||||
'full_text': widget.full_text(),
|
||||
'instance': widget.id(),
|
||||
'name': module.id(),
|
||||
})
|
||||
return {
|
||||
'data': status,
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import core.input
|
||||
import util.store
|
||||
|
||||
class Widget(util.store.Store):
|
||||
class Widget(util.store.Store, core.input.Object):
|
||||
def __init__(self, full_text):
|
||||
super(Widget, self).__init__()
|
||||
self._full_text = full_text
|
||||
|
||||
def full_text(self, value=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue