* refactor: initialize libtransmission::Values units in Application::initUnits()
* refactor: use libtransmission::Values instead of Formatter::unitStr()
* refactor: remove Formatter::Size, Formatter:Type
* refactor: use Values::Config to init units in transmission-qt
* refactor: use Values::Config to init units in transmission-mac
* chore: remove unused tr_formatter_foo_init() functions
* chore: make Value::operator+() const
* use Values::Speed, Values::Storage in GTK client
* chore: use snake_case for Formatter methods
* refactor: use Values::Speed in GTK client details dialog
* feat: add Values::Value::is_zero()
* refactor: remove unnecessary UTF8String calls
* 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
* 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
* 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
View-relative coordinates were treated as bin window-relative, leading to
incorrect selected item calculation.
Broken since the introduction of GTK 4 support in #3916.
* Fix `readability-container-data-pointer` clang-tidy issues
* Fix `readability-container-size-empty` clang-tidy issues
* Fix `readability-isolate-declaration` clang-tidy issues
* Fix `readability-convert-member-functions-to-static` clang-tidy issues
* Fix `readability-else-after-return` clang-tidy issues
* Fix `readability-redundant-member-init` clang-tidy issues
* Fix `readability-uppercase-literal-suffix` clang-tidy issues
* Fix `readability-make-member-function-const` clang-tidy issues
* Fix `readability-simplify-boolean-expr` clang-tidy issues
* Fix `readability-qualified-auto` clang-tidy issues
* Fix `readability-avoid-const-params-in-decls` clang-tidy issues
* Fix `readability-implicit-bool-conversion` clang-tidy issues
* Fix `readability-inconsistent-declaration-parameter-name` clang-tidy issues
* Add initial .clang-tidy configuration
Currently enabling readability checks only, others to follow. Of the
four disabled readability checks, three (function-cognitive-complexity,
identifier-length, magic-numbers) require extensive refactoring and were
left for later, and one (redundant-access-specifiers) is not planned to
be fixed due to the current coding style - using extra sections to
separate methods from variables of the same visibility.
* Make compact mode switch work for both GTK 3 and 4
* Implement GTK 4-specific view gesture handling
* Fix torrents view context menu on GTK 4
* Explicitly show/hide menubar on startup/teardown
* Switch from `Gtk::Pixbuf` to `Gio::Icon` for views
* Support GTK 4 exceptions based on `std::exception`
* Fix options menu setup with GTK 4
* Use `delete-event` (GTK 3) and `close-request` (GTK 4) signals to handle window clousure
* Add custom file chooser button implementation
GTK 4 drops FileChooserButton widget and suggests implementing it using
Button.
* Add helpers to set X11 hints with GTK 4
* Remove `HigWorkarea` class that's no longer used
* Make main menu shortcuts work with GTK 4
* Make drops work in main window and make dialog with GTK 4
* Remove unused `gtr_action_get_widget()` helper
* Fix text direction mark setup with GTK 4 (due to switch to enum class)
* Fix file tree font size calculation with GTK 4
* Fix crash during shutdown with GTK 4
* Switch from `RadioButton` to `CheckButton` for compatibility with GTK 4
* Fix opening files with GTK 4
* Rework torrent cell renderer to support both GTK 3 and 4
* Disable system tray icon support with GTK 4
* Fix windows positioning with GTK 4
* Fix focus event handling with GTK 4
* Adapt to tree model row/iterator changes in GTK 4
* Adapt to toplevel/root window changes in GTK 4
* Adapt to clipboard changes in GTK 4
* Adapt to icon/theme changes in GTK 4
* Adapt to file/path changes in GTK 4
* Random leftover fixes for GTK 4 compatibility
* Clean up unused code
* Move GTK 3 *.ui files into a subdirectory
* Add GTK 4 *.ui files
* Search for both GTK 3 and 4 during configuration
* Move CSS definitions to resources
* Add Gtk::Builder helpers
* Switch StatsDialog to Gtk::Builder
* Switch RelocateDialog to Gtk::Builder
* Switch OptionsDialog to Gtk::Builder
* Switch MakeDialog to Gtk::Builder
* Switch FilterBar to Gtk::Builder
* Switch MainWindow to Gtk::Builder
* Switch MessageLogWindow to Gtk::Builder
* Switch DetailsDialog to Gtk::Builder
* Switch PrefsDialog to Gtk::Builder
* Fixup translatable strings
Since this branch was brewing for a while, changes happened in the meantime.
Current window management approach results in secondary windows being
destroyed once they are hidden. Since those windows are managed by
`std::unique_ptr<>`, we can't just [temporarily] increase their refcount
to avoid use-after-free situation, so retrieve updated top-level windows
list every time we hide one instead.
* fix(gtk): prevent duplicate shortcut folders
This prevents duplicates if the recent destination is also a system
shortcut folder.
* refactor(gtk): create gtr_get_recent_dirs helper
* feat(gtk): remember 4 recent relocate dirs
* refactor: use fmt in gtk/SystemIconTray
* refactor: use fmt in gtk/MakeDialog
* refactor: remove unused tr_strip_positional_args()
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
* refactor: do not use va_arg in peer-msgs.cc
* refactor: do not use va_arg in platform.cc
* build: enable cert-dcl50-cpp clang-tidy warning
* refactor: use some tr_pathbuf where sensible
* refactor: make this variable const
* refactor: replace redundant type with auto
* refactor: use the nullptr literal
* refactor: replace declaration by structured binding declaration
* refactor: prefer constexpr over enum for GUI_PAD values
* refactor: prefer constexpr over enum for PrefsDialog values
* refactor: prefer constexpr over enum for StatsDialog values
* refactor: use enum class for GtrUnicode types
* refactor: prefer constexpr over enum for BT peer msg codes
* refactor: use enum class for TrMakemetaResult
* refactor: prefer constexpr over enum for BT metadata message types
* refactor: use enum class for AwaitingBt
* refactor: use enum class for EncryptionPreference
* refactor: use enum class for TrFormat in rpcimpl
* refactor: prefer constexpr over enum for QApp intervals
* refactor: prefer constexpr over enum for tr_resume bitfields
* refactor: prefer constexpr over enum for Qt/TrFileModel bitfields
* refactor: remove obsolete TODO comment in announce-list