Merge pull request #631 from zerorust/fix_network_traffic

Fix network_traffic mobule on development
This commit is contained in:
tobi-wan-kenobi 2020-05-17 14:15:00 +02:00 committed by GitHub
commit 172781d2c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,18 +22,19 @@ class Module(core.module.Module):
def __init__(self, config, theme): def __init__(self, config, theme):
widgets = [ widgets = [
core.widget.Widget( core.widget.Widget(
module=self,
name="{0}.rx".format(WIDGET_NAME), name="{0}.rx".format(WIDGET_NAME),
full_text=self.download_rate, full_text=self.download_rate,
), ),
core.widget.Widget( core.widget.Widget(
module=self,
name="{0}.tx".format(WIDGET_NAME), name="{0}.tx".format(WIDGET_NAME),
full_text=self.upload_rate, full_text=self.upload_rate,
), ),
] ]
super().__init__(config, theme, widgets) 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()[0].set("theme.minwidth", "0000000KiB/s")
self.widgets()[1].set("theme.minwidth", "0000000KiB/s") self.widgets()[1].set("theme.minwidth", "0000000KiB/s")