Treferwynd / transmission-remote-gtk

Automatically exported from code.google.com/p/transmission-remote-gtk
GNU General Public License v2.0
0 stars 0 forks source link

When using notification area icon, don't quit when closing window #223

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Feature request: If the "Show Transmission icon in the notification area" is 
checked in the preferences, don't quit the application if the application frame 
is closed.

Other applications that have a notification area icon (eg. pidgin) keep the 
program running if the main window is closed, and is restored by clicking on 
the notification icon.

Now, why don't I just not close the window and hit the minimize button instead? 
I'm using a tiling window manager (i3wm) and I don't have a minimize button, 
the only way to close a window is to destroy the frame, which in the case of 
transmission-remote, quits the application.

Original issue reported on code.google.com by tellarite on 8 Feb 2013 at 10:32

GoogleCodeExporter commented 9 years ago
Same problem in Ubuntu 12.10 64 bits with Unity.
Transmission Remote 1.1. "Show Transmission icon in the notification area" 
clicked.

If I minimize the window, minimizes to Unity left bar, like any other normal 
window. When I close the window, it closes the application totally.
What's the purpose of the tray icon then?
Regards.

Original comment by si...@j1s.es on 13 Feb 2013 at 2:54

GoogleCodeExporter commented 9 years ago
My C-fu sucks, but I believe I have fixed this issue. My patch is attached.

You can also pull directly from my github branch: 
git://github.com/EnigmaCurry/transmission-remote-gtk.git 
(branch is fix-minimize-to-tray)

Original comment by tellarite on 26 Feb 2013 at 1:12

Attachments:

GoogleCodeExporter commented 9 years ago
This patch doesn't work with Unity on Ubuntu 12.10 64 bits.

Original comment by si...@j1s.es on 26 Feb 2013 at 12:00

GoogleCodeExporter commented 9 years ago
Unity appears to do tray icons in a completely unorthodox way, hiding regular 
system tray icons and using their own 'appindicators'. It looks like 
transmission-remote-gtk has support for these appindicators, but it uses 
entirely different code than the regular system tray icons, using several 
#ifdef blocks to test for the availability of appindicators. 

Here's a patch that removes some of that mess and reverts it back to using 
regular system tray icons instead of an appindicator.

You have to tell unity that you want to display them though, as they are hidden 
by default:

gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

or 

gsettings set com.canonical.Unity.Panel systray-whitelist 
"['transmission-remote-gtk']"

Although this second patch does fix the issue in unity, I don't think it is 
necessarily what most unity users would want, so it is probably best to not 
include it into the upstream code.

Original comment by tellarite on 26 Feb 2013 at 2:21

Attachments: