[core] Add ability to "hide" a module with all its widgets
* A module can override the method "hidden" to specify when all it's widgets should be hidden. * Implement hidden for cmus and spotify * Fix problem that cmus widgets were not displayed correctly fixes #157
This commit is contained in:
parent
8376e406e5
commit
9f69cc6ae9
4 changed files with 15 additions and 2 deletions
|
@ -56,6 +56,9 @@ class Module(object):
|
|||
"""Return the widgets to draw for this module"""
|
||||
return self._widgets
|
||||
|
||||
def hidden(self):
|
||||
return False
|
||||
|
||||
def widget(self, name):
|
||||
for widget in self._widgets:
|
||||
if widget.name == name:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue