Improved settings and connectivity screens performance. Added keyboard shortcuts to guide.

This commit is contained in:
Mark Qvist 2022-10-06 17:12:42 +02:00
parent 25836decdb
commit a487af77e0
1 changed files with 252 additions and 230 deletions

View File

@ -93,6 +93,8 @@ class SidebandApp(MDApp):
self.conversations_view = None
self.sync_dialog = None
self.settings_ready = False
self.connectivity_ready = False
Window.softinput_mode = "below_target"
self.icon = self.sideband.asset_dir+"/icon.png"
@ -332,6 +334,10 @@ class SidebandApp(MDApp):
self.message_send_action()
if len(modifiers) > 0 and modifiers[0] == 'ctrl' and (text == "l"):
self.announces_action(self)
if len(modifiers) > 0 and modifiers[0] == 'ctrl' and (text == "r"):
self.conversations_action(self)
if len(modifiers) > 0 and modifiers[0] == 'ctrl' and (text == "g"):
self.guide_action(self)
if len(modifiers) > 0 and modifiers[0] == 'ctrl' and (text == "n"):
if self.root.ids.screen_manager.current == "conversations_screen":
if not hasattr(self, "dialog_open") or not self.dialog_open:
@ -707,6 +713,14 @@ class SidebandApp(MDApp):
def settings_action(self, sender=None):
self.root.ids.screen_manager.transition.direction = "left"
self.settings_init()
self.root.ids.screen_manager.current = "settings_screen"
self.root.ids.nav_drawer.set_state("closed")
self.sideband.setstate("app.displaying", self.root.ids.screen_manager.current)
def settings_init(self, sender=None):
if not self.settings_ready:
def save_disp_name(sender=None, event=None):
in_name = self.root.ids.settings_display_name.text
if in_name == "":
@ -790,10 +804,7 @@ class SidebandApp(MDApp):
self.root.ids.settings_lxmf_sync_limit.active = sync_limit
self.root.ids.settings_lxmf_sync_limit.bind(active=save_lxmf_sync_limit)
self.root.ids.screen_manager.current = "settings_screen"
self.root.ids.nav_drawer.set_state("closed")
self.sideband.setstate("app.displaying", self.root.ids.screen_manager.current)
self.settings_ready = True
def close_settings_action(self, sender=None):
self.open_conversations(direction="right")
@ -802,6 +813,14 @@ class SidebandApp(MDApp):
### Connectivity screen
######################################
def connectivity_action(self, sender=None):
self.connectivity_init()
self.root.ids.screen_manager.transition.direction = "left"
self.root.ids.screen_manager.current = "connectivity_screen"
self.root.ids.nav_drawer.set_state("closed")
self.sideband.setstate("app.displaying", self.root.ids.screen_manager.current)
def connectivity_init(self, sender=None):
if not self.connectivity_ready:
def con_hide_settings():
self.widget_hide(self.root.ids.connectivity_use_local)
self.widget_hide(self.root.ids.connectivity_local_groupid)
@ -949,11 +968,7 @@ class SidebandApp(MDApp):
con_hide_settings()
self.root.ids.screen_manager.transition.direction = "left"
self.root.ids.screen_manager.current = "connectivity_screen"
self.root.ids.nav_drawer.set_state("closed")
self.sideband.setstate("app.displaying", self.root.ids.screen_manager.current)
self.connectivity_ready = True
def close_connectivity_action(self, sender=None):
self.open_conversations(direction="right")
@ -1130,6 +1145,13 @@ The Propagation Nodes also distribute copies of messages between each other, suc
If you use Reticulum and LXMF on hardware that does not carry any identifiers tied to you, it is possible to establish a completely free and anonymous communication system with Reticulum and LXMF clients.
[size=18dp][b]Keyboard Shortcuts[/b][/size][size=5dp]\n \n[/size] - Ctrl+Q or Ctrl-W Shut down Sideband
- Ctrl-D or Ctrl-S Send message
- Ctrl-R Show Conversations
- Ctrl-L Show Announce Stream
- Ctrl-N New conversation
- Ctrl-G Show guide
[size=18dp][b]Sow Seeds Of Freedom[/b][/size][size=5dp]\n \n[/size]It took me more than six years to design and built the entire ecosystem of software and hardware that makes this possible. If this project is valuable to you, please go to [u][ref=link]https://unsigned.io/sideband[/ref][/u] to support the project with a donation. Every donation directly makes the entire Reticulum project possible.
Thank you very much for using Free Communications Systems.