From b6cec31b3034e2e6527242b038f2e1cfae858e03 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 31 Jul 2012 05:22:11 +0000 Subject: [PATCH] fix typo, avoid using reserved keywords and re-use superclass debugging helper function git-svn-id: https://xpra.org/svn/Xpra/trunk@1219 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/xposix/xclipboard.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/xpra/xposix/xclipboard.py b/src/xpra/xposix/xclipboard.py index 91fc86812a..3f80bf4da8 100644 --- a/src/xpra/xposix/xclipboard.py +++ b/src/xpra/xposix/xclipboard.py @@ -7,10 +7,8 @@ from wimpiggy.lowlevel import (gdk_atom_objects_from_gdk_atom_array, #@UnresolvedImport gdk_atom_array_from_gdk_atom_objects) #@UnresolvedImport -from wimpiggy.log import Logger -log = Logger() -from xpra.platform.clipboard_base import ClipboardProtocolHelperBase +from xpra.platform.clipboard_base import ClipboardProtocolHelperBase, debug class ClipboardProtocolHelper(ClipboardProtocolHelperBase): """ This clipboard helper adds the ability to parse raw X11 atoms @@ -20,7 +18,8 @@ class ClipboardProtocolHelper(ClipboardProtocolHelperBase): def __init__(self, send_packet_cb): ClipboardProtocolHelperBase.__init__(self, send_packet_cb, ["CLIPBOARD", "PRIMARY", "SECONDARY"]) - def _do_munge_raw_selection_to_wire(self, target, ype, format, data): + def _do_munge_raw_selection_to_wire(self, target, datatype, dataformat, data): + debug("_do_munge_raw_selection_to_wire(%s, %s, %s, %s)", target, datatype, dataformat, data) if format == 32 and type in ("ATOM", "ATOM_PAIR"): # Convert to strings and send that. Bizarrely, the atoms are # not actual X atoms, but an array of GdkAtom's reinterpreted @@ -31,12 +30,13 @@ def _do_munge_raw_selection_to_wire(self, target, ype, format, data): atom_names.remove("SAVE_TARGETS") atom_names.remove("COMPOUND_TEXT") return ("atoms", atom_names) - return ClipboardProtocolHelperBase._do_munge_raw_selection_to_wire(self, target, type, format, data) + return ClipboardProtocolHelperBase._do_munge_raw_selection_to_wire(self, target, datatype, dataformat, data) - def _munge_wire_selection_to_raw(self, encoding, datatype, format, data): + def _munge_wire_selection_to_raw(self, encoding, datatype, dataformat, data): + debug("_munge_wire_selection_to_raw(%s, %s, %s, %s)", encoding, datatype, dataformat, data) if encoding == "atoms": import gtk.gdk gdk_atoms = [gtk.gdk.atom_intern(a) for a in data] atom_array = gdk_atom_array_from_gdk_atom_objects(gdk_atoms) return struct.pack("=" + "I" * len(atom_array), *atom_array) - return ClipboardProtocolHelperBase._munge_wire_selection_to_raw(self, encoding, datatype, format, data) + return ClipboardProtocolHelperBase._munge_wire_selection_to_raw(self, encoding, datatype, dataformat, data)