[core] fix minimize for all modules (nic, traffic, etc.)

make it possible to toggle the display state of a widget between
"displayed" and "minimized" also for modules that re-create their
widgets during each iteration.

see #661
This commit is contained in:
Tobias Witek 2020-06-23 20:03:17 +02:00
parent 34dadadf90
commit 441e7d5041
4 changed files with 26 additions and 18 deletions

View file

@ -10,12 +10,12 @@ log = logging.getLogger(__name__)
class Widget(util.store.Store, core.input.Object):
def __init__(self, full_text="", name=None):
def __init__(self, full_text="", name=None, widget_id=None):
super(Widget, self).__init__()
self.__full_text = full_text
self.module = None
self.name = name
self.minimized = False
self.id = widget_id or self.id
@property
def module(self):