change to vban example config

comment out vban info in vban example config.

disables menu if all configuration options are commented out (or file not present)
This commit is contained in:
onyx-and-iris 2022-04-19 18:46:30 +01:00
parent 6e7d84a9da
commit 041c350737
2 changed files with 13 additions and 12 deletions

View File

@ -1,12 +1,13 @@
# example connections
[connection-1]
kind = 'banana'
ip = '<ip address 1>'
streamname = 'Command1'
port = 6990
### example connections
### set the ip then uncomment
# [connection-1]
# kind = 'banana'
# ip = '<ip address 1>'
# streamname = 'Command1'
# port = 6990
[connection-2]
kind = 'potato'
ip = '<ip address 2>'
streamname = 'Command1'
port = 6990
# [connection-2]
# kind = 'potato'
# ip = '<ip address 2>'
# streamname = 'Command1'
# port = 6990

View File

@ -89,7 +89,7 @@ class Menus(tk.Menu):
# vban connect menu
self.menu_vban = tk.Menu(self.menubar, tearoff=0)
self.menubar.add_cascade(menu=self.menu_vban, label="VBAN Connect")
if self.configuration_vban is not None:
if self.configuration_vban:
for i, _ in enumerate(self.configuration_vban):
setattr(self, f"menu_vban_{i+1}", tk.Menu(self.menu_vban, tearoff=0))
target_menu = getattr(self, f"menu_vban_{i+1}")