* 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.
* 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
* 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.
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.
* 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
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.
* 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)
* Use imported CMake target for CURL
* Use imported CMake target for fmtlib
* Use imported CMake target for WideInteger
* Use imported CMake target for FastFloat
* Use imported CMake target for UtfCpp
* Use imported CMake target for Threads
* Use imported CMake target for Iconv
* Use imported CMake target for crypto backend
* Use imported CMake target for GTK
* Use imported CMake target for Qt
* Use imported CMake target for deflate
* Use imported CMake target for libevent
* Use imported CMake target for natpmp
* Use imported CMake target for miniupnpc
* Use imported CMake target for dht
* Use imported CMake target for psl
* Use imported CMake target for libutp
* Use imported CMake target for libb64
* Use include directories from libtransmission target
* Reformat CMake code
* Bump minimum CMake version to 3.12
* Add target sources separately via `target_source()`
* Make `tr_win32_app_info()` add target sources on its own
* Don't use `include_directories()`
* Don't use `add_definitions()`
* Limit use of `add_compile_options()`
* Move VDKQueue target declaration to a subdirectory
* Add `tr_disable_source_files_compile()` helper
* Add `tr_target_glib_resources()` helper
* Add `tr_gettext_msgfmt()` helper
* Enable AUTOUIC for Qt client
* Enable AUTORCC for Qt client
* Remove AUTO{MOC,RCC,UIC} source group overrides
* Add `tr_target_idl_files()` helper
* Move source group setup to `tr_qt_add_translation()`
* Add `tr_target_xib_files()` helper
* Prefer `target_sources()` to intermediate variables
* Use explicit visibility versions of `target_*()` commands
* Prefer genexes to conditions in `target_*()` commands
* Add `tr_allow_compile_if()` helper
* Leave only top-level `project()`, remove the rest
* Minor fixups
* Fixup Mac QL plugin install
* Fixup IDE target folders and source groups
* Move GTK compatibility macros into a separate header
* Fix Cairo compatibility checks
* Move Glib-namespaced definitions to GtkCompat header
* Remove unused stringify definitions since we're using fmtlib
* Automatically (re)order include directives (GTK client)
Include our headers first to ease IWYU enforcement.
* Fix includes missing from headers (GTK client)
* Fix build on Mac after includes reordering
* Use `Gio::List{Model,Store}` for torrents
Switch from `Gtk::{TreeModel,ListStore}` in preparation for cell
renderers deprecation in GTK 4.10. That will require switching to the
new view classes (`Gtk::{Column,List}View`) which only work with `Gio`
models. Implement an adapter to support GTK+ 3 where the old view class
(`Gtk::TreeView`) only works with `Gtk` models; it is effective enough
but requires a signal connection per item to notify on row changes.
Refactor filtering and sorting (which now happen over the new model) to
use compatible `Gtk::Filter` and `Gtk::Sorter` classes. Although these
classes are only present in GTK 4, the abstraction is suitable for GTK+
3 as well so make our subclasses work for both versions.
Since items (of `Torrent` class) of the new model provide only a very
limited (by design) layer of compatibility with GTK+ 3 way of doing
things, refactor selection handling to do it the new way. Move selection
helpers into `MainWindow` to abstract them away since new view classes
handle it differently.
* Improve session load performance based on profiling results
Make it behave [almost] the same way port test works: display update
status and final result in the label below the URL entry. The only
difference is that label returns to its usual mode showing total number
of rules after a while once update is finished; could probably have
done it differently but decided against it to avoid affecting
translations.
This regressed with the switch to `Gtk::Builder` because the dialog was
non-modal before.
This is the cause of the issue with blocklist update status dialog: it
seems that if there's a modal dialog running, showing another non-modal
dialog will make it inaccessible to the user until the first dialog is
closed thus leaving the modal mode.
Defaults to `OFF`. Downstream packagers are advised against enabling it
as we can't guarantee it working on every possible configuration.
Added the actual compile flag in the GTK client subdirectory and not
the top-level CMakeLists.txt file due to other subprojects not being
ready.
Fixed the only GTK client warning reported by Clang on Mac.
This is applicable to any signals where emitter's lifetime isn't
controlled by the receiver.
There're still about 7 `Glib::signal_idle()` connections which aren't
tracked but I see the possibility of it leading to major issues as quite
low.