Add plugins page

This commit is contained in:
dadav
2019-11-27 18:31:41 +01:00
parent 19775b7d27
commit cc5c46906f
7 changed files with 118 additions and 13 deletions

View File

@ -466,7 +466,11 @@ class BTTether(plugins.Plugin):
logging.info("BT-TETHER: Successfully loaded ...")
self.ready = True
def on_unload(self):
self.ui.remove_element('bluetooth')
def on_ui_setup(self, ui):
self.ui = ui
ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', position=(ui.width() / 2 - 15, 0),
label_font=fonts.Bold, text_font=fonts.Medium))

View File

@ -25,6 +25,10 @@ class Example(plugins.Plugin):
def on_loaded(self):
logging.warning("WARNING: this plugin should be disabled! options = " % self.options)
# called before the plugin is unloaded
def on_unload(self):
pass
# called hen there's internet connectivity
def on_internet_available(self, agent):
pass