From fd3e265de4543ca70c2f89bdfc46547ceda9adbb Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 23 May 2024 19:39:38 +0700 Subject: [PATCH] #4064 add more prominent link to 'configure' --- xpra/gtk/dialogs/gui.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xpra/gtk/dialogs/gui.py b/xpra/gtk/dialogs/gui.py index 0c5d5164a0..11a485bc04 100644 --- a/xpra/gtk/dialogs/gui.py +++ b/xpra/gtk/dialogs/gui.py @@ -46,6 +46,14 @@ def has_shadow() -> bool: return False +def has_configure() -> bool: + try: + from xpra.gtk import configure + return bool(configure) + except ImportError: + return False + + class GUI(BaseGUIWindow): def __init__(self, argv=()): @@ -78,6 +86,8 @@ def shadow_tooltip() -> str: )) self.ib("Shadow", "server-connected.png", shadow_tooltip(), self.shadow, sensitive=has_shadow()) + self.ib("Configure", "ticked.png", "", self.configure, sensitive=has_configure()) + def start_tooltip() -> str: if not has_client(): return "the client is not installed" @@ -100,6 +110,9 @@ def get_xpra_command(self, *args) -> list[str]: argv.pop(argv.index("gui")) return super().get_xpra_command(*args) + argv + def configure(self, button) -> None: + self.button_command(button, "configure") + def shadow(self, button) -> None: cmd_args = ["shadow", "--bind-tcp=0.0.0.0:14500,auth=sys,ssl-cert=auto"] if (WIN32 or OSX) else ["shadow"] self.button_command(button, *cmd_args)