xpra icon
Bug tracker and wiki

Opened 6 years ago

Closed 6 years ago

#448 closed defect (fixed)

cliboard handling breaks icon if using --tray-icon option

Reported by: jamie Owned by: Antoine Martin
Priority: major Milestone: 0.11
Component: client Version: 0.10.x
Keywords: tray-icon clipboard Cc:

Description

When you paste into an xpra session, the custom icon specified with the --tray-icon argument is replaced with the default xpra icon. It seems like this is a regression from #275.

I hacked a fix with the following diff by stumbling through the code (version 0.10.4+dfsg-2 in Debian jessie). Perhaps there is a more elegant way to do this?

1 jamie@animal:xpra$ diff -u client/ui_client_base.py{.orig,}
--- client/ui_client_base.py.orig 2013-10-23 17:48:24.260447362 -0400
+++ client/ui_client_base.py  2013-10-23 17:48:35.432433022 -0400
@@ -218,6 +218,7 @@
         if not opts.no_tray:
             self.menu_helper = self.make_tray_menu_helper()
             self.tray = self.setup_xpra_tray(opts.tray_icon)
+            self.tray.tray_icon_filename = tray_icon_filename
             if self.tray:
                 tray_icon_filename = self.tray.get_tray_icon_filename(tray_icon_filename)
                 if opts.delay_tray:
1 jamie@animal:xpra$ diff -u client/gtk2/client.py{.orig,}
--- client/gtk2/client.py.orig  2013-10-23 17:33:39.113595252 -0400
+++ client/gtk2/client.py 2013-10-23 17:49:35.884355482 -0400
@@ -200,7 +200,11 @@
             self.tray.set_tooltip("%s clipboard requests in progress" % n)
             self.tray.set_blinking(True)
         else:
-            self.tray.set_icon("xpra")
+            filename = self.tray.get_tray_icon_filename(self.tray.tray_icon_filename)
+            if filename:
+              self.tray.set_icon_from_file(filename)
+            else:
+              self.tray.set_icon("xpra")
             self.tray.set_tooltip("Xpra")
             self.tray.set_blinking(False)

1 jamie@animal:xpra$

Change History (5)

comment:1 Changed 6 years ago by Antoine Martin

Milestone: 0.11
Owner: changed from Antoine Martin to Antoine Martin
Status: newassigned
Version: 0.10.x

Thanks for the report.
This may well be the right fix, I'll have a look tomorrow (win32 and OSX make this more complicated than it should be!)

comment:2 Changed 6 years ago by Antoine Martin

Owner: changed from Antoine Martin to jamie
Status: assignednew

Proper fix and much more in r4628.

This change is too big for the stable 0.10.x branch, so I think I will simply disable clipboard notifications via the tray and re-open #275 for testing instead.

Does that work ok for you?

comment:3 Changed 6 years ago by jamie

That sounds like the right way to go. Thanks for working through the proper fix.

comment:4 Changed 6 years ago by jamie

Owner: changed from jamie to Antoine Martin

I'm re-assigning back to you. With these changes I consider the issue fixed. Not sure if you prefer to close now or close after the next release.

comment:5 Changed 6 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

Thanks, r4630 removes the tray icon change on clipboard notifications from v0.10.x and will be included in the next stable release.

Closing.

Note: See TracTickets for help on using tickets.