Skip to content

Commit

Permalink
reset the tray icon and pending request counters when changing the cl…
Browse files Browse the repository at this point in the history
…ipboard state (ie: when disabling it)

git-svn-id: https://xpra.org/svn/Xpra/trunk@4850 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 3, 2013
1 parent 5c1c1e1 commit f16610b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/xpra/client/gtk2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ def clipboard_toggled(*targs):
self.clipboard_helper.send_all_tokens()
else:
pass #FIXME: todo!
#reset tray icon:
self.local_clipboard_requests = 0
self.remote_clipboard_requests = 0
self.clipboard_notify(0)
self.connect("clipboard-toggled", clipboard_toggled)
self.connect("handshake-complete", register_clipboard_toggled)
return helperClass(clipboard_send, clipboard_progress, *args, **kwargs)
Expand All @@ -211,7 +215,7 @@ def clipboard_notify(self, n):
if not self.tray:
return
log("clipboard_notify(%s)", n)
if n>0:
if n>0 and self.clipboard_enabled:
self.tray.set_icon("clipboard")
self.tray.set_tooltip("%s clipboard requests in progress" % n)
self.tray.set_blinking(True)
Expand Down

0 comments on commit f16610b

Please sign in to comment.