Skip to content

Commit

Permalink
move dbus bits to their own module, not in x11
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@9773 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 30, 2015
1 parent 4031b87 commit 721c576
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/xpra/dbus/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file is part of Xpra.
# Copyright (C) 2015 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/xpra/x11/dbus_helper.py → src/xpra/dbus/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class DBusHelper(object):

def __init__(self):
from xpra.x11.dbus_common import init_session_bus
from xpra.dbus.common import init_session_bus
self.bus = init_session_bus()

def call_function(self, bus_name, path, interface, function, args, ok_cb, err_cb):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ def release(self):
log.error("failed to release dbus notification forwarder: %s", e)

def __str__(self):
return "DBUSNotificationsForwarder(%s)" % BUS_NAME
return "DBUS-NotificationsForwarder(%s)" % BUS_NAME

def register(notify_callback=None, close_callback=None, replace=False):
from xpra.x11.dbus_common import init_session_bus
from xpra.dbus.common import init_session_bus
bus = init_session_bus()
flags = dbus.bus.NAME_FLAG_DO_NOT_QUEUE
if replace:
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/platform/pycups_printing.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def init_dbus_listener():
log("init_dbus_listener() dbus_init=%s", dbus_init)
if dbus_init is None:
try:
from xpra.x11.dbus_common import init_system_bus
from xpra.dbus.common import init_system_bus
system_bus = init_system_bus()
log("system bus: %s", system_bus)
sig_match = system_bus.add_signal_receiver(handle_dbus_signal, path=DBUS_PATH, dbus_interface=DBUS_IFACE)
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/platform/xposix/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def sleeping_callback(self, *args):

def setup_dbus_signals(self):
try:
from xpra.x11.dbus_common import init_system_bus
from xpra.dbus.common import init_system_bus
bus = init_system_bus()
self.system_bus = bus
log("setup_dbus_signals() system bus=%s", bus)
Expand Down
4 changes: 2 additions & 2 deletions src/xpra/server/server_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def init_notification_forwarder(self):
log("init_notification_forwarder() enabled=%s", self.notifications)
if self.notifications and os.name=="posix" and not sys.platform.startswith("darwin"):
try:
from xpra.x11.dbus_notifications_forwarder import register
from xpra.dbus.notifications_forwarder import register
self.notifications_forwarder = register(self.notify_callback, self.notify_close_callback)
if self.notifications_forwarder:
log.info("using notification forwarder: %s", self.notifications_forwarder)
Expand Down Expand Up @@ -457,7 +457,7 @@ def init_dbus_helper(self):
if not self.supports_dbus_proxy:
return
try:
from xpra.x11.dbus_helper import DBusHelper
from xpra.dbus.helper import DBusHelper
self.dbus_helper = DBusHelper()
except Exception as e:
log.warn("cannot load dbus helper: %s", e)
Expand Down

0 comments on commit 721c576

Please sign in to comment.