From 041c350737976f0c6d94bbd7da1ec88b24aa5dec Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Tue, 19 Apr 2022 18:46:30 +0100 Subject: [PATCH] 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) --- configs/vban.toml | 23 ++++++++++++----------- vmcompact/menu.py | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/configs/vban.toml b/configs/vban.toml index 231acf1..9e8ec91 100644 --- a/configs/vban.toml +++ b/configs/vban.toml @@ -1,12 +1,13 @@ -# example connections -[connection-1] -kind = 'banana' -ip = '' -streamname = 'Command1' -port = 6990 +### example connections +### set the ip then uncomment +# [connection-1] +# kind = 'banana' +# ip = '' +# streamname = 'Command1' +# port = 6990 -[connection-2] -kind = 'potato' -ip = '' -streamname = 'Command1' -port = 6990 +# [connection-2] +# kind = 'potato' +# ip = '' +# streamname = 'Command1' +# port = 6990 diff --git a/vmcompact/menu.py b/vmcompact/menu.py index 97f4642..56a7bc9 100644 --- a/vmcompact/menu.py +++ b/vmcompact/menu.py @@ -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}")