Skip to content

Commit

Permalink
#904: move more dbus stuff to sub modules
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@10745 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 6, 2015
1 parent 18d0c04 commit 8fcba71
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1800,6 +1800,8 @@ def cython_add(*args, **kwargs):


toggle_packages(dbus_ENABLED, "xpra.dbus")
toggle_packages(dbus_ENABLED and server_ENABLED, "xpra.server.dbus")
toggle_packages(x11_ENABLED and dbus_ENABLED and server_ENABLED, "xpra.x11.dbus")
toggle_packages(x11_ENABLED, "xpra.x11", "xpra.x11.bindings")
if x11_ENABLED:
make_constants("xpra", "x11", "bindings", "constants")
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/platform/xposix/gtkmenu_tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ def set_global_menu(self):
}
},
}
from xpra.x11.gtk_x11 import menu
from xpra.x11.dbus import menu
menu.fallback_menus = menus
#menu.our_menu = "Xpra", menus
2 changes: 1 addition & 1 deletion src/xpra/platform/xposix/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _get_X11_root_property(name, req_type):


def _set_gtk_x11_window_menu(add, wid, window, menus, application_action_callback=None, window_action_callback=None):
from xpra.x11.gtk_x11.menu import setup_dbus_window_menu
from xpra.x11.dbus.menu import setup_dbus_window_menu
from xpra.x11.gtk_x11.prop import prop_set, prop_del
window_props = setup_dbus_window_menu(add, wid, menus, application_action_callback, window_action_callback)
#window_props may contains X11 window properties we have to clear or set
Expand Down
4 changes: 4 additions & 0 deletions src/xpra/server/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.
4 changes: 2 additions & 2 deletions src/xpra/server/server_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,10 @@ def init_dbus_server(self):
if not self.dbus_control:
return
try:
from xpra.server.dbus_server import DBUS_Server
from xpra.server.dbus.dbus_server import DBUS_Server
self.dbus_server = DBUS_Server(self, os.environ.get("DISPLAY", "").lstrip(":"))
except Exception as e:
log.error("Error setting up our dbus server:")
log.error("Error setting up our dbus server:", exc_info=True)
log.error(" %s", e)


Expand Down
4 changes: 4 additions & 0 deletions src/xpra/x11/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.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

from xpra.server.dbus_server import DBUS_Server, INTERFACE
from xpra.server.dbus.dbus_server import DBUS_Server, INTERFACE
import dbus.service

from xpra.log import Logger
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/x11/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ def init_dbus_server(self):
if not self.dbus_control:
return
try:
from xpra.x11.x11_dbus_server import X11_DBUS_Server
from xpra.x11.dbus.x11_dbus_server import X11_DBUS_Server
self.dbus_server = X11_DBUS_Server(self, os.environ.get("DISPLAY", "").lstrip(":"))
except Exception as e:
log.error("Error setting up our dbus server:")
Expand Down

0 comments on commit 8fcba71

Please sign in to comment.