From 2f123b0a0d32fdc665eee192440600de9f7bddaa Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Dec 2013 15:24:44 +0000 Subject: [PATCH] #479: when we stop notifying about clipboard activity, restore the tray 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 --- src/xpra/client/gtk2/client.py | 2 +- src/xpra/client/ui_client_base.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/xpra/client/gtk2/client.py b/src/xpra/client/gtk2/client.py index e270f8d88d..b3f10f6b43 100644 --- a/src/xpra/client/gtk2/client.py +++ b/src/xpra/client/gtk2/client.py @@ -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) diff --git a/src/xpra/client/ui_client_base.py b/src/xpra/client/ui_client_base.py index b953ad3a28..b8df06a32d 100644 --- a/src/xpra/client/ui_client_base.py +++ b/src/xpra/client/ui_client_base.py @@ -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