Open evansan opened 5 years ago
I agree with this. I know that it was removed a while back but I there should at least be an option for me to display an icon in the menu bar. The dock on MacOS is pretty much useless and hidden.
I was just looking for a way to do this.. I guess it doesn't exist.
Same. I don't like having what I consider "service" applications just sitting in my app bar.
Apps like qBittorrent and Background Music count as a service app to me.
+1 very useful feature it would be.
+1 for this feature. I have running app almost all time as I'm seeding and keeping app icon in dock is disturbing.
Looks like this issue hasn't been fixed for 4 years now?? Is there some major problem for adding this?
Looks like this issue hasn't been fixed for 4 years now?? Is there some major problem for adding this?
No Mac developers.
Maybe @Kolcha ?
I'm not Mac developer either :) but since I have MacBook from the office and can use it almost as personal one, I can do many things. will look into this issue during this week or weekend. I also interested in this particular feature for my own application which will be published soon. I know how to hide dock icon using some trick in Info.plist, but have no idea how to do this programmatically. this should be not a big issue I think, the case is very common. the only issue I'm worrying about, this is macOS itself - nowadays there are a lot of unnecessary restrictions, and you should expect the unexpected issues when calling system Objective-C API from C/C++. again, this is just an observation, I'm not a macOS/Apple developer, and don't want to be, just have to deal with it from time to time.
Understood @Kolcha, thank you so much for your contributions and efforts :pray:
related issue #18762
so, here are some updates from my side:
now about issues. I have ideas how to fix them, but this requires some time-consuming refactoring and slightly deeper understanding of affected code.
QAction
objects, just linked to the original ones used in UI.QAction::QuitRole
set. it is not an option to remove this flag, as this will lead to extra "File -> Exit" menu item, not just "Quit qBittorrent" as it expected for any other macOS application. creating another QAction
object for this purpose is also may be an option.
so, a lot of work must be done to get something usable, not "just working"
another update from my side, but this is a piece of sad news... I have no proper and clean solutions for the issues above, for some even hacky. some details are below:
so, I will not implement it, sorry...
Here is the method I used to completely hide qBittorrent in the Dock bar by modifying the plist file in the qBittorrent package:
<key>LSUIElement</key>
<string>1</string>
That is to add the Key "LSUIElement", Class is string, Value is 1. Just like this ↓
another update from my side, but this is a piece of sad news... I have no proper and clean solutions for the issues above, for some even hacky. some details are below:
- tray icon behavior on macOS is different (menu is always shown regardless of what mouse button is clicked) compared to other systems, but qBittorrent highly relies on "standard" behavior. I found no hack to work around it.
- there is no easy and clean way to set another menu for dock icon to avoid unnecessary menu items duplication. qBittorrent implements DesktopIntegration component for tray/dock integration, it assumes some single context menu for that purpose, and this menu is created outside it. maintaining another "special" almost the same menu outside this component will require code/logic duplication and is just very ugly.
- sync system "Show/Hide" menu item with the item in tray menu requires very tricky Objective-C code (you need to handle some platform-specific events) and what is worst is that potential event handlers for them also may trigger the same events. so, some hack is required to distinguish events that are result of clicking the item in dock menu from those "side effects".
- close and minimize actions also seem to be handled in special way on macOS. to get work "Hidden" window on startup some hacks are required. even just re-enabling tray icon breaks some other existing logic in qBittorrent, and removing platform-specific macros (to make logic the same for all platforms) doesn't solve the issue.
so, I will not implement it, sorry...
Can we use only the menu bar mode without using the GUI and only provide webUI, and the menu bar only provides exit options.
bumping
bumping
If I just need to leave qbtorrent open for seeding, staying on the menu bar instead of dock in much less distracting.