Compare commits

...

9 commits

Author SHA1 Message Date
Mark Qvist
36af5d805d Updated Linux install instructions 2025-11-03 16:29:04 +01:00
Mark Qvist
4daf4ef40a Updated Linux install instructions 2025-11-03 16:27:18 +01:00
Mark Qvist
8b191784f3 Updated Raspberry Pi install instructions 2025-11-03 16:20:39 +01:00
Mark Qvist
1bb61c1009 Added Able to credits 2025-11-03 15:06:08 +01:00
Mark Qvist
b7e24d8813 Updated build code 2025-11-03 15:05:55 +01:00
Mark Qvist
b3057dabf8 Cleanup 2025-11-03 14:31:54 +01:00
Mark Qvist
f3b0c71c7b Added Weave interface to connectivity settings 2025-11-03 14:25:41 +01:00
Mark Qvist
2fe1527ba2 Consistent pane close event handling 2025-11-03 14:09:49 +01:00
Mark Qvist
fc9e1bf86f Added call confirm dialog 2025-11-03 13:37:48 +01:00
6 changed files with 165 additions and 108 deletions

View file

@ -46,28 +46,31 @@ After the application is installed on your Android device, it is also possible t
## On Linux
On all Linux-based operating systems, Sideband is available as a `pipx`/`pip` package. This installation method **includes desktop integration**, so that Sideband will show up in your applications menu and launchers. Below are install steps for the most common recent Linux distros. For Debian 11, see the end of this section.
On all Linux-based operating systems, Sideband is available as a `pip`/`pipx` package. This installation method **includes desktop integration**, so that Sideband will show up in your applications menu and launchers. Below are install steps for the most common recent Linux distros. For Debian 11, see the end of this section.
#### Basic Installation
You will first need to install a few dependencies for voice calls, audio messaging and Codec2 support to work:
```bash
# For Debian (12+), Ubuntu (22.04+) and derivatives
sudo apt install pipx python3-pyaudio python3-dev build-essential libopusfile0 portaudio19-dev codec2 xclip xsel
# For Debian 13+, Ubuntu 24.04+ and derivatives
sudo apt install python3-pyaudio codec2 xclip xsel
# For Debian 12+, Ubuntu 22.04+ and derivatives
sudo apt install python3-pyaudio python3-dev build-essential libopusfile0 portaudio19-dev codec2 xclip xsel
# For Manjaro and derivatives
pamac install python-pipx python-pyaudio base-devel codec2 xclip xsel
pamac install python-pyaudio codec2 xclip xsel
# For Arch and derivatives
sudo pacman -Sy python-pipx python-pyaudio base-devel codec2 xclip xsel
sudo pacman -Sy python-pyaudio codec2 xclip xsel
```
Once those are installed, install the Sideband application itself:
```bash
# Finally, install Sideband using pipx:
pipx install sbapp
# Finally, install Sideband using pip:
pip install sbapp --break-system-packages
```
After installation, you can now run Sideband in a number of different ways:
@ -106,11 +109,8 @@ If you do not already have Reticulum connectivity set up on your computer or loc
You can also install Sideband in various alternative ways:
```bash
# Install Sideband via pip instead of pipx:
pip install sbapp
# Or, if pip is externally managed:
pip install sbapp --break-system-packages
# Install Sideband via pipx instead of pip:
pipx install sbapp
# Or, if you intend to run Sideband in headless
# daemon mode, you can also install it without
@ -133,34 +133,40 @@ python3 -m sbapp.main
## On Raspberry Pi
You can install Sideband on all Raspberry Pi models that support 64-bit operating systems, and can run at least Python version 3.11. Since some of Sideband's dependencies don't have pre-built packages ready for 64-bit ARM processors yet, you'll need to install a few extra packages, that will allow building these while installing.
You can install Sideband on all Raspberry Pi models that support 64-bit operating systems, and can run at least Python version 3.11.
Aditionally, the `pycodec2` package needs to be installed manually. I have provided a pre-built version, that you can download and install with a single command, or if you don't want to trust my pre-built version, you can [build and install it from source yourself](https://github.com/gregorias/pycodec2/blob/main/DEV.md).
The install instructions below assume that you are installing Sideband on 64-bit Raspberry Pi OS (based on Debian 13 "Trixie" or later). If you're running something else on your Pi, you might need to modify some commands slightly.
The install instructions below assume that you are installing Sideband on 64-bit Raspberry Pi OS (based on Debian Bookworm or later). If you're running something else on your Pi, you might need to modify some commands slightly. To install Sideband on Raspberry Pi with full support for voice calls, audio messages and Codec2, follow these steps:
To install Sideband on Raspberry Pi with full support for voice calls, audio messages and Codec2, follow these steps:
```bash
# First of all, install the required dependencies:
sudo apt install python3-pip python3-pyaudio python3-dev python3-cryptography build-essential libopusfile0 libsdl2-dev libavcodec-dev libavdevice-dev libavfilter-dev portaudio19-dev codec2 libcodec2-1.0 xclip xsel
# If you don't want to compile pycodec2 yourself,
# download the pre-compiled package provided here:
wget https://raw.githubusercontent.com/markqvist/Sideband/main/docs/utilities/pycodec2-3.0.1-cp311-cp311-linux_aarch64.whl
# And install it:
pip install ./pycodec2-3.0.1-cp311-cp311-linux_aarch64.whl --break-system-packages
# First of all, install the dependencies required
# for audio processing and voice calls.
#
# On Raspberry Pi OS "Trixie" (based on Debian 13)
# or newer, install these packages:
sudo apt install python3-pyaudio codec2 xclip xsel
# You can now install Sideband
pip install sbapp --break-system-packages
# Restart your Raspberry Pi
# Restart your Raspberry Pi to ensure the program
# is available in your PATH and application menus:
sudo reboot
# Everything is ready! You can now run Sideband
# from the terminal, or from the application menu
# from the terminal, or from the application menu:
sideband
```
If you're using an older version of Raspberry Pi OS, you will need to install these dependencies instead, before installing Sideband:
```bash
# Package dependencies for Raspberry Pi OS based
# on Debian 12 Bookworm
sudo apt install python3-pip python3-pyaudio python3-dev python3-cryptography build-essential libopusfile0 libsdl2-dev libavcodec-dev libavdevice-dev libavfilter-dev portaudio19-dev codec2 libcodec2-1.0 xclip xsel
```
If you do not already have Reticulum connectivity set up on your computer or local network, you will probably want to edit the Reticulum configuration file at `~/.reticulum/config` and [add any interfaces](https://reticulum.network/manual/interfaces.html) you need for connectivity.
## On macOS

View file

@ -10,7 +10,7 @@ source.exclude_patterns = app_storage/*,venv/*,Makefile,./Makefil*,requirements,
version.regex = __version__ = ['"](.*)['"]
version.filename = %(source.dir)s/main.py
android.numeric_version = 20251027
android.numeric_version = 20251103
requirements = kivy==2.3.0,libbz2,sqlite3,pillow==10.2.0,qrcode==7.3.1,usb4a,usbserial4a,able_recipe,libwebp,libogg,libopus,opusfile,numpy,cryptography,ffpyplayer,codec2,pycodec2,sh,pynacl,typing-extensions,mistune>=3.0.2,beautifulsoup4

View file

@ -1409,6 +1409,24 @@ class SidebandApp(MDApp):
self.root.ids.nav_scrollview.effect_cls = ScrollEffect
Clock.schedule_once(self.start_core, 0.25)
def close_handler(self):
if self.root.ids.screen_manager.current == "conversations_screen":
if self.include_conversations and not self.include_objects: self.quit_action(self)
else: self.conversations_action(direction="right")
elif self.root.ids.screen_manager.current == "hardware_rnode_screen": self.close_sub_hardware_action()
elif self.root.ids.screen_manager.current == "hardware_modem_screen": self.close_sub_hardware_action()
elif self.root.ids.screen_manager.current == "hardware_serial_screen": self.close_sub_hardware_action()
elif self.root.ids.screen_manager.current == "map_settings_screen": self.close_sub_map_action()
elif self.root.ids.screen_manager.current == "object_details_screen": self.object_details_screen.close_action()
elif self.root.ids.screen_manager.current == "sensors_screen": self.close_sub_telemetry_action()
elif self.root.ids.screen_manager.current == "icons_screen": self.close_sub_telemetry_action()
elif self.root.ids.screen_manager.current == "utilities_screen": self.close_any_action()
elif self.root.ids.screen_manager.current == "rnstatus_screen": self.utilities_screen.close_rnstatus_action()
elif self.root.ids.screen_manager.current == "logviewer_screen": self.close_sub_utilities_action()
elif self.root.ids.screen_manager.current == "advanced_screen": self.close_sub_utilities_action()
elif self.root.ids.screen_manager.current == "voice_settings_screen": self.close_sub_voice_action()
else: self.close_any_action()
def keyup_event(self, instance, keyboard, keycode):
if self.keyboard_enabled:
if self.root.ids.screen_manager.current == "messages_screen":
@ -1449,15 +1467,12 @@ class SidebandApp(MDApp):
if not self.messages_view.ids.message_text.focus:
self.messages_view.ids.message_text.write_tab = False
self.messages_view.ids.message_text.focus = True
def tab_job(delta):
self.messages_view.ids.message_text.write_tab = True
def tab_job(delta): self.messages_view.ids.message_text.write_tab = True
Clock.schedule_once(tab_job, 0.15)
elif len(modifiers) == 0 and self.rec_dialog != None and self.rec_dialog_is_open:
if text == " ":
self.msg_rec_a_rec(None)
elif keycode == 40:
self.msg_rec_a_save(None)
if text == " ": self.msg_rec_a_rec(None)
elif keycode == 40: self.msg_rec_a_save(None)
elif len(modifiers) == 0 and not self.rec_dialog_is_open and not self.messages_view.ids.message_text.focus and self.messages_view.ptt_enabled and keycode == 44:
if not self.key_ptt_down:
@ -1470,12 +1485,9 @@ class SidebandApp(MDApp):
self.attach_path = None
self.attach_type = None
self.update_message_widgets()
if text == "a":
clear_att(); self.message_attachment_action(None)
if text == "i":
clear_att(); self.message_attach_action(attach_type="defimg")
if text == "f":
clear_att(); self.message_attach_action(attach_type="file")
if text == "a": clear_att(); self.message_attachment_action(None)
if text == "i": clear_att(); self.message_attach_action(attach_type="defimg")
if text == "f": clear_att(); self.message_attach_action(attach_type="file")
if text == "v":
clear_att()
self.audio_msg_mode = LXMF.AM_OPUS_OGG
@ -1490,25 +1502,8 @@ class SidebandApp(MDApp):
if text == "q":
self.quit_action(self)
if text == "w":
if self.root.ids.screen_manager.current == "conversations_screen":
if self.include_conversations and not self.include_objects:
self.quit_action(self)
else:
self.conversations_action(direction="right")
elif self.root.ids.screen_manager.current == "map_settings_screen":
self.close_sub_map_action()
elif self.root.ids.screen_manager.current == "object_details_screen":
self.object_details_screen.close_action()
elif self.root.ids.screen_manager.current == "sensors_screen":
self.close_sub_telemetry_action()
elif self.root.ids.screen_manager.current == "icons_screen":
self.close_sub_telemetry_action()
elif self.root.ids.screen_manager.current == "utilities_screen":
self.close_sub_utilities_action()
else:
self.open_conversations(direction="right")
if text == "w": self.close_handler()
if text == "s" or text == "d":
if self.root.ids.screen_manager.current == "messages_screen":
self.message_send_action()
@ -1594,38 +1589,12 @@ class SidebandApp(MDApp):
# Handle escape/back
if key == 27:
if self.root.ids.screen_manager.current == "conversations_screen":
if not self.include_conversations and self.include_objects:
self.conversations_action(direction="right")
if not self.include_conversations and self.include_objects: self.conversations_action(direction="right")
else:
if time.time() - self.last_exit_event < 2:
self.quit_action(self)
else:
self.last_exit_event = time.time()
else:
if self.root.ids.screen_manager.current == "hardware_rnode_screen":
self.close_sub_hardware_action()
elif self.root.ids.screen_manager.current == "hardware_modem_screen":
self.close_sub_hardware_action()
elif self.root.ids.screen_manager.current == "hardware_serial_screen":
self.close_sub_hardware_action()
elif self.root.ids.screen_manager.current == "object_details_screen":
self.object_details_screen.close_action()
elif self.root.ids.screen_manager.current == "map_settings_screen":
self.close_sub_map_action()
elif self.root.ids.screen_manager.current == "sensors_screen":
self.close_sub_telemetry_action()
elif self.root.ids.screen_manager.current == "icons_screen":
self.close_sub_telemetry_action()
elif self.root.ids.screen_manager.current == "rnstatus_screen":
self.close_sub_utilities_action()
elif self.root.ids.screen_manager.current == "logviewer_screen":
self.close_sub_utilities_action()
elif self.root.ids.screen_manager.current == "voice_settings_screen":
self.close_sub_voice_action()
else:
self.open_conversations(direction="right")
if time.time() - self.last_exit_event < 2: self.quit_action(self)
else: self.last_exit_event = time.time()
else: self.close_handler()
return True
def widget_hide(self, w, hide=True):
@ -1802,8 +1771,26 @@ class SidebandApp(MDApp):
elif sender.conv_type == self.sideband.CONV_VOICE:
identity_hash = sender.sb_uid
def cb(dt): self.dial_action(identity_hash)
Clock.schedule_once(cb, 0.15)
if not self.sideband.config["confirm_calls"]:
def cb(dt): self.dial_action(identity_hash)
Clock.schedule_once(cb, 0.15)
else:
call_dialog_text = f"[b]Initiate Voice Call?[/b]\n\nDestination Identity:\n{RNS.prettyhexrep(identity_hash)}?"
if hasattr(self, "confirm_call_dialog"): self.confirm_call_dialog.text = call_dialog_text
else:
yes_button = MDRectangleFlatButton(text="Call",font_size=dp(18), theme_text_color="Custom", line_color=self.color_accept, text_color=self.color_accept)
no_button = MDRectangleFlatButton(text="Cancel",font_size=dp(18))
self.confirm_call_dialog = MDDialog(text=call_dialog_text, buttons=[ no_button, yes_button ])
def dl_no(s): self.confirm_call_dialog.dismiss()
def dl_yes(s):
self.confirm_call_dialog.dismiss()
def cb(dt): self.dial_action(self.confirm_call_dialog.dest_identity_hash)
Clock.schedule_once(cb, 0.15)
yes_button.bind(on_release=dl_yes)
no_button.bind(on_release=dl_no)
self.confirm_call_dialog.dest_identity_hash = identity_hash
self.confirm_call_dialog.open()
def open_conversation(self, context_dest, direction="left"):
self.rec_dialog_is_open = False
@ -2764,20 +2751,17 @@ class SidebandApp(MDApp):
dialog = MDDialog(
title="Connectivity Status",
text=str(self.get_connectivity_text()),
buttons=[full_button, yes_button],
# elevation=0,
)
def cs_updater(dt):
dialog.text = str(self.get_connectivity_text())
buttons=[full_button, yes_button])
def cs_updater(dt): dialog.text = str(self.get_connectivity_text())
def dl_yes(s):
dialog.dismiss()
if self.connectivity_updater != None:
self.connectivity_updater.cancel()
if self.connectivity_updater != None: self.connectivity_updater.cancel()
def cb_rns(sender):
dialog.dismiss()
if self.connectivity_updater != None:
self.connectivity_updater.cancel()
self.rnstatus_action()
if self.connectivity_updater != None: self.connectivity_updater.cancel()
self.rnstatus_action(from_conversations=True)
yes_button.bind(on_release=dl_yes)
full_button.bind(on_release=cb_rns)
@ -2789,12 +2773,11 @@ class SidebandApp(MDApp):
self.connectivity_updater = Clock.schedule_interval(cs_updater, 2.0)
else:
self.rnstatus_action()
self.rnstatus_action(from_conversations=True)
def rnstatus_action(self, sender=None):
if not self.utilities_ready:
self.utilities_init()
self.utilities_screen.rnstatus_action()
def rnstatus_action(self, sender=None, from_conversations=False):
if not self.utilities_ready: self.utilities_init()
self.utilities_screen.rnstatus_action(from_conversations=from_conversations)
def ingest_lxm_action(self, sender):
def cb(dt):
@ -3014,7 +2997,7 @@ class SidebandApp(MDApp):
str_comps = " - [b]Reticulum[/b] (Reticulum License)\n - [b]LXMF[/b] (Reticulum License)\n - [b]KivyMD[/b] (MIT License)"
str_comps += "\n - [b]Kivy[/b] (MIT License)\n - [b]Codec2[/b] (LGPL License)\n - [b]PyCodec2[/b] (BSD-3 License)"
str_comps += "\n - [b]PyDub[/b] (MIT License)\n - [b]PyOgg[/b] (Public Domain)\n - [b]FFmpeg[/b] (GPL3 License)"
str_comps += "\n - [b]PyDub[/b] (MIT License)\n - [b]PyOgg[/b] (Public Domain)\n - [b]Able[/b] (MIT License)\n - [b]FFmpeg[/b] (GPL3 License)"
str_comps += "\n - [b]GeoidHeight[/b] (LGPL License)\n - [b]Paho MQTT[/b] (EPL2 License)\n - [b]Python[/b] (PSF License)"
str_comps += "\n\nGo to [u][ref=link]https://unsigned.io/donate[/ref][/u] to support the project.\n\nThe Sideband app is Copyright © 2025 Mark Qvist / unsigned.io\n\nPermission is granted to freely share and distribute binary copies of "+self.root.ids.app_version_info.text+", so long as no payment or compensation is charged for said distribution or sharing.\n\nIf you were charged or paid anything for this copy of Sideband, please report it to [b]license@unsigned.io[/b].\n\nTHIS IS EXPERIMENTAL SOFTWARE - SIDEBAND COMES WITH ABSOLUTELY NO WARRANTY - USE AT YOUR OWN RISK AND RESPONSIBILITY"
info = "This is "+self.root.ids.app_version_info.text+", on RNS v"+RNS.__version__+" and LXMF v"+LXMF.__version__+".\n\nHumbly build using the following open components:\n\n"+str_comps
@ -3651,6 +3634,7 @@ class SidebandApp(MDApp):
self.widget_hide(self.connectivity_screen.ids.connectivity_enable_transport)
self.widget_hide(self.connectivity_screen.ids.connectivity_serial_label)
self.widget_hide(self.connectivity_screen.ids.connectivity_use_serial)
self.widget_hide(self.connectivity_screen.ids.connectivity_use_weave)
self.widget_hide(self.connectivity_screen.ids.connectivity_serial_fields)
self.widget_hide(self.connectivity_screen.ids.connectivity_share_instance)
self.widget_hide(self.connectivity_screen.ids.connectivity_shared_access)
@ -3690,6 +3674,10 @@ class SidebandApp(MDApp):
# self.widget_hide(self.connectivity_screen.ids.connectivity_serial_fields, collapse)
pass
def con_collapse_weave(collapse=True):
# self.widget_hide(self.connectivity_screen.ids.connectivity_serial_fields, collapse)
pass
def con_collapse_transport(collapse=True):
# self.widget_hide(self.connectivity_screen.ids.connectivity_transport_fields, collapse)
pass
@ -3718,6 +3706,10 @@ class SidebandApp(MDApp):
self.sideband.config["connect_serial_ifac_netname"] = self.connectivity_screen.ids.connectivity_serial_ifac_netname.text
self.sideband.config["connect_serial_ifac_passphrase"] = self.connectivity_screen.ids.connectivity_serial_ifac_passphrase.text
self.sideband.config["connect_weave"] = self.connectivity_screen.ids.connectivity_use_weave.active
self.sideband.config["connect_weave_ifac_netname"] = self.connectivity_screen.ids.connectivity_weave_ifac_netname.text
self.sideband.config["connect_weave_ifac_passphrase"] = self.connectivity_screen.ids.connectivity_weave_ifac_passphrase.text
self.sideband.config["connect_modem"] = self.connectivity_screen.ids.connectivity_use_modem.active
self.sideband.config["connect_modem_ifac_netname"] = self.connectivity_screen.ids.connectivity_modem_ifac_netname.text
self.sideband.config["connect_modem_ifac_passphrase"] = self.connectivity_screen.ids.connectivity_modem_ifac_passphrase.text
@ -3735,6 +3727,7 @@ class SidebandApp(MDApp):
con_collapse_rnode(collapse=not self.connectivity_screen.ids.connectivity_use_rnode.active)
con_collapse_modem(collapse=not self.connectivity_screen.ids.connectivity_use_modem.active)
con_collapse_serial(collapse=not self.connectivity_screen.ids.connectivity_use_serial.active)
con_collapse_weave(collapse=not self.connectivity_screen.ids.connectivity_use_weave.active)
con_collapse_transport(collapse=not self.sideband.config["connect_transport"])
self.sideband.save_configuration()
@ -3760,13 +3753,16 @@ class SidebandApp(MDApp):
self.connectivity_screen.ids.connectivity_use_rnode.unbind(active=serial_connectivity_save)
self.connectivity_screen.ids.connectivity_use_modem.unbind(active=serial_connectivity_save)
self.connectivity_screen.ids.connectivity_use_serial.unbind(active=serial_connectivity_save)
self.connectivity_screen.ids.connectivity_use_weave.unbind(active=serial_connectivity_save)
self.connectivity_screen.ids.connectivity_use_rnode.active = False
self.connectivity_screen.ids.connectivity_use_modem.active = False
self.connectivity_screen.ids.connectivity_use_serial.active = False
self.connectivity_screen.ids.connectivity_use_weave.active = False
sender.active = True
self.connectivity_screen.ids.connectivity_use_rnode.bind(active=serial_connectivity_save)
self.connectivity_screen.ids.connectivity_use_modem.bind(active=serial_connectivity_save)
self.connectivity_screen.ids.connectivity_use_serial.bind(active=serial_connectivity_save)
self.connectivity_screen.ids.connectivity_use_weave.bind(active=serial_connectivity_save)
save_connectivity(sender, event)
def focus_save(sender=None, event=None):
@ -3851,6 +3847,11 @@ class SidebandApp(MDApp):
self.connectivity_screen.ids.connectivity_serial_ifac_netname.text = self.sideband.config["connect_serial_ifac_netname"]
self.connectivity_screen.ids.connectivity_serial_ifac_passphrase.text = self.sideband.config["connect_serial_ifac_passphrase"]
self.connectivity_screen.ids.connectivity_use_weave.active = self.sideband.config["connect_weave"]
con_collapse_weave(collapse=not self.connectivity_screen.ids.connectivity_use_weave.active)
self.connectivity_screen.ids.connectivity_weave_ifac_netname.text = self.sideband.config["connect_weave_ifac_netname"]
self.connectivity_screen.ids.connectivity_weave_ifac_passphrase.text = self.sideband.config["connect_weave_ifac_passphrase"]
self.connectivity_screen.ids.connectivity_enable_transport.active = self.sideband.config["connect_transport"]
con_collapse_transport(collapse=not self.sideband.config["connect_transport"])
self.connectivity_screen.ids.connectivity_enable_transport.bind(active=save_connectivity)
@ -3893,6 +3894,10 @@ class SidebandApp(MDApp):
self.connectivity_screen.ids.connectivity_serial_ifac_netname.bind(focus=focus_save)
self.connectivity_screen.ids.connectivity_serial_ifac_passphrase.bind(focus=focus_save)
self.connectivity_screen.ids.connectivity_use_weave.bind(active=serial_connectivity_save)
self.connectivity_screen.ids.connectivity_weave_ifac_netname.bind(focus=focus_save)
self.connectivity_screen.ids.connectivity_weave_ifac_passphrase.bind(focus=focus_save)
self.connectivity_screen.ids.connectivity_local_ifmode.bind(focus=ifmode_validate)
self.connectivity_screen.ids.connectivity_tcp_ifmode.bind(focus=ifmode_validate)
self.connectivity_screen.ids.connectivity_i2p_ifmode.bind(focus=ifmode_validate)

View file

@ -475,6 +475,7 @@ class SidebandCore():
self.config["lxm_limit_1mb"] = True
self.config["trusted_markup_only"] = False
self.config["compose_in_markdown"] = False
self.config["confirm_calls"] = True
# Connectivity
self.config["connect_transport"] = False
@ -652,6 +653,8 @@ class SidebandCore():
self.config["trusted_markup_only"] = False
if not "compose_in_markdown" in self.config:
self.config["compose_in_markdown"] = False
if not "confirm_calls" in self.config:
self.config["confirm_calls"] = True
if not "input_language" in self.config:
self.config["input_language"] = None

View file

@ -626,6 +626,44 @@ MDScreen:
font_size: dp(24)
MDBoxLayout:
orientation: "horizontal"
padding: [0,0,dp(24),0]
size_hint_y: None
height: dp(24)
MDLabel:
id: connectivity_weave_label
text: "Connect via Weave"
font_style: "H6"
disabled: False
MDSwitch:
id: connectivity_use_weave
active: False
pos_hint: {"center_y": 0.3}
disabled: False
MDBoxLayout:
id: connectivity_weave_fields
orientation: "vertical"
size_hint_y: None
height: self.minimum_height
padding: [0, 0, 0, dp(32)]
MDTextField:
id: connectivity_weave_ifac_netname
hint_text: "Optional IFAC network name"
text: ""
font_size: dp(24)
MDTextField:
id: connectivity_weave_ifac_passphrase
hint_text: "Optional IFAC passphrase"
text: ""
font_size: dp(24)
# MDBoxLayout:
# orientation: "horizontal"
# padding: [0,0,dp(24),0]

View file

@ -81,13 +81,14 @@ class Utilities():
### rnstatus screen
######################################
def rnstatus_action(self, sender=None):
def rnstatus_action(self, sender=None, from_conversations=False):
if not self.app.root.ids.screen_manager.has_screen("rnstatus_screen"):
self.rnstatus_screen = Builder.load_string(layout_rnstatus_screen)
self.rnstatus_screen.app = self.app
self.rnstatus_screen.delegate = self
self.app.root.ids.screen_manager.add_widget(self.rnstatus_screen)
self.rnstatus_screen.from_conversations = from_conversations
self.app.root.ids.screen_manager.transition.direction = "left"
self.app.root.ids.screen_manager.current = "rnstatus_screen"
self.app.sideband.setstate("app.displaying", self.app.root.ids.screen_manager.current)
@ -97,6 +98,10 @@ class Utilities():
def update_rnstatus(self, sender=None):
threading.Thread(target=self.update_rnstatus_job, daemon=True).start()
def close_rnstatus_action(self, sender=None):
if not self.rnstatus_screen.from_conversations: self.app.close_sub_utilities_action()
else: self.app.close_any_action()
def update_rnstatus_job(self, sender=None):
if self.rnstatus_instance == None:
import RNS.Utilities.rnstatus as rnstatus
@ -319,7 +324,7 @@ MDScreen:
right_action_items:
[
# ['refresh', lambda x: root.delegate.update_rnstatus()],
['close', lambda x: root.app.close_sub_utilities_action(self)],
['close', lambda x: root.delegate.close_rnstatus_action(self)],
]
MDScrollView: