Skip to content

Commit

Permalink
avoid triggering token warnings: only send the one clipboard we have …
Browse files Browse the repository at this point in the history
…enabled + constify

git-svn-id: https://xpra.org/svn/Xpra/trunk@22570 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 30, 2019
1 parent fe7ff91 commit 490bba4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/xpra/client/gtk_base/gtk_tray_menu_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,14 +619,15 @@ def remote_clipboard_changed(self, item, clipboard_submenu):
def set_new_remote_clipboard(self, remote_clipboard):
clipboardlog("set_new_remote_clipboard(%s)", remote_clipboard)
ch = self.client.clipboard_helper
ch._local_to_remote["CLIPBOARD"] = remote_clipboard
ch._remote_to_local[remote_clipboard] = "CLIPBOARD"
local_clipboard = "CLIPBOARD"
ch._local_to_remote[local_clipboard] = remote_clipboard
ch._remote_to_local[remote_clipboard] = local_clipboard
selections = [remote_clipboard]
clipboardlog.info("server clipboard synchronization changed to %s selection", remote_clipboard)
#tell the server what to look for:
#(now that "clipboard-toggled" has re-enabled clipboard if necessary)
self.client.send_clipboard_selections(selections)
ch.send_all_tokens()
ch.send_tokens([local_clipboard])

def make_translatedclipboard_optionsmenuitem(self):
clipboardlog("make_translatedclipboard_optionsmenuitem()")
Expand Down

0 comments on commit 490bba4

Please sign in to comment.