xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #2114: mingw.patch

File mingw.patch, 2.5 KB (added by Nathan Hallquist, 2 years ago)
  • xpra/net/ssh.py

     
    9898        return -1, None
    9999
    100100def dialog_pass(title="Password Input", prompt="enter password", icon=""):
    101     cmd = get_xpra_command()+["_pass", nonl(title), nonl(prompt), icon]
     101    cmd = get_xpra_command() +["_pass", nonl(title), nonl(prompt), icon]
    102102    return exec_dialog_subprocess(cmd)
    103103
    104104def dialog_confirm(title, prompt, qinfo="", icon="", buttons=[("OK", 1)]):
    105     cmd = get_xpra_command()+["_dialog", nonl(title), nonl(prompt), nonl("\\n".join(qinfo)), icon]
     105    cmd = get_xpra_command() +["_dialog", nonl(title), nonl(prompt), nonl("\\n".join(qinfo)), icon]
    106106    for label, code in buttons:
    107107        cmd.append(nonl(label))
    108108        cmd.append(str(code))
     
    114114    from xpra.platform.paths import get_icon_filename
    115115    from xpra.os_util import use_tty
    116116    if not use_tty():
    117         icon = get_icon_filename("authentication", "png")
     117        icon = get_icon_filename("authentication", "png") or ""
    118118        prompt = "Are you sure you want to continue connecting?"
    119119        code, out = dialog_confirm("Confirm Key", prompt, info, icon, buttons=[("yes", 200), ("NO", 201)])
    120120        log.debug("dialog output: '%s', return code=%s", nonl(out), code)
     
    132132    from xpra.platform.paths import get_icon_filename
    133133    from xpra.os_util import use_tty
    134134    if not use_tty():
    135         icon = get_icon_filename("authentication", "png")
     135        icon = get_icon_filename("authentication", "png") or ""
    136136        code, out = dialog_pass("Password Input", prompt, icon)
    137137        log.debug("pass dialog output return code=%s", code)
    138138        if code!=0:
  • xpra/platform/paths.py

     
    242242    return default_do_get_xpra_command()
    243243def default_do_get_xpra_command():
    244244    #try to use the same "xpra" executable that launched this server:
    245     if sys.argv and sys.argv[0].lower().endswith("/xpra"):
    246         return [sys.argv[0]]
    247     return ["xpra"]
     245    if sys.argv:
     246        # popen fails on text fail in windows, so prepend "python"
     247        if sys.argv[0].lower().endswith("/xpra"):
     248            return [sys.executable, sys.argv[0]]
     249        # windows
     250        elif sys.argv[0].lower().endswith(".exe"):
     251            return [sys.argv[0]]
     252    return [sys.executable, "xpra"]
    248253
    249254
    250255def get_nodock_command():