Commit Graph

1919 Commits

Author SHA1 Message Date
Mike Gelfand 3c8d8488ea
Run GTK dialogs in non-blocking fashion (#3805)
GTK 4 drops blocking `run()` method for dialogs. Switch to non-blocking
`show()` to support both GTK 3 and 4.
2022-09-10 21:15:01 +03:00
Mike Gelfand 9f0fbb38ec
Support change to enum definitions in gtkmm/glibmm/pangomm (#3801)
Newer versions (gtkmm 4 and its dependencies) of these libraries have
switched from enums to enum classes. Wrap the names with macros to
support both.
2022-09-10 16:19:54 +03:00
Dmitry Antipov ad125edea9
fix Wsuggest-override clang-16 warnings (#3795) 2022-09-09 07:34:28 -05:00
Mike Gelfand 99e750229c
Switch from `Gtk::Menu` to `Gio::Menu` for status bar menus (#3789)
* Switch from `Gtk::Menu` to `Gio::Menu` for status bar menus

* Improve compatibility with GTK 4 which has `get_action_group` removed
2022-09-08 19:58:28 +03:00
Mike Gelfand b41501eeb8
Switch to Gtk::Builder for all UI in GTK client (#3781)
* 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.
2022-09-08 01:25:04 +03:00
orbital-mango 488d4a993f
GTK: increase torrent piece size limit as per #3402 (#3771) 2022-09-06 08:43:27 -05:00
Mike Gelfand 02af4c2982
Don't crash when hiding top-level windows (#3757)
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.
2022-09-04 16:52:35 +03:00
bexnoss 5782847601
fix(gtk): send key events directly to widgets (#3720)
The default behavior is to send them to the window first to activate
mnemonics and accelerators. Some accelerators conflict with text
selection hotkeys (like CTRL+A to select all torrents), this fixes that
conflict.
2022-09-02 11:21:43 -05:00
Charles Kerr 072bb0322c
refactor: remove tr_quark_get_string() (#3728) 2022-08-28 16:17:07 -05:00
Charles Kerr 6e44adabf1
Revert "fix(gtk): fix conflicting hotkeys (#2201)" (#3718)
This reverts commit a0305a3a12.
2022-08-26 19:45:46 -05:00
Mike Gelfand ccae3d7ccd
Fix GTK client crash opening message log containing errors (#3711)
`Glib::ustring::sprintf()` doesn't support formatting `std::string_view`.
Use `fmt::format()` instead.

Broken in #3626 (7c5862a5f5).
2022-08-26 01:51:13 +01:00
bexnoss 258faf3623
gtk: Remember 4 recent relocate dirs (#3691)
* 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
2022-08-21 21:26:13 -05:00
bexnoss a0305a3a12
fix(gtk): fix conflicting hotkeys (#2201)
The torrent list hotkeys include `CTR + A` and were always active,
swallowing text edit hotkeys in the filter entry.
Now they are only active when the torrent list is focused.
2022-08-21 17:09:01 -05:00
lucaxvi 74d2f1a2d6
refactor(gtk): use symbolic icons in status bar (#3655) 2022-08-18 11:15:27 -05:00
Charles Kerr 76a7994eef
refactor: remove tr_free() (#3668) 2022-08-18 09:14:12 -05:00
Charles Kerr bfec98c323
refactor: avoid tr_new() in transmission-remote (#3665) 2022-08-17 20:25:42 -05:00
Charles Kerr 29f57bc296
chore: iwyu headers (#3661) 2022-08-17 11:08:36 -05:00
Charles Kerr e49747ab51
feat: add tr_strvToBuf() (#3657)
* feat: add tr_getDefaultConfigDirToBuf()

* feat: add tr_getDefaultDownloadDirToBuf()

* feat: add tr_strvToBuf()

* feat: add tr_torrentFindFileToBuf()

* feat: add tr_torrentGetMagnetLinkToBuf()

* refactor: remove unused makeString() from tests

* feat: add tr_torrentFilenameToBuf()

* feat: add tr_torrentGetTrackerListToBuf()

* chore: remove obsolete comment references to tr_free

* chore: remove unused tr_strdup()

* chore: remove unused forward declarations
2022-08-16 19:28:57 -05:00
Charles Kerr c7466b3ff4
fix: coverity warnings (#3632)
* fix: uninitialized field natpmp

* fix: unchecked downcast result

* fix: potential tr_error leak

* fix: potential tr_error leak

* fix: potential tr_error leak

* fix: potential nullptr dereference in test fixtures

* fix: handshake fields not initialized in constructor

* chore: cast unchecked return value to void

* chore: cast unchecked return value to void

* chore: cast unchecked return value to void

* chore: make single-arg constructors explicit

* fix: code smell make variable a pointer-to-const

* fix: code smell make variable a pointer-to-const

* chore: make single-arg constructors explicit

* chore: silence sonarcloud false warning on commented-out-code

* chore: fix code smell use std::array

* chore: make EvTimer::handleTimer() const

* chore: mark tr_bandwidth remove_child as noexcept
2022-08-13 12:11:07 -05:00
Charles Kerr 7c5862a5f5
refactor: remove tr_new, tr_free pt. 1 (#3626)
* refactor: tr_torrentGetMetadataPiece() returns an optional vector

* refactor: use tr_pathbuf in create_temp_path()

* refactor: use tr_pathbuf in win32 create_temp_path()

* refactor: use std::vector in isPeerInteresting()

* refactor: remove tr_new0 from tr_peerMgrPeerStats()

* refactor: remove tr_new0 from rechokeUploads()

* refactor: silence clang nullptr dereference warning

* refactor: make tr_natpmp a C++ class

* refactor: use std::string in tr_log_message
2022-08-11 19:59:58 -05:00
Charles Kerr 83ffa6bf1b
chore: fix spdx abbreviations (#3602) 2022-08-08 13:05:39 -05:00
Charles Kerr 90f08f4fa1
refactor: fix recent sonarcloud warnings (#3593) 2022-08-05 20:37:21 -05:00
Charles Kerr 3ed6b187bb
refactor: iwyu utils.h (#3583) 2022-08-04 08:44:18 -05:00
Charles Kerr bf8f72e61f
refactor: tr_metainfo_builder() (#3565) 2022-08-02 14:46:08 -05:00
Noobsai bc834b84a3
fix: use correct variable for uploading speed (#3560) 2022-08-01 09:34:30 -05:00
Charles Kerr 9c7fcf85cf
refactor: tr_stats (#3542) 2022-07-28 18:56:40 -05:00
Charles Kerr b889f0c395
chore: iwyu cstring, cstdlib, optional, unordered_set (#3532) 2022-07-27 16:53:39 -05:00
Charles Kerr 1a0afbe95e
refactor: iwyu (#3525) 2022-07-25 21:45:54 -05:00
Charles Kerr 47fe7c47d2
refactor: replace per-torrent callbacks with per-session ones. (#3495) 2022-07-23 01:04:34 -05:00
Charles Kerr 445aad56a0
test: add platform tests (#3514)
* test: add tr_getDefaultDownloadDir() tests

this also indirectly tests xdg and homedir

* test: add PlatformTest.defaultConfigDirEnv

* test: add PlatformTest.defaultConfigDirXdgConfig

test: add PlatformTest.defaultConfigDirXdgConfigHome

* test: add PlatformTest.webClientDirEnvClutch

test: add PlatformTest.webClientDirEnvTr

test: add PlatformTest.webClientDirXdgDataHome

* fixup! test: add PlatformTest.webClientDirEnvClutch

fix: win32 breakage
2022-07-22 20:10:02 -05:00
Charles Kerr 0da1cbb6ec
fix: 3508 location invalidation (#3511)
* Revert "refactor: remove tr_sessionGetConfigDir() (#3506)"

This reverts commit c50da43ae0.

* Revert "fix: do not leak in tr_getWebClientDir() (#3502)"

This reverts commit 5a75e37033.
2022-07-22 00:52:48 -05:00
Charles Kerr c50da43ae0
refactor: remove tr_sessionGetConfigDir() (#3506)
* refactor: remove tr_sessionGetConfigDir() from GTK client

* refactor: remove tr_sessionGetConfigDir() from daemon

* refactor: remove tr_sessionGetConfigDir()

* refactor: remove tr_getTorrentDir()

* fixup! refactor: remove tr_sessionGetConfigDir()
2022-07-21 20:12:45 -05:00
David Miguel Susano Pinto f8b3514c0e
tr_makeMetaInfo: new anonymize option (closes #3420) (#3452) 2022-07-19 16:48:24 -05:00
Charles Kerr 3f07838be8
fixup! refactor: use fmt to build the GTK client's user-visible strings (#2788) (#3469)
fix: invalid fmt type when downloading metadata
2022-07-18 10:33:11 -05:00
Gary Elshaw 46874dff91
Keep the GTK icon and ico files consistent (#3457)
* GTK ico

Restoring the more contemporary GTK icon makes some sense after being in GTK for the last while. Current 3.0 builds in flatpak, snap etc are using it, and having the client and tray match seems right.

* Updated the svg -> ico conversion method for better scaling
2022-07-16 14:10:42 -05:00
Gary Elshaw 0c9ca9ac30
Body text changes (#3431)
While i'm in Manjaro Linux and working on the GTK client for a little while, i noticed Linux wasn't included as a platform in the file, and the repetition of frontend and backend was annoying me.

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-07-10 23:16:35 -05:00
Charles Kerr 36b70ed137
refactor: use svg icons in GTK client (#3395) 2022-07-03 17:14:13 -05:00
Charles Kerr 88a3149ce4
refactor: add tr_peer.activeReqCount() (#3373)
rename peer_stats.pendingReqs to .activeReqs for consistency
2022-06-28 20:48:39 -05:00
Dzmitry Neviadomski 534f9f7bc1
Update Copyright Year to 2022. (#3352) 2022-06-28 09:07:12 -05:00
FX Coudert b893289392
Rename Mac OS X to macOS (#3362) 2022-06-27 15:28:37 -05:00
Charles Kerr 25fdb5805c
refactor: use tr_torrent_id_t (#3314)
* 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
2022-06-17 10:43:04 -05:00
Charles Kerr b85edf8d0f
fix: add i18n options for past tense, future tense time (#3245) 2022-06-14 21:56:27 -05:00
Balázs Meskó 0df6c23c7b
fix: mark non-c-strings for gettext i18n (#3210) 2022-06-08 01:04:17 -05:00
orbital-mango 49b62319c3
feature: add missing accelerators for File menu (GTK) (#3213) 2022-06-07 12:17:35 -05:00
Charles Kerr 2ff4041074
fixup! fix: coverity warnings (#3168) (#3193) 2022-06-04 11:33:03 -05:00
orbital-mango 12bf2896b6
feature: add piece size selection on torrent creation (GTK) (#3145) 2022-06-01 09:11:30 -05:00
Charles Kerr 84d65d8e61
fix: coverity warnings (#3168)
* fix: uninitialized peer_atom field

* fix: silence inaccurate open-files-test warning

* fix: assertion-is-always-true

asserting unsigned val is >= 0

* fix: unnecessary nullptr check

* fix: nullptr dereference warning
2022-05-31 18:58:20 -05:00
orbital-mango b4624cc775
fix: GTK file list size and progress % regression (#3127) 2022-05-25 13:27:33 -05:00
Gary Elshaw de4148a697
chore: update GTK client icon to match Big Sur icon 2022-05-24 19:04:56 -05:00
orbital-mango 0f29958751
Show torrent added date/time in details dialog (GTK). (#3124)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-05-23 11:09:21 -05:00