Skip to content

Commit

Permalink
#479: when we stop notifying about clipboard activity, restore the tr…
Browse files Browse the repository at this point in the history
…ay to its real title (not hard-coded "Xpra") - and move figuring out the tray title to a method

git-svn-id: https://xpra.org/svn/Xpra/trunk@5008 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 19, 2013
1 parent 845d221 commit 2f123b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/xpra/client/gtk2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def clipboard_notify(self, n):
self.tray.set_blinking(True)
else:
self.tray.set_icon(None) #None means back to default icon
self.tray.set_tooltip("Xpra")
self.tray.set_tooltip(self.get_tray_title())
self.tray.set_blinking(False)


Expand Down
10 changes: 6 additions & 4 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,15 @@ def xpra_tray_geometry(*args):
menu = None
if self.menu_helper:
menu = self.menu_helper.build()
title = "Xpra"
if self._protocol._conn:
title = self._protocol._conn.target
tray = self.make_tray(menu, title, tray_icon_filename, xpra_tray_geometry, xpra_tray_click, xpra_tray_mouseover, xpra_tray_exit)
tray = self.make_tray(menu, self.get_tray_title(), tray_icon_filename, xpra_tray_geometry, xpra_tray_click, xpra_tray_mouseover, xpra_tray_exit)
log("setup_xpra_tray(%s)=%s", tray_icon_filename, tray)
return tray

def get_tray_title(self):
if self._protocol._conn:
return self._protocol._conn.target
return "Xpra"

def setup_system_tray(self, client, wid, w, h, title):
tray_widget = None
#this is a tray forwarded for a remote application
Expand Down

0 comments on commit 2f123b0

Please sign in to comment.