4983 Commits

Author SHA1 Message Date
Charles Kerr
21874392a9 refactor: string-utils, file-utils, env (#8417)
* refactor: add libtransmission/string-utils

* refactor: add libtransmission/file-utils

* refactor: add libtransmission/env

* build: update Xcode
2026-02-11 11:21:45 -06:00
Yat Ho
2e65935bbc build: wrap fmt::fmt-header-only with transmission::fmt-header-only (#8370) 2026-02-05 07:50:11 -06:00
Cœur
1b04d45f26 fix: ignore clang extension usage in ObjC (#8164)
* fix: ignore clang extension usage in ObjC

* Code review: adopt `kMaxCells` (324) directly.
2026-02-04 11:53:39 -06:00
Charles Kerr
f9d4ced2d0 chore: remove FMT_STRING macros (#8354) 2026-02-04 07:44:33 -06:00
Charles Kerr
3c9a523573 perf: faster arrow key navigation in torrent list (#8315)
* perf: when selection changes, only update the rows whose selection changed

previously we were updating all rows

* perf: coalesce pending reloads in TorrentTableView

* refactor: return a copy rather thabn a mutable index

* refactor: move the assignment out of the if statement

* make symmetricDifference an NSIndexSet method
2026-02-01 21:01:28 -06:00
Charles Kerr
c223e3bb64 perf: more efficient Torrent.updateTorrents() (#8280)
avoid unnecessary vector, manually coalesce notifications
2026-01-29 17:58:42 -06:00
Charles Kerr
dd008ae1d0 refactor: C++ify tr_torrentStat() (#8257)
* refactor: callers now own the return value of tr_torrentStat()

fix one potential thread issue by simplifying ownership

* refactor: make tr_stat_errtype an enum class; move into tr_stat

* refactor: order tr_stat fields to reduce padding

* chore: fix branch shear

* fix: int-to-enum-class comparison

* fix: namespace regression

* chore: make clang-tidy happy
2026-01-29 08:07:11 -06:00
Charles Kerr
554cc56bdf refactor: rename our namespace to tr (#8256)
tr and tr::app are less cluttered than libtransmission:: and transmission::app
2026-01-28 18:11:34 -06:00
Charles Kerr
7559f7ffca refactor: C++ify tr_torrentPeers() (#8253)
* refactor: tr_torrentPeers() now returns a std::vector<tr_peer_stat>

* refactor: make tr_peer_stat.client a std::string_view

* refactor: make tr_peer_stat.flag_str a std::string

* refactor: make tr_peer_stat.addr a std::string

* refactor: rename tr_peer_stat field names to camel_case

* refactor: use Speed type for tr_peer_stat speed fields

* refactor: add default initializers to tr_peer_stat fields

* refactor: order tr_peer_stat fields to reduce padding

* fix: typo in [Torrent peers] getter

* refactor: make tr_peer_stat.user_agent a std::string

* refactor: pass by reference instead of by pointer in DetailsDialog

* fixup! refactor: add default initializers to tr_peer_stat fields
2026-01-28 15:16:12 -06:00
Charles Kerr
68e9049b17 refactor: tr_torrentRemove() now takes std::function args (#8229) 2026-01-27 14:37:11 -06:00
Yat Ho
2362afd113 refactor: remove tr_isDirection() (#8213) 2026-01-26 10:00:02 -06:00
Mitch Livingston
2d75dea939 fix: Hide Status Bar/Filter Bar never changing to "Show" (#8216) (#8070) 2026-01-24 17:12:52 -06:00
Charles Kerr
cccef8e2a6 refactor: use fewer raw C strings (#8202)
* refactor: tr_ctorGetDownloadDir() returns a std::optional<std::string>

* refactor: tr_sessionGetConfigDir() now returns a std::string

* refactor: tr_sessionGetDownloadDir() now returns a std::string

* refactor: tr_sessionGetIncompleteDir() now returns a std::string

* refactor: tr_sessionGetRPCWhitelist() now returns a std::string

* refactor: tr_sessionGetRPCPassword() now returns a std::string

* refactor: tr_sessionGetRPCUsername() now returns a std::string

* refactor: tr_sessionGetScript() now returns a std::string

* refactor: tr_blocklistGetURL() now returns a std::string

* refactor: tr_ctorGetSourceFile() now returns a std::optional<std::string>

* refactor: tr_torrentFile() now returns a std::string
2026-01-22 22:36:24 -06:00
Charles Kerr
e7129cfd54 refactor: use fewer raw C strings (#8201)
* refactor: tr_blocklistSetURL() takes a string_view

* refactor: tr_ctorSetMetainfoFromFile() takes a string_view

* refactor: tr_ctorSetMetainfoFromMagnetLink() takes a string_view

* refactor: tr_torrentSetDownloadDir() takes a string_view

* refactor: tr_ctorSetDownloadDir() takes a string_view

* refactor: tr_ctorSetIncompleteDir() takes a string_view

* refactor: tr_torrentSetTrackerList() takes a string_view

* refactor: tr_torrentRenamePath() now takes a std::string_view

* refactor: tr_torrentFindFromMagnetLink() takes a string_view
2026-01-22 16:31:08 -06:00
Charles Kerr
46005038e6 refactor: tr_torrentGetCurrentDir() returns a std::string_view (#8173)
* refactor: gtr_open_file() now takes a std::string_view

refactor: gtr_open_file() now calls Glib::filename_to_uri()

refactor: add gtr_open_file() variant that takes basedir and relative path

refactor: gtr_open_uri() now takes a relative_path std::string_view

* refactor: tr_torrentGetCurrentDir() now returns a std::string_view

refactor: tr_torrentGetDownloadDir() now returns a std::string_view
2026-01-21 11:40:16 -06:00
Yat Ho
cbc5388440 build: bump to C++20 (#7191)
* build: bump to C++20

Co-authored-by: Cœur <coeur@gmx.fr>

* refactor: use designated initializers

* refactor: remove redundant SFINAE

* fix: clang-tidy warnings

* chore: comments about min compiler versions for C++20 features

* build: clang objc++ modules build errors

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* refactor: add `TR_CONSTEXPR_VEC` and `TR_CONSTEXPR_STR`

* fix: don't use `std::rel_ops`

* chore: housekeeping

* fix: possible fix for macOS linker error

---------

Co-authored-by: Cœur <coeur@gmx.fr>
Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-01-20 16:27:34 -06:00
Charles Kerr
140958a8a1 refactor: no macros in transmission.h (#8099)
* refactor: replace TR_RPC_SESSION_ID_HEADER macro with TrRpcSessionIdHeader constant

refactor: replace TR_RPC_RPC_VERSION_HEADER macro with TrRpcVersionHeader constant

* refactor: remove macro TR_DEFAULT_RPC_PORT_STR

* refactor: remove macro TR_DEFAULT_PEER_PORT_STR

* refactor: remove macro TR_DEFAULT_PEER_LIMIT_GLOBAL_STR

* refactor: remove macro TR_DEFAULT_PEER_LIMIT_TORRENT_STR

* refactor: remove macro TR_DEFAULT_PEER_SOCKET_TOS_STR

* refactor: replace DEFAULT_BLOCKLIST_FILENAME macro with TrDefaultBlocklistFilename constant

* refactor: rename TrHttpServerDefaultBasePath to TrDefaultHttpServerBasePath for consistency with other defaults

* refactor: group constants together near the top of transmission.h

* refactor: hardcode string lengths to avoid FTBFS on older C++17 compilers

* refactor: move macros to the tr_getopt clients

* refactor: explicitly specify the parameter index to avoid passing in TrRpcSessionIdHeader twice

* refactor: add an error message to new static_asserts
2026-01-14 07:52:57 -06:00
Charles Kerr
4a05c06ce0 perf: add batch variant of tr_torrentStat() (#8100)
* refactor: add [Torrent updateTorrents]

refactor: use updateTorrents in Controller

* refactor: add a batch variant of tr_torrentStat()

* refactor: use batch variant of tr_torrentStat() in GTK details dialog

* refactor: use batch variant of tr_torrentStat() in gtr_confirm_remove()

* refactor: use batch variant of tr_torrentStat() in updateTorrents

* refactor: add Session::find_torrents()

* refactor: remove the raw ptr variant of updateTorrents()

* refactor: remove tr_sessionLock()

* fixup! refactor: add [Torrent updateTorrents]

remove duplicate method declaration

* fix: readability-avoid-const-params-in-decls

* fix: iwyu in transmission.h

* chore: remove an #include that was added in a draft that did not get used

* refactor: use nullptr instead of NULL
2026-01-12 16:23:06 -06:00
Yat Ho
8a0d5f0648 fix(mac): copyright notices (#8068)
* chore(mac): fix copyright year

* chore(mac): use em dash in copyright notice

* fix(ci): check for emdash in copyright notice

* fix(ci): process QuickLookExtension plist files
2026-01-05 21:47:26 -05:00
Mitch Livingston
ea7c84b174 #7908: Explicitly flag menu item icons as "action image" (#8055)
This will make the icons only appear in macOS 26+, without having to manually remove them for earlier releases. This also will allow us to use newer symbol images.
2026-01-05 17:15:44 -06:00
Mike Gelfand
cf0cec32f5 chore: sync translations (#8059)
* Sync translations with code

* Sync translations with Transifex
2026-01-04 11:45:46 -06:00
Nick
866809aa36 Fix copyright year (#8058)
Fix copyright typo introduced in #8039
2026-01-04 07:58:52 -06:00
Mitchell Livingston
0335d02bd1 Only show file inspector menu action images on macOS 26+ 2026-01-03 10:06:16 -05:00
Cœur
0cd11628a4 Fix: "attempt to insert nil object from objects[0]" (#8035) 2025-12-31 22:02:55 -06:00
github-actions[bot]
5ce17df2e5 chore: update copyright years (#8039)
* chore: update copyright year in COPYING

* chore: update copyright year in user-facing files (1)

* chore: update copyright year in user-facing files (2)

* chore: update copyright year in cmake/transmission.rc.in

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-12-31 21:59:44 -06:00
Evgeny Kulikov
116412b27c Fix. Mac GUI. Incorrect filter selected when hiding the Filter Bar and then showing it again (#7844)
* Set filter to "All" when hiding the filter bar

Otherwise the filters will reset but the tab, for example "Downloading" will still be selected
when the filter is shown again. We want to keep the tabs synchronized with filters state.

* Remove unused BOOL parameter (the method is always called with YES)

---------

Co-authored-by: beyondcompute <beyondcompute@users.noreply.github.com>
2025-12-26 12:01:22 -06:00
Cœur
3da2a2543e refactor: removing menu icons on older Macs (#7994) 2025-12-25 13:59:11 -06:00
Yat Ho
11ead87f8d refactor: rename peer_socket_tos to peer_socket_diffserv (#8004) 2025-12-25 11:05:50 -06:00
Yat Ho
888f90ca1e fix: race condition in tr_torrentStat() (#7948)
* fix: acquire session lock in `tr_torrent::stats()`

* refactor(mac): lock once for the whole updateUI operation
2025-12-22 15:29:15 -06:00
Charles Kerr
1a18462691 refactor: make tr_sessionInit() config_dir arg a string_view (#7939) 2025-12-18 23:06:23 -06:00
Cœur
c56723ef1f chore: compatibility with clang-format 20 to 21 (#7499) 2025-12-15 23:55:32 -06:00
Dzmitry Neviadomski
54f0417f42 Simplify "bars" logic in Main Window (#7840)
* 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.
2025-11-19 21:30:55 -05:00
Mitch Livingston
147da72453 Revised Tahoe icon, including updated favicons, webclip icon, and document icon (#7836) 2025-11-19 20:54:18 -05:00
Dzmitry Neviadomski
495e5bde99 Fix missing tooltips for Group rows in Torrent Table View (#7828) 2025-11-18 07:16:08 -05:00
Dzmitry Neviadomski
821e70d742 Add missing protocols to fix deprecation warnings (#7826) 2025-11-18 07:13:59 -05:00
Dzmitry Neviadomski
4d8a1e5e78 Adapt to Liquid Glass window corner metrics (#7829) 2025-11-17 19:50:18 -05:00
Dzmitry Neviadomski
aa22aea392 Fix layout constraints in Add Torrent Window (#7830) 2025-11-17 19:49:27 -05:00
Cœur
3ecaaee668 Update icon that is not available on older OS (#7792)
* Update icon that is not available on older OS

* Adopting chart.bar
2025-11-13 09:22:04 -06:00
Cœur
78238ec3de fix corruption: torrentVerify on completion (#4178)
* torrentVerify on completion

* Make torrent verify on completion configurable via settings

* code review: replacing tr_verify_complete_mode with bool

* code review: sorting torrent_complete_verify_enabled with bool

* Update Application.cc

* code review: avoiding `session->onTorrentCompletenessChanged` before verification completion
2025-11-10 14:16:15 -06:00
Mitch Livingston
34255b473a Update or remove icons that are not available on older OSs (#7790)
* Update document badges to use legacy names

This is needed to support older OSs

* Update or remove icons that are not available on older OSs
2025-11-09 20:29:18 -05:00
Cœur
5306dd3626 Fix running macos app on a VM when building with cmake (#7763) 2025-11-09 18:13:36 -06:00
Mitch Livingston
b99232777e macOS 26: set icons on most menu items (#7787)
* macOS 26: set icons on most menu items

This is a first pass, and likely needs some adjustments and updated.

This also removes Select None, which does not seem to be in favor in Mac apps anymore.

* Explicitly set the image on toolbar items' menu representation

* Icons for Info > Files context menu
2025-11-09 17:28:28 -05:00
Dzmitry Neviadomski
d1985b05c6 macos: View-based FileOutlineView (#7760)
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2025-11-09 12:21:42 -05:00
Mitch Livingston
909fdad807 Update the macOS document icon to match the new app icon (#7782) 2025-11-09 12:19:21 -05:00
Cœur
312078806d warning: The CFBundleVersion of an app extension ('1') must match that of its containing parent app ('14718.1.2'). (#7762) 2025-11-07 20:19:04 -06:00
Mitch Livingston
d15c8626d8 Updated app icon for Liquid Glass (#7736) 2025-11-05 17:46:43 -06:00
Mike Gelfand
b27fafca45 Sync translations (#7768)
* Sync translations with code

* Sync translations with Transifex
2025-11-05 22:05:13 +00:00
Dzmitry Neviadomski
85a325ed71 feat: Introduce PowerManager on macOS (#7543)
- 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>
2025-11-02 14:41:22 -06:00
Dzmitry Neviadomski
9b496350a9 feat: Data-based QuickLook extension for macOS 12+ (#7213)
* feat: Prepate Xcode project skeleton for QuickLookExtension

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* feat: Add initial implementation of QuickLookExtension

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* feat: Add working Data-based QuickLook Preview

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* feat: Add new style.css

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* feat: Copy Localization.strings as is from legacy QuickLook plugin

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fixup: Fix compilation missing NSStringAdditions

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fixup: Apply clang-format, update style.css, fix file name reference

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* feat: Adopt CMake build from legacy QuickLook Plugin

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fixup: Remove counter for debug

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fixup: Make header row for file span across all table

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* feat: Improve style.css

- Use CSS Vars
- Add missing paddings
- Add sticky headers for tables

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Use UTType for Image generation more directly.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Fixup for Xcode project checks in PR

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Fix Copyright and remove Xcode generated comments

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Remove unneeded fields from targets Info.plist template.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Move tx localization to new QuickLook Extension

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Apply code review suggestions

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

---------

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2025-10-31 11:30:55 -05:00
Mike Gelfand
f8d8676f60 Sync translations (#7742)
* Fix "Message contains an embedded URL" xgettext warnings

See https://www.gnu.org/software/gettext/manual/html_node/No-embedded-URLs.html

* Sync translations with code

* Sync translations with Transifex
2025-10-27 14:39:58 +01:00