* Do not remove torrent if trashing files failed.
Instead, stop the torrent and sets an error.
* Fixing GTK interface with new file removal behavior.
* C++17 compliant.
* Reverting unrelated change.
* Avoiding allocating unecessary objects.
* Easy review fixes.
* Fixing merge error.
* Adding result callback to tr_torrentRemove().
Using the new callback in Gtk GUI to decide when to remove it from the
interface.
* Reducing indentation level and making the function more readable.
* Using existing Session RefPtr.
* Notifying the client before freeing the torrent in the session.
* Addressing comments and synchronizing callback.
* Moving include.
* Fix constness issue reported by clang-tidy
* fix: specify `port-test` ip protocol in response when possible
* feat: IPv4 and IPv6 port test in Qt Client
* feat: shorten timeout of `port-test`
* feat: IPv4 and IPv6 port test in Gtk Client
* chore: housekeeping
* refactor: remove IP protocol error message
* code review: mikedld gtk
* feat: return tag in qt rpc response
* code review: mikedld qt
* feat: move port test button up alongside spin button
* fixup! code review: mikedld gtk
* fixup! code review: mikedld qt
* code review: port status initial text
* feat: decouple ipv4 and ipv6 status updates (GTK)
* feat: decouple ipv4 and ipv6 status updates (Qt)
* code review: unknown protocols are non-pending
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* code review: simplify status text when the statuses are the same
* Revert "feat: return tag in qt rpc response"
This reverts commit 2a022c2bb0ee7ddad81f8176839cf0d043422368.
* code review: add translation context for status text (GTK)
* code review: move `port_test_pending_` to `Impl` (GTK)
* fixup! code review: move `port_test_pending_` to `Impl` (GTK)
---------
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* refactor: tr_rpc_request_exec_json takes a std::function callback
* refactor: tr_rpc_request_exec_json callback takes a tr_variant&&
* refactor: use new tr_variant API in rpcimpl.cc
* refactor: tr_rpc_request_exec_json() now takes a const& to the request
* fixup! refactor: use new tr_variant API in rpcimpl.cc
* chore: rename function to tr_rpc_request_exec()
* chore: remove unused DetailsDialog::Impl::build_torrent_ids_variant_list()
* refactor: minor copyediting in rpcimpl.cc getTorrents()
* refactor: split handler methods between sync, async
* refactor: remove unused args_out param from AsyncHandlers
* chore: fix new readability-inconsistent-declaration-parameter-name warning
* 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.
* 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)
* 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 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.
* 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.
In GLIB 2.68+ `Glib::RefPtr<>` is an alias for `std::shared_ptr<>` which
has no idea about GLIB's reference counting, thus destroying the object
instead of unreferencing it. Use `Glib::make_refptr_for_instance()` to
construct the smart pointer which passes in a custom reference-aware
deleter for us.
Fixes: #3954
* 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
* build: rename GTK_MINIMUM, etc as GTKMM_MINIMUM in CMakeLists
* build: bump glibmm depdency min version to 2.60.0
https://github.com/transmission/transmission/issues/3846\#issuecomment-1263782526
for extraclassinit.h
* build: fix duplicated version number for deflate dependency
* build: sort dependency list in CMakeLists.txt
no functional changes, just housekeeping
* refactor: remove gtr_get_ptr()
* Revert "refactor: remove tr_sessionGetConfigDir() (#3506)"
This reverts commit c50da43ae0.
* Revert "fix: do not leak in tr_getWebClientDir() (#3502)"
This reverts commit 5a75e37033.
* refactor: use semantic type tr_torrent_type_t in libtransmission
* refactor: use semantic type tr_torrent_type_t in gtk client
* refactor: use semantic type tr_torrent_type_t in qt client