def __init__(self, selection="CLIPBOARD"): ClipboardProxyCore.__init__(self, selection) GObject.GObject.__init__(self) self._block_owner_change = monotonic() self._want_targets = False self.clipboard = Gtk.Clipboard.get(Gdk.Atom.intern(selection, False)) self.clipboard.connect("owner-change", self.owner_change)
def cleanup(self): ClipboardProxyCore.cleanup(self) w = get_UI_watcher() if w: try: w.remove_alive_callback(self.timer_clipboard_check) except (KeyError, ValueError): pass
def __init__(self, xid, selection="CLIPBOARD"): ClipboardProxyCore.__init__(self, selection) GObject.GObject.__init__(self) self.xid = xid self.owned = False self._want_targets = False self.remote_requests = {} self.local_requests = {} self.local_request_counter = 0 self.targets = () self.target_data = {} self.reset_incr_data()
def __init__(self, selection, pasteboard, send_clipboard_request_handler, send_clipboard_token_handler): self.pasteboard = pasteboard self.send_clipboard_request_handler = send_clipboard_request_handler self.send_clipboard_token_handler = send_clipboard_token_handler ClipboardProxyCore.__init__(self, selection) self.update_change_count() #setup clipboard counter watcher: w = get_UI_watcher(glib.timeout_add, glib.source_remove) if w is None: log.warn("Warning: no UI watcher instance available") log.warn(" cannot detect clipboard change events") else: w.add_alive_callback(self.timer_clipboard_check)
def __init__(self, window, selection, send_clipboard_request_handler, send_clipboard_token_handler): self.window = window self.send_clipboard_request_handler = send_clipboard_request_handler self.send_clipboard_token_handler = send_clipboard_token_handler ClipboardProxyCore.__init__(self, selection)
def init_uuid(self): ClipboardProxyCore.init_uuid(self) self.claim()