[core] Add preliminary block abstraction to output
The idea is to simplify the way the output module currently works by: - introducing an abstraction that represents blocks; these abstractions contain all data - uninterpreted - required to draw a block - separately from that, whenever the block is serialized into JSON, do the interpretation (pango vs. non-pango, etc.) This - theoretically - should simplify code by creating two separate concerns: collecting the data and actually interpreting it.
This commit is contained in:
parent
b5c2ca6ccf
commit
f5052473fb
2 changed files with 53 additions and 87 deletions
|
@ -88,6 +88,9 @@ class Theme(object):
|
|||
self.__previous = dict(self.__current)
|
||||
self.__current.clear()
|
||||
|
||||
def get(self, key, widget=None, default=None):
|
||||
return self.__get(widget, key, default)
|
||||
|
||||
def __get(self, widget, key, default=None):
|
||||
if not widget:
|
||||
widget = core.widget.Widget('')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue