From e359c75603f1b8020e6feebe95ac688689d594c5 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Mon, 18 May 2020 12:59:47 +0200 Subject: [PATCH] [core/widget] remove module from widget initializer --- bumblebee_status/core/module.py | 3 ++- bumblebee_status/core/widget.py | 4 ++-- docs/other/NOTES.md | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bumblebee_status/core/module.py b/bumblebee_status/core/module.py index ba06848..dfc229e 100644 --- a/bumblebee_status/core/module.py +++ b/bumblebee_status/core/module.py @@ -154,8 +154,9 @@ class Module(core.input.Object): """ def add_widget(self, full_text="", name=None): - widget = core.widget.Widget(full_text=full_text, name=name, module=self) + widget = core.widget.Widget(full_text=full_text, name=name) self.widgets().append(widget) + widget.module = self return widget """Convenience method to retrieve a named widget diff --git a/bumblebee_status/core/widget.py b/bumblebee_status/core/widget.py index ea6e6be..eae6f74 100644 --- a/bumblebee_status/core/widget.py +++ b/bumblebee_status/core/widget.py @@ -6,10 +6,10 @@ import util.format class Widget(util.store.Store, core.input.Object): - def __init__(self, full_text="", name=None, module=None): + def __init__(self, full_text="", name=None): super(Widget, self).__init__() self.__full_text = full_text - self.module = module + self.module = None self.name = name @property diff --git a/docs/other/NOTES.md b/docs/other/NOTES.md index 4ff62c4..d6dd4d8 100644 --- a/docs/other/NOTES.md +++ b/docs/other/NOTES.md @@ -10,6 +10,7 @@ ## Improvements - app launcher (list of apps, themeable) +- github pages? ## TODO - themes: use colors to improve theme readability