Ejemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     self.pasteboard = NSPasteboard.generalPasteboard()
     if self.pasteboard is None:
         raise Exception("cannot load Pasteboard, maybe not running from a GUI session?")
     kwargs["clipboard.local"] = "CLIPBOARD"
     kwargs["clipboards.local"] = ["CLIPBOARD"]
     ClipboardTimeoutHelper.__init__(self, *args, **kwargs)
Ejemplo n.º 2
0
 def __init__(self, send_packet_cb, progress_cb=None, **kwargs):
     gobject.GObject.__init__(self)
     self.init_window()
     init_x11_filter()
     self.x11_filter = True
     ClipboardTimeoutHelper.__init__(self, send_packet_cb, progress_cb,
                                     **kwargs)
Ejemplo n.º 3
0
 def _munge_wire_selection_to_raw(self, encoding, dtype, dformat, data):
     if encoding=="atoms":
         return _filter_targets(data)
     return ClipboardTimeoutHelper._munge_wire_selection_to_raw(self, encoding, dtype, dformat, data)
Ejemplo n.º 4
0
 def cleanup(self):
     ClipboardTimeoutHelper.cleanup(self)
     self.pasteboard = None
Ejemplo n.º 5
0
 def cleanup(self):
     if self.x11_filter:
         self.x11_filter = False
         cleanup_x11_filter()
     ClipboardTimeoutHelper.cleanup(self)
     self.cleanup_window()
Ejemplo n.º 6
0
 def __init__(self, send_packet_cb, progress_cb=None, **kwargs):
     self.init_window()
     ClipboardTimeoutHelper.__init__(self, send_packet_cb, progress_cb,
                                     **kwargs)
Ejemplo n.º 7
0
 def _munge_raw_selection_to_wire(self, target, dtype, dformat, data):
     if dtype == "ATOM":
         assert isinstance(data, (tuple, list))
         return "atoms", _filter_targets(data)
     return ClipboardTimeoutHelper._munge_raw_selection_to_wire(
         self, target, dtype, dformat, data)
Ejemplo n.º 8
0
 def cleanup(self):
     ClipboardTimeoutHelper.cleanup(self)
     self.cleanup_window()