moving the module setter to after module init
This commit is contained in:
parent
92577e7d26
commit
f2d6f2f319
1 changed files with 3 additions and 3 deletions
|
@ -17,23 +17,23 @@ import util.format
|
|||
|
||||
WIDGET_NAME = "network_traffic"
|
||||
|
||||
|
||||
class Module(core.module.Module):
|
||||
def __init__(self, config, theme):
|
||||
widgets = [
|
||||
core.widget.Widget(
|
||||
module=self,
|
||||
name="{0}.rx".format(WIDGET_NAME),
|
||||
full_text=self.download_rate,
|
||||
),
|
||||
core.widget.Widget(
|
||||
module=self,
|
||||
name="{0}.tx".format(WIDGET_NAME),
|
||||
full_text=self.upload_rate,
|
||||
),
|
||||
]
|
||||
super().__init__(config, theme, widgets)
|
||||
|
||||
self.widgets()[0].module = self
|
||||
self.widgets()[1].module = self
|
||||
|
||||
self.widgets()[0].set("theme.minwidth", "0000000KiB/s")
|
||||
self.widgets()[1].set("theme.minwidth", "0000000KiB/s")
|
||||
|
||||
|
|
Loading…
Reference in a new issue