Charles Kerr
37f01fac4c
refactor: migrate variant api ( #6238 )
2023-11-10 15:41:32 -06:00
Charles Kerr
a952a0731f
refactor: remove the tr_error** idiom ( #6198 )
...
* refactor: remove the tr_error** idiom
* fix: tr_error::message() is only constexpr in c++20 and up
* chore: silence a couple of g++-12 Wshadow warnings
2023-11-04 11:39:41 -05:00
Julien
424a9b5e17
chore: cleanup timespans in remaining headers ( #6199 )
...
* chore: cleanup timespans in remaining headers
* fix: reverted change in generated file
See https://github.com/transmission/transmission/actions/runs/6744426558/job/18334261137?pr=6199
2023-11-03 08:31:39 -05:00
Julien
8ac323d5d6
chore: removed copyright timespans in headers ( #4850 )
2023-11-01 16:11:11 -05:00
Charles Kerr
72d2823851
refactor: remove tr_torrentTotalSize() ( #6166 )
...
this interim function should have been removed when tr_torrentView() was introduced
2023-10-25 16:37:09 -04:00
Charles Kerr
8f7330523c
chore: remove unused progress arg from tr_torrentSetLocation() ( #6147 )
2023-10-21 22:33:41 -04:00
Dzmitry Neviadomski
0faad14086
fix: crash when selecting file from recently used in gtk file chooser ( #6131 )
2023-10-20 17:13:18 -05:00
Charles Kerr
917c00e477
refactor: remove tr_torrentStatCached() ( #6066 )
2023-10-02 14:07:28 -05:00
Charles Kerr
6ead147620
refactor: use new tr_variant API in tr_session ( #6006 )
2023-09-16 08:23:35 -05:00
Charles Kerr
ebb1b775af
refactor: public tr_session settings API now returns tr_variants ( #5983 )
2023-09-07 19:05:16 -05:00
Charles Kerr
fbfbfac3ae
fix: minor coverity warnings ( #5916 )
...
* fix: unchecked return value from tr_variantDictFindInt()
coverity 1541113
* fix: unchecked return value from tr_variantDictFindBool()
coverity 1541112
* fix: copy-instead-of-move in tr_strlower()
coverity 1541092
* fix: use auto& instead of auto in test
coverity 1541084
* fix: logically dead code
coverity 1541065
* fix: copy-instead-of-move in tr_announcer_impl::addTorrent()
coverity 1541062
* fix: unchecked return value of tr_variantDictFindInt()
coverity 1541061
* fix: copy-instead-of-move in FilterBar::Impl::tracker_filter_model_update()
coverity 1541058
* fix: copy-instead-of-move in gtr_window_on_close()
* fix: silence invalid resource leak warning
coverity 1520595
* fix: unchecked return value from setsockopt()
coverity 1518345
* fix: dereference after null check (FORWARD_NULL)
coverity 1517816
2023-08-21 21:59:47 -05:00
Charles Kerr
5837603b6f
refactor: make tr_variant follow RAII ( #5923 )
2023-08-20 23:15:23 -05:00
Charles Kerr
a4d205612a
refactor: add tr_variant_serde ( #5903 )
2023-08-17 11:02:45 -05:00
Mike Gelfand
586cff9506
Switch to list view for torrents list (GTK 4) ( #5858 )
...
* Add compat operator* for RefPtr
* Rename `*_tree_view_*` button handling helpers to `*_item_view_*`
* Move torrent item colors to CSS
* Switch to list view for torrents list (GTK 4)
* Bump Fedora image to 39 (current rawhide) for GTK 4.11
Enable deprecations as there're lots of them in 4.11 and I'm not keen on
fixing them all right now. Disable warnings as errors due to
-Warray-bounds issue somewhere in libfmt.
2023-08-06 04:26:29 +01:00
Charles Kerr
ea9fd64830
refactor: tr_compare_3way() ( #5799 )
2023-07-15 21:55:44 -05:00
Gary Elshaw
ff6617467e
fix: add missing tooltip for 'remove torrent' button ( #5777 )
2023-07-14 15:04:27 -05:00
Rafe S
9b0be18cb5
fix: missing #include in DetailsDialog.cc ( #5737 )
2023-07-07 10:22:27 -05:00
tearfur
2211086338
fix: conform to libcurl requirements to avoid memory leak ( #5702 )
2023-07-05 22:05:03 -05:00
Charles Kerr
8183d7fddf
refactor: utils naming ( #5696 )
...
* chore: rename tr_strvContains to tr_strv_contains
* chore: rename tr_strvStartsWith to tr_strv_starts_with
* chore: rename tr_strvEndsWith to tr_strv_ends_with
* chore: rename tr_strvSep to tr_strv_sep
* chore: rename tr_strvStrip to tr_strv_strip
* chore: rename tr_strvToBuf to tr_strv_to_buf
* refactor: rename tr_saveFile() to tr_file_save()
rename tr_loadFile() to tr_file_read()
rename tr_moveFile() to tr_file_move()
* refactor: rename tr_parseNum() to tr_num_parse()
refactor: rename tr_parseNumRange() to tr_num_parse_range()
* chore: group related functions together in header
2023-06-30 09:49:58 -05:00
Charles Kerr
ce66e5c442
iwyu: remove, add std headers where used ( #5694 )
...
* chore: remove unused #include <array>
* chore: remove unused #include <chrono>
* chore: remove unused #include <set>
* chore: remove unused #include <algorithm>
* chore: remove unused #include "interned-string.h"
* chore: remove unused #include <list>
* chore: remove unused #include <optional>
* chore: iwyu <cstddef>
* chore: iwyu <ctime>
* chore: remove unused #include <cerrno>
* chore: remove unused #include <deque>
* chore: remove unused #include <vector>
* chore: remove unused #include <memory>
* chore: remove unused #include <unordered_set>
* chore: remove unused #include <array>
* chore: remove unused #include <mutex>
* chore: remove unused #include <functional>
* chore: remove unused #include <cmath>
2023-06-29 23:51:55 -05:00
Charles Kerr
22bb9e5757
refactor: rename tr_dirSpace() to tr_sys_path_capacity() ( #5689 )
2023-06-29 10:23:00 -05:00
kramo
46dac775e0
Update GTK screenshot ( #5660 )
2023-06-23 14:50:07 -05:00
tearfur
41cfdce6fd
refactor: replace some C idioms with C++ ones ( #5656 )
...
* tidy up legecy practices
* remove undefined std::ignore usage
* avoid extra function stack level in daemon.cc
2023-06-22 17:58:16 -05:00
Charles Kerr
fd583ac878
deps: bump libfmt to v10.0.0 ( #5635 )
...
seems to be semver/minor safe for our API use
Fixes #5511 .
Possibly fixes #5627 .
2023-06-18 17:36:39 -05:00
Charles Kerr
c61d8b7cf7
refactor: rename tr_tracker_view.host to .host_and_port for clarity ( #5508 )
2023-05-08 20:28:10 -05:00
Will Thompson
dd22b52bbf
GTK: Improve appstream metainfo ( #5407 )
...
* gtk: Add release history to metainfo file
This is mandatory on Flathub (and possibly other software repositories).
On each new release, a <release> element should be prepended to this
list.
Ideally each <release> would include (translatable) release notes, but
this is the bare minimum.
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-releases
https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Releases.html
* gtk: Add more URLs to AppStream metainfo
This covers all the URL types from the AppStream specification.
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-url
* gtk: Add translation info to AppStream metainfo
This allows information about per-language translation percentages to be
extracted at build-time and included in the repository's appstream file.
Software centres such as GNOME Software use this to indicate to the user
whether the app is translated into their language.
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-translation
2023-05-07 13:02:49 -05:00
Charles Kerr
0d3b321bac
refactor: use snake_case for libtransmission class methods ( #5497 )
2023-05-05 23:11:05 -05:00
Mike Gelfand
e8fcb025a0
fix: use user-preferred locale ( #5444 )
...
* Use user-preferred locale
Previous fix adding `L` format specifier was correct but only fixed half
of the problem, as C++ locale is set up to be "C" by default. GTK client
used to call `setlocale(LC_ALL, "")` to set up user-preferred locale
which only affected C functions and `std::locale` (used by libfmt) was
unaware of those changes.
Apply the fix to all the binaries since they're all doing some sort of
output to the user and calling libtransmission helpers, as well as using
libfmt directly.
* Improve libtransmission's json-test
Set the locale C++ way to avoid any sort of inconsistencies, and also
restore it to the old one once finished testing.
* Improve transmission-show test runner script
Quote outputs to avoid CMake error about `message()` being called with
no arguments. Capture stderr to the same output file. Fallback to `git
diff` if `diff` wasn't found. A few other minor changes.
2023-04-27 09:10:33 -05:00
Charles Kerr
1b6b85989c
feat: add generic favicon_cache class for reuse between Qt, GTK app ( #5294 )
2023-04-22 21:11:16 -05:00
Charles Kerr
a8e01ac38d
fix: minor warnings ( #5409 )
...
* chore: fix readability-qualified-auto warnings
* chore: fix clang-analyzer-core.uninitialized.Branch warning
* fix: collision of key 'ERROR' in transmission-qt
* chore: silence -Wshadow warning
* chore: silence warning C4100: 'iter': unreferenced formal parameter
* chore: fix warning C4127: conditional expression is constant warning
2023-04-17 23:11:09 -05:00
Charles Kerr
7d86d67bc7
chore: prefer fmt/core.h over fmt/format.h ( #5404 )
2023-04-16 15:34:19 -05:00
lawrence
23c248a5e9
fix: restore accidentally-deleted copyright notice ( #5372 )
...
Co-authored-by: lawrence <anonymous@null.null>
2023-04-12 13:03:00 -05:00
Gary Elshaw
1c64bdd352
fix: in prefs, reduce tracker list height to fit on small displays
2023-04-09 22:08:35 -05:00
Charles Kerr
47e141563a
fixup: address 5258 code review ( #5295 )
2023-03-27 11:04:10 -05:00
Charles Kerr
9fc0e4ff61
fix: disable-deprecated by default for end users ( #5289 )
...
deprecations can be turned on manually and are auto-enabled in CI
2023-03-24 13:34:30 -05:00
Charles Kerr
a2bece2682
fix: GTK client prefs window too large for small displays ( #5276 )
2023-03-22 10:51:05 -05:00
Charles Kerr
bfa62f6116
fix: handle DELETE_EVENT in create-torrent GTK dialog code ( #5180 )
2023-03-09 15:01:22 -06:00
Mike Gelfand
20071149c3
fix: split current and initially requested minimized state ( #5175 )
2023-03-07 21:07:23 -06:00
Mike Gelfand
9f2040d093
Only show/hide top-level windows on systray action ( #4939 )
2023-02-18 16:09:35 +00:00
Mike Gelfand
605c6bd031
Store percents as integer, with 2 digits of precision ( #4933 )
...
* Store percents as integer, with 2 digits of precision
* Fix GHA builds for Mac (missing pkg-config)
* Fix percents formatting
2023-02-18 01:14:01 +00:00
Charles Kerr
affb69e395
fix: awkward grammar in details dialog running-time display ( #4898 )
2023-02-15 06:19:57 -06:00
Mike Gelfand
25b50a7dff
fix: adjust `Glib::ustring` creation in a few places ( #4859 )
...
From what I observed, ctor accepting `(begin, end)` is getting called
instead of one accepting `(data, size)` for no apparent reason in some
cases. Switch to a ctor accepting a `std::string` in those problematic
places.
2023-02-13 11:16:15 -06:00
Julien
4b8cfa2e57
chore: update copyrights to 2023 ( #4834 )
2023-02-11 14:49:42 -06:00
Mike Gelfand
b85f85d3f9
Fix blurry progress bars in main window (GTK client) ( #4756 )
...
* Fix blurry progress bars in main window (GTK client)
Create surfaces similar to those provided by GTK, which includes similar
scale factor.
* Minor simplification to avoid needless macro use
2023-02-09 11:02:39 +00:00
Mike Gelfand
fbb98ada4a
Fix issues reported by `hicpp` clang-tidy checks (GTK client) ( #4711 )
...
* Fix `hicpp-vararg` clang-tidy issues
* Fix `hicpp-explicit-conversions` clang-tidy issues
* Fix `hicpp-signed-bitwise` clang-tidy issues
* Enable the rest of `hicpp` clang-tidy checks
2023-02-03 16:12:48 +00:00
Mike Gelfand
c4f4d3d45d
Fix torrents count label update ( #4694 )
2023-01-30 23:25:23 +00:00
Mike Gelfand
e775de01bd
Simplify progress bars coloring (GTK client) ( #4688 )
...
I remember seeing better results when adding background during hue
adjustment, but can't clearly see the difference now. Since using
`DEST_OVER` Cairo operator results in crashes on some systems, don't
bother with the background, hopefully still getting acceptable results.
2023-01-29 23:20:28 +00:00
Mike Gelfand
0da0a55259
Destroy message dialog on error ( #3805 regression) ( #4625 )
2023-01-21 15:56:38 +00:00
Mike Gelfand
bd72b8c3fc
Fix clang-tidy issues stemming from header files (GTK client) ( #4623 )
...
* Fix `readability-avoid-const-params-in-decls` clang-tidy issues
* Fix `bugprone-macro-parentheses` clang-tidy issues
* Fix `modernize-use-using` clang-tidy issues
* Fix `readability-named-parameter` clang-tidy issues
* Fix `cppcoreguidelines-owning-memory` clang-tidy issues
* Fix `cppcoreguidelines-special-member-functions` clang-tidy issues
* Fix `cppcoreguidelines-macro-usage` clang-tidy issues
* Fix `modernize-use-nodiscard` clang-tidy issues
* Fix `cppcoreguidelines-macro-usage` clang-tidy issues
* Add headers filter for /gtk/ subdirectory
2023-01-21 12:06:20 +00:00
Mike Gelfand
fa091495d6
Refactor sorting and filtering compatibility code (GTK client) ( #4558 )
...
* Refactor sorting and filtering compatibility code
Factor out parts of `TorrentFilter` and `TorrentSorter` classes into
reusable `FilterBase<>` and `SorterBase<>` templates.
Factor out filter and sort models setup from `FilterBar` and `Session`
classes into reusable `FilterListModel<>` and `SortListModel<>`
templates.
* Remove unused lambda capture (Clang build failure)
2023-01-08 15:31:03 +00:00