Skip to content

Commit

Permalink
if we don't have an mdns listener to use, fail with a helpful error m…
Browse files Browse the repository at this point in the history
…essage (an alert dialog on win32)

git-svn-id: https://xpra.org/svn/Xpra/trunk@15726 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 27, 2017
1 parent 8717e38 commit d923e4f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/xpra/client/gtk_base/mdns_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from xpra.child_reaper import getChildReaper
from xpra.exit_codes import EXIT_STR
from xpra.gtk_common.gtk_util import gtk_main, add_close_accel, pixbuf_new_from_file, TableBuilder, scaled_image, color_parse, imagebutton, STATE_NORMAL
from xpra.net.mdns import XPRA_MDNS_TYPE, get_listener_class
from xpra.os_util import WIN32
from xpra.util import envbool
from xpra.log import Logger
Expand Down Expand Up @@ -72,7 +73,6 @@ def __init__(self):
self.records = []
self.populate_table()
#self.set_size_request(0, 200)
from xpra.net.mdns import XPRA_MDNS_TYPE, get_listener_class
listener = get_listener_class()
self.listener = listener(XPRA_MDNS_TYPE, mdns_found=None, mdns_add=self.mdns_add, mdns_remove=self.mdns_remove)
log("%s%s=%s", listener, (XPRA_MDNS_TYPE, None, self.mdns_add, self.mdns_remove), self.listener)
Expand Down Expand Up @@ -240,10 +240,13 @@ def get_pixbuf(self, icon_name):


def main():
from xpra.platform import program_context
from xpra.platform import program_context, command_error
from xpra.log import enable_color
with program_context("Xpra-Browser", "Xpra Session Browser"):
enable_color()
if not get_listener_class() or True:
command_error("no mDNS support in this build")
return 1
return do_main()

def do_main():
Expand Down

0 comments on commit d923e4f

Please sign in to comment.