Skip to content

Commit

Permalink
#4064 add more prominent link to 'configure'
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 23, 2024
1 parent 4b8baa5 commit fd3e265
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions xpra/gtk/dialogs/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=()):
Expand Down Expand Up @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit fd3e265

Please sign in to comment.