Tray icon on MAC

MAC OS X specific questions, problems.
Post Reply
Nick Korotysh

Tray icon on MAC

Post by Nick Korotysh »

I tested tray icon on my Mac itself. it works correctly. I installed Qt from MacPorts followed instructions on wiki.
Here is my example that I ruined on my Mac and screenshot that it really works.
https://www.dropbox.com/s/03uetmn42wza9 ... .47.53.png

sledgehammer_999: I found code that you post and try to comment it. Checkbox was enabled, but tray icon didn't appear. There is problem somewhere tray icon is created. I can find and fix it if you have no time for it.

qBittorrent is only adequate torrent client on Mac. It is simple and have needed functionality, it's free and doesn't have any 'spam' software like YandexBar (and something other) in installer... I using it on Windows and Linux a very long time and I would like to qBittorrent 'had all features' on Mac too.
Last edited by Nick Korotysh on Sun May 04, 2014 10:19 pm, edited 1 time in total.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Tray icon on MAC

Post by sledgehammer_999 »

I split your post into a new topic.
Await for a diff.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Tray icon on MAC

Post by sledgehammer_999 »

Can you try with this diff: http://pastebin.com/Hd1csSUa ?
It is based on 3.1.9.2 but it should apply to other versions too.
Nick Korotysh

Re: Tray icon on MAC

Post by Nick Korotysh »

I look to code and found why tray icon is not shown on Mac. see preferences.h, line 137 and below:

Code: Select all

bool systrayIntegration() const {
#ifdef Q_WS_MAC
    return false;
#else
    return value(QString::fromUtf8("Preferences/General/SystrayEnabled"), true).toBool();
#endif
}
I changed highlighted 'false' too 'true' and tray icon is appeared :)

Tested with your patch and commented 'return false' with defines (leave only 'return value(...)'):
- checkbox in settings is available, when I checked it and apply settings tray icon appears.

https://www.dropbox.com/s/t158c8roc4l11 ... .23.41.png
Last edited by Nick Korotysh on Sun May 04, 2014 11:25 pm, edited 1 time in total.
Nick Korotysh

Re: Tray icon on MAC

Post by Nick Korotysh »

here is my build with fixed tray icon: https://dl.dropboxusercontent.com/u/483 ... -fixed.dmg
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Tray icon on MAC

Post by sledgehammer_999 »

Damn. I didn't see that.
Anyway, if you know git go ahead and make a pull request on github.
Otherwise, I'll make the changes.
Nick Korotysh

Re: Tray icon on MAC

Post by Nick Korotysh »

I don't know how to upload diff to github, I attached my diff here.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Tray icon on MAC

Post by sledgehammer_999 »

Post Reply