Пример #1
0
 def __init__(self, *args, **kwargs):
     def getselection(name):
         v = kwargs.get("clipboard.%s" % name)           #ie: clipboard.remote
         env_value = os.environ.get("XPRA_TRANSLATEDCLIPBOARD_%s_SELECTION" % name.upper())
         selections = kwargs.get("clipboards.%s" % name) #ie: clipboards.remote
         assert selections, "no %s clipboards!" % name
         for x in (env_value, v):
             if x and x in selections:
                 return x
         return selections[0]
     self.local_clipboard = getselection("local")
     self.remote_clipboard = getselection("remote")
     log("TranslatedClipboardProtocolHelper local=%s, remote=%s", self.local_clipboard, self.remote_clipboard)
     #the local clipboard cannot be changed!
     #we tell the superclass to only initialize this proxy:
     kwargs["clipboards.local"] = [self.local_clipboard]
     #this one can be changed (we send a packet to change the enabled selections)
     kwargs["clipboards.remote"] = [self.remote_clipboard]
     GDKClipboardProtocolHelper.__init__(self, *args, **kwargs)
Пример #2
0
 def __init__(self, send_packet_cb, progress_cb=None):
     init_pasteboard()
     GDKClipboardProtocolHelper.__init__(self, send_packet_cb, progress_cb,
                                         ["CLIPBOARD"])
Пример #3
0
 def __init__(self, *args, **kwargs):
     init_pasteboard()
     kwargs["clipboards.remote"] = ["CLIPBOARD"]
     GDKClipboardProtocolHelper.__init__(self, *args, **kwargs)
Пример #4
0
 def __init__(self, send_packet_cb, progress_cb=None):
     init_pasteboard()
     GDKClipboardProtocolHelper.__init__(self, send_packet_cb, progress_cb, ["CLIPBOARD"])
Пример #5
0
 def __init__(self, *args, **kwargs):
     init_pasteboard()
     kwargs["clipboards.remote"] = ["CLIPBOARD"]
     GDKClipboardProtocolHelper.__init__(self, *args, **kwargs)