Skip to content

Commit

Permalink
#1588: split pure gtk2 code from the gtk2 + X11 bindings
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@16535 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 27, 2017
1 parent 407354e commit 051dff6
Show file tree
Hide file tree
Showing 10 changed files with 7,307 additions and 144 deletions.
14 changes: 11 additions & 3 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,8 @@ def pkgconfig(*pkgs_options, **ekw):
CLEAN_FILES = [
"xpra/build_info.py",
"xpra/monotonic_time.c",
"xpra/gtk_common/gdk_atoms.c",
"xpra/gtk_common/gtk2/gdk_atoms.c",
"xpra/gtk_common/gtk2/gdk_bindings.c",
"xpra/x11/gtk2/constants.pxi",
"xpra/x11/gtk2/gdk_bindings.c",
"xpra/x11/gtk2/gdk_display_source.c",
Expand Down Expand Up @@ -1735,6 +1736,13 @@ def osx_pkgconfig(*pkgs_options, **ekw):
**pkgconfig(*GDK_BINDINGS_PACKAGES, ignored_tokens=gtk2_ignored_tokens)
))

toggle_packages(not PYTHON3 and (gtk2_ENABLED or gtk_x11_ENABLED), "xpra.gtk_common.gtk2")
if not PYTHON3 and (gtk2_ENABLED or gtk_x11_ENABLED):
cython_add(Extension("xpra.gtk_common.gtk2.gdk_bindings",
["xpra/gtk_common/gtk2/gdk_bindings.pyx"],
**pkgconfig(*PYGTK_PACKAGES, ignored_tokens=gtk2_ignored_tokens)
))

if client_ENABLED and gtk3_ENABLED:
#cairo workaround:
cython_add(Extension("xpra.client.gtk3.cairo_workaround",
Expand Down Expand Up @@ -1819,8 +1827,8 @@ def osx_pkgconfig(*pkgs_options, **ekw):

toggle_packages(clipboard_ENABLED, "xpra.clipboard")
if clipboard_ENABLED:
cython_add(Extension("xpra.gtk_common.gdk_atoms",
["xpra/gtk_common/gdk_atoms.pyx"],
cython_add(Extension("xpra.gtk_common.gtk2.gdk_atoms",
["xpra/gtk_common/gtk2/gdk_atoms.pyx"],
**pkgconfig(*PYGTK_PACKAGES, ignored_tokens=gtk2_ignored_tokens)
))

Expand Down
6 changes: 3 additions & 3 deletions src/xpra/clipboard/gdk_clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

import struct

from xpra.gtk_common.gdk_atoms import (
from xpra.gtk_common.gtk2.gdk_atoms import (
gdk_atom_objects_from_gdk_atom_array, #@UnresolvedImport
gdk_atom_array_from_gdk_atom_objects #@UnresolvedImport
)

from xpra.clipboard.clipboard_base import ClipboardProtocolHelperBase, log

from xpra.os_util import WIN32, OSX
if not WIN32 and not OSX:
if False:
try:
from xpra.x11.gtk2.gdk_bindings import sanitize_gtkselectiondata
from xpra.gtk_common.gtk2.gdk_bindings import sanitize_gtkselectiondata
from xpra.clipboard import clipboard_base
clipboard_base.sanitize_gtkselectiondata = sanitize_gtkselectiondata
except ImportError as e:
Expand Down
Loading

0 comments on commit 051dff6

Please sign in to comment.