Skip to content

Commit

Permalink
when we build without the dbus module, turn off more options and avoi…
Browse files Browse the repository at this point in the history
…d logging too many warnings

git-svn-id: https://xpra.org/svn/Xpra/trunk@13500 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 29, 2016
1 parent 2ed68ce commit e45171b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
8 changes: 6 additions & 2 deletions src/setup.py
Expand Up @@ -935,7 +935,10 @@ def bstr(b):
print("could not probe for pdf/postscript printers: %s" % e)
def pretty_cmd(cmd):
return " ".join(cmd)
SUBS = {'xvfb_command' : pretty_cmd(xvfb_command),
#no python-avahi on RH / CentOS, need dbus module on *nix:
mdns = OSX or WIN32 or (not is_RH() and dbus_ENABLED)
SUBS = {
'xvfb_command' : pretty_cmd(xvfb_command),
'ssh_command' : DEFAULT_SSH_COMMAND,
'key_shortcuts' : "".join(("key-shortcut = %s\n" % x) for x in get_default_key_shortcuts()),
'remote_logging' : "both",
Expand All @@ -947,7 +950,8 @@ def pretty_cmd(cmd):
'bind' : bind,
'socket_dirs' : "".join(("socket-dirs = %s\n" % x) for x in socket_dirs),
'log_dir' : get_default_log_dir(),
'mdns' : not is_RH(), #no python-avahi on RH / CentOS
'mdns' : bstr(mdns),
'notifications' : bstr(OSX or WIN32 or dbus_ENABLED),
'dbus_proxy' : bstr(not OSX and not WIN32 and dbus_ENABLED),
'pulseaudio' : bstr(not OSX and not WIN32),
'pdf_printer' : pdf,
Expand Down
20 changes: 13 additions & 7 deletions src/xpra/x11/gtk2/models/base.py
Expand Up @@ -24,13 +24,19 @@
MENU_FORWARDING = os.environ.get("XPRA_MENU_FORWARDING", "1")=="1"
if MENU_FORWARDING:
try:
from xpra.dbus.helper import DBusHelper
dbus_helper = DBusHelper()
from xpra.dbus.gtk_menuactions import query_actions, query_menu, ACTIONS, MENUS
except Exception as e:
log.warn("Warning: menu forwarding is disabled:")
log.warn(" cannot load dbus helper: %s", e)
MENU_FORWARDING = False
from xpra import dbus
assert dbus
except ImportError as e:
log("this build does not include the dbus module, no menu forwarding")
else:
try:
from xpra.dbus.helper import DBusHelper
dbus_helper = DBusHelper()
from xpra.dbus.gtk_menuactions import query_actions, query_menu, ACTIONS, MENUS
except Exception as e:
log.warn("Warning: menu forwarding is disabled:")
log.warn(" cannot load dbus helper: %s", e)
MENU_FORWARDING = False


X11Window = X11WindowBindings()
Expand Down

0 comments on commit e45171b

Please sign in to comment.