2.4.2

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-18 15:48:56 +02:00
parent 926d4d045d
commit 46bc455b62
2 changed files with 7 additions and 7 deletions

View File

@ -151,7 +151,6 @@ class BTNap:
return None
def is_paired(self):
"""
Check if already connected
@ -579,7 +578,8 @@ class BTTether(plugins.Plugin):
def on_ui_setup(self, ui):
with ui._lock:
ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', position=(ui.width() / 2 - 15, 0),
ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-',
position=(ui.width() / 3 - 15, 0),
label_font=fonts.Bold, text_font=fonts.Medium))
def on_ui_update(self, ui):

View File

@ -31,8 +31,8 @@ class InternetConnectionPlugin(plugins.Plugin):
with ui._lock:
# add a LabeledValue element to the UI with the given label and value
# the position and font can also be specified
ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='', value='',
position=(0, 30), label_font=fonts.Small,
ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-',
position=(0, 30), label_font=fonts.Bold,
text_font=fonts.Small))
def on_ui_update(self, ui):
@ -44,10 +44,10 @@ class InternetConnectionPlugin(plugins.Plugin):
# Connect to the host - tells us if the host is actually reachable
s = socket.create_connection((host, 80), 2)
s.close()
ui.set('connection_status', 'connected')
ui.set('connection_status', 'C')
except:
# if the command failed, it means there is no active Internet connection
ui.set('connection_status', 'disconnected')
ui.set('connection_status', 'D')
def on_unload(self, ui):
with ui._lock: