* refactor: add a Torrent.id property
* feat: add Controller.torrentForId
* refactor: make tr_session_idle_limit_hit_func a std::function
* refactor: make tr_session_metadata_func a std::function
* refactor: make tr_session_ratio_limit_hit_func a std::function
* refactor: make tr_torrent_completeness_func a std::function
* refactor: make tr_altSpeedFunc a std::function
* refactor: make tr_sessionSetQueueStartCallback callback a std::function
* refactor: make tr_rpc_callback_status callback a std::function
* refactor: remove user_data arg from tr_torrent_rename_done_func
* refactor: harden `tr_torrentFindFromId()` by making it safe to pass in a nullptr session
* Adopt NSTitlebarAccessoryViewController for filter and status bars
Also remove custom views as separator is drawn with Horizontal Line.
Simplifies maintainance a bit.
* Unembed main content and status bar from NSStackView
Stack is no longer needed, as bars are moved into titlebar.
- Use modern APIs to prevent idle system sleep.
- Consolidate all related logic.
- Make Controller class a little bit less huge.
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* re-add macOS Fullscreen support
re added Full Screen support for macOS. Also refactored window methods in Controller.mm and moved to their own category - ControllerWindowMethods.mm
This has currently only been tested on macOS Monterey, and should be good on earlier versions - but perhaps needs testing on earlier versions of macOS.
fixes#3231#3234
* Update enabled complier warnings
* Convert to Modern Objective-C syntax using Xcode's tool
* Convert to modern objc syntax manually, fix some PR issues
* Remove unnecessary parentheses
* Use property syntax for all custom properties
* Use property syntax for all system properties
* Fix erroneously autoreleased values
* Revert VDKQueue to old objc syntax
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
Co-authored-by: Mitch Livingston <livings124@mac.com>
For some reason, Mac client is the only project that references
libtransmission files as if they were a part of its own project, and
inconsistently so. Make the include/import style uniform an in line with
other projects.
Adjust Mac client include directory settings a bit along the way.
In addition to the patch,
* remove unused global actions menu (popover is used instead)
* remove *Lion class macros, use NSPopover and NSDataDetector directly