1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 08:13:27 +00:00
Commit graph

13377 commits

Author SHA1 Message Date
Jakub Steiner
7b53f4238d
icon: update application icon (#1141)
Fixes https://github.com/transmission/transmission/issues/1140

Co-authored-by: Charles Kerr <ckerr@github.com>
2020-04-25 20:01:49 -05:00
Mitch Livingston
ac3ba03775
Merge pull request #1185 from transmission/revert-fileSystemRepresentation
Revert "Merge pull request #1039 from MaddTheSane/patch-4"
2020-04-25 10:44:08 -04:00
Mitchell Livingston
470ee010f2 Revert "Merge pull request #1039 from MaddTheSane/patch-4"
This reverts commit c0c463d660, reversing
changes made to cd2587a435.
2020-04-25 10:35:15 -04:00
Akatsuki
f6030b1d79
gtk: fix window width (#1069)
GTK window width cannot be smaller than the longest torrent title

Source: https://trac.transmissionbt.com/ticket/6128

Co-authored-by: Charles Kerr <ckerr@github.com>
2020-04-24 15:15:57 -05:00
Mitch Livingston
c0c463d660
Merge pull request #1039 from MaddTheSane/patch-4
Replace some instances of -UTF8String with -fileSystemRepresentation
2020-04-20 09:01:01 -04:00
Mitch Livingston
3c56953dac
Merge branch 'master' into patch-4 2020-04-20 08:21:23 -04:00
Mitch Livingston
cd2587a435
Merge pull request #885 from DevilDimon/dock_string_crash_fix
Ignore non-URL strings when opening URLs
2020-04-20 08:20:59 -04:00
Mitch Livingston
05c67c8a27
Merge branch 'master' into dock_string_crash_fix 2020-04-20 07:59:47 -04:00
Mitch Livingston
8a28db8c1f
Merge branch 'master' into patch-4 2020-04-20 07:55:12 -04:00
Charles Kerr
4daefce2e3 chore: set User-Agent and Peer-Id to version 3.00+ 2020-04-19 16:57:58 -05:00
Charles Kerr
6716bb160e chore: set User Agent and Peer Id for version 3.00 2020-04-19 16:57:36 -05:00
Mitch Livingston
36fba96f1f
Merge pull request #1177 from transmission/Progress-bar-colors
Update the progress bar colors in dark mode
2020-04-19 10:56:44 -04:00
Mitch Livingston
d8e8d89545
Merge branch 'master' into Progress-bar-colors 2020-04-19 10:18:08 -04:00
Mitch Livingston
7bfdf3854e
Merge pull request #1176 from transmission/progress-color
Fix the peer progress number in dark mode.
2020-04-19 09:58:04 -04:00
Mitchell Livingston
b1bdf8e54a Update the progress bar colors in dark mode 2020-04-19 09:40:20 -04:00
Mitchell Livingston
fc421b61cd Update PeerProgressIndicatorCell.m
Fix the peer progress number in dark mode.
2020-04-19 08:59:57 -04:00
Charles Kerr
a482100f0c chore: set User-Agent and Peer-Id to version 3.00+ 2020-04-18 17:39:04 -05:00
Charles Kerr
f1137d830d chore: set User Agent and Peer Id for version 3.00 2020-04-18 17:36:33 -05:00
Mitch Livingston
1b9973c5f0
Merge pull request #1174 from transmission/macos-year
Bump copyright to 2020
2020-04-18 15:44:03 -04:00
Mitchell Livingston
3fc90f389e Bump copyright to 2020 2020-04-18 15:18:02 -04:00
Mitch Livingston
80fd408bc5
Merge pull request #1173 from transmission/sparkle-1.23
Update Sparkle to 1.23.0
2020-04-18 11:36:18 -04:00
Mitchell Livingston
0f8f38b742 Update Sparkle to 1.23.0 2020-04-18 10:52:03 -04:00
Mike Gelfand
20119f006c
Fixup recent Qt client changes (#1107)
* Add EDIT_DATE torrent property declaration (Qt client)

Switch to static assertion to help avoid similar issues in the future.

* Only declare std::hash<QString> for Qt < 5.14

* Pass main window as context when connecting lambdas to torrents model signals (Qt client)

This helps to automatically disconnect from signals on main window
destruction. If not done, use after free is possible since main window is
destroyed before torrents model.

Fixes: #1106
2020-01-14 23:28:34 +02:00
Mitch Livingston
34b02bfe34
Merge pull request #927 from MaddTheSane/patch-1
Xcode project maintenance
2020-01-03 14:23:51 -05:00
Mitch Livingston
494589efa8
Merge branch 'master' into patch-1 2020-01-03 00:15:03 -05:00
Mitch Livingston
f041f229bf
Load the tracker icon on the main thread (#1086)
* Load the tracker icon on the main thread

* Call loadTrackerIcon: directly
2020-01-03 00:12:59 -05:00
Mitch Livingston
10dbe92780
Merge pull request #1085 from transmission/sparkle-1_22_0
Bump Sparkle to 1.22.0
2020-01-02 23:30:14 -05:00
Mitch Livingston
d59ac5a457
Merge branch 'master' into sparkle-1_22_0 2020-01-02 22:52:43 -05:00
Mitch Livingston
2decfff353
Merge branch 'master' into patch-1 2020-01-02 22:52:09 -05:00
Mike Gelfand
d2c2da4f40 Fix minor code style violation 2020-01-03 03:30:26 +03:00
Mike Gelfand
37e871b8b5 Update Uncrustify config to 0.70.1
Reduce `nl_(before|after)_class` from 2 to 1 to avoid needless newlines added
between class forward declarations (which is a shame, I liked the old behavior
more).
2020-01-03 03:21:50 +03:00
Mitch Livingston
7570a9b0ed
Merge branch 'master' into patch-1 2019-12-23 22:24:54 -05:00
Mitchell Livingston
1a9f5601c3 Set Sparkle framework as "Embed and Code" 2019-12-23 22:21:13 -05:00
Mitchell Livingston
1f5a9b35a1 Bump Sparkle to 1.22.0 2019-12-23 21:46:05 -05:00
Charles Kerr
44fc571a67
feat: add editDate to RPC (#1056)
* feat: add tr_stat.infoDate to note tr_info changes

The last time during this session that any tr_info field changed
(e.g. trackers/filenames edited or magnet torrent got metadata).
RPC clients can monitor this to know when to reload fields which
don't usually change.
2019-11-12 17:13:42 -06:00
Charles Kerr
c62cb35fd4
qt client speedups
* faster updating of trackers combobox.
* generate trackerDisplayNames just once per torrent
* refactor: cache torrent delegate's warning emblem
* refactor: change mainwin refresh debounce to 200ms
* refactor: do not store trackers, hosts in QVariant
* refactor: don't use `virtual` when it's not needed
* refactor: faster counting torrents-matching-filter
* refactor: faster tracker handling in filterbar
* refactor: improve json parser's prealloc heuristic
* refactor: make Torrent::hasError() faster
* refactor: remove redundant speed stats collection
* refactor: remove unnecessary tor->isQueued() calls
* refactor: use unordered containers where possible
* scale favicons only once, when adding to the cache
2019-11-11 19:37:05 -06:00
Charles Kerr
49fdd0b430
chore: update jsonsl parser snapshot (#1050)
source: https://github.com/mnunberg/jsonsl
2019-11-09 18:06:36 -06:00
Charles Kerr
96f76999aa
feat: add "table" format in torrent-get RPC (#1049)
* feat: add optional "format" arg to torrent-get RPC

If the "format" request was "objects" (default), "torrents" will be an
array of objects, each of which contains the key/value pairs matching
the request's "fields" arg. This is unchanged from previous versions.

If the format was "table", then "torrents" will be an array of arrays.
The first row holds the keys and each remaining row holds a torrent's
values for those keys. This format is more efficient in terms of JSON
generation and JSON parsing.
2019-11-09 17:02:23 -06:00
Charles Kerr
d857a5821a
refractor: simplify torrent model signal emissions (#1044)
refractor: simplify torrent model signal emissions

The Torrent->Application signal connections make up for about 5% of the
app's memory use. Move this to the TorrentModel so that there are only a
handful of signal connections.

Moving signals to TorrentModel means batch change signals can be emitted
instead of per-change-per-torrent emissions and can be handled that way.
2019-11-09 08:44:40 -06:00
Charles Kerr
4c79758dbc
refactor: debounce TorrentFilter prefs refiltering (#1027)
* refactor: debounce TorrentFilter prefs refiltering

When filter settings change, add a slight delay before refiltering. This
prevents the UI from freezing when the user is typing in the filterbar's
textfield.

Also fixes a long-standing wart that caused the model to be sorted twice
instead of just once whenever the filter text changed.
2019-11-06 19:13:41 -06:00
Charles Kerr
2cc5cfe3e3
feat: smart caching of TorrentDelegate::sizeHint() (#1026)
* feat: smart caching of TorrentDelegate::sizeHint()

* chore: bump c++ requirement to c++17 / c++1z
2019-11-06 18:17:48 -06:00
Charles Kerr
973afda057
refactor: keep torrent's time properties as time_t (#1042)
* refactor: keep torrent's time properties as time_t

Comparing QDateTimes is expensive. Keep the torrents' time properties in
the time_t form that we got them from RPG in; difftime() is cheaper.
2019-11-06 17:31:41 -06:00
Charles Kerr
aa9b752cd9
refactor: don't load the same stock more than once (#1041)
* refactor: don't load the same stock more than once

Some actions share an icon -- for example, "start all", "start now", and
"start" each use "media-playback-start". When this happens, get the icon
once and cache it to avoid hitting the disk more often than necessary.

In addition, the statusbar's network transfer icon was being reloaded in
a periodic upkeep timer, reloading with QIcon::fromTheme each time. Only
give icons are needed, so load them once and cache them.

* refactor: better lookup of torrent mime-type icons

filename-to-mime-type and mime-type-to-icon lookups are both expensive,
so do a better job of detecting top-level folders and caching the icons
based on file suffixes.

This also lets find a good mime icon even if the torrent doesn't have
its 'files' property populated yet from RPC.
2019-11-06 15:09:04 -06:00
Charles Kerr
edbdeae623
fix: use bash, not sh, for code_style.sh script (#1022)
The script uses "set -o", which doesn't exist in vanilla sh, causing
failure on systems that bind sh to dash rather than bash. This PR makes
the bash requirement explicit.
2019-11-06 13:47:54 -06:00
Charles Kerr
b0e33117c5
Fix some gtk warnings (#1038)
* fix gtk deprecation warning: gtk_misc_set_alignment

* fix gtk deprecation warning: gtk_alignment_new

* fix gtk deprecation warning: gtk_tree_view_set_rules_hint

* fix gtk deprecation warning: gtk_image_new_from_stock

* fixup! fix gtk deprecation warning: gtk_alignment_new

* fix gtk deprecation warning: gtk_dialog_set_alternative_button_order

* fix gtk deprecation warning: gtk_show_uri

* fix gtk deprecation warning: gtk_widget_set_margin_left

* fix gtk deprecation warning: gtk_button_set_alignment

* fix gtk deprecation warning: g_type_class_add_private

* fix gtk deprecation warning: gtk_menu_popup

* fix gtk deprecation warning: gtk_misc_set_padding

* chore: uncrustify

* fix: silence G_TYPE_INSTANCE_GET_PRIVATE warning

Deprecaed starting in glib 2.58

* chore: uncrustify
2019-11-06 13:09:27 -06:00
Charles Kerr
abac811dd2
fix: gcc warnings in libtransmission/ and utils/ (#843)
* fix: __attribute__(__printf__) warnings

* fix: implicit fallthrough warning

* fixup! fix: implicit fallthrough warning

* fix: disable warnings for 3rd party code

Since we want to leave upstream code as-is

* fixup! fix: disable warnings for 3rd party code

* fixup! fix: disable warnings for 3rd party code

* silence spurious alignment warning

Xrefs
Discussion: https://stackoverflow.com/a/35554349
Macro inspiration: 90ac46f710/f/src/util/util_safealign.h (_35)

* fixup! fix: disable warnings for 3rd party code

* fixup! fix: implicit fallthrough warning

* make uncrustify happy

* remove uncrustify-test.sh

that's probably off-topic for this PR

* fixup! fix: __attribute__(__printf__) warnings

* Update libtransmission/CMakeLists.txt

Co-Authored-By: ckerr <ckerr@github.com>

* fixup! silence spurious alignment warning

* use -w for DISABLE_WARNINGS in Clang

* refactor: fix libtransmission deprecation warnings

* fix: pthread_create's start_routine's return value

This was defined as `void` on non-Windows but should have been `void*`

* chore: uncrustify

* fix: add DISABLE_WARNINGS option for SunPro Studio

* fix "unused in lambda capture" warnings by clang++

* fix 'increases required alignment' warning

Caused from storing int16_t's in a char array.

* fix net.c 'increases required alignment' warning

The code passes in a `struct sockaddr_storage*` which is a padded struct
large enough for the necessary alignment. Unfortunately it was recast as
a `struct sockaddr*` which has less padding and a smaller alignment. The
warning occrred because of these differing alignments.

* make building quieter so warnings are more visible

* fixup! fix 'increases required alignment' warning

* Fix -Wcast-function-type warnings in GTK+ app code

https://gitlab.gnome.org/GNOME/gnome-terminal/issues/96 talks about both
the issue and its solution.

GCC 8's -Wcast-function-type, enabled by -Wextra, is problematic in glib
applications because it's idiomatic there to recast function signatures,
e.g. `g_slist_free(list, (GFunc)g_free, NULL);`.

Disabling the warning with pragmas causes "unrecognized pragma" warnings
on clang and older versions of gcc, and disabling the warning could miss
actual bugs. GCC defines `void (*)(void)` as a special case that matches
anything so we can silence warnings by double-casting through GCallback.

In the previous example, the warning is silenced by changing the code to
read `g_slist_free(list, (GFunc)(GCallback)g_free, NULL);`).

* fixup! fix "unused in lambda capture" warnings by clang++

* fixup! fix "unused in lambda capture" warnings by clang++

* fix two more libtransmission compiler warnings

* fix: in watchdir, use TR_ENABLE_ASSERTS not NDEBUG
2019-11-06 11:27:03 -06:00
Tom Forbes
8d7fbb5d45 Increase the buffer size used in tr_moveFile (#933)
In some filesystems, including ones mounted on a network drive, using a small buffer size 
significantly hurts copy performance. Upping the buffer to 1024kb to increase copy performance.
2019-11-06 09:46:13 -06:00
Pavel Shlyak
2ef07517b6 Cleanup duplicates in clients.c (#991) 2019-10-21 08:20:40 -05:00
C.W. Betts
33b792531d Use -[[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] in one other place. 2019-07-28 16:13:57 -06:00
C.W. Betts
751200f59a Update PrefsController:
Use [[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] instead of using NSString's creation.
2019-07-21 15:04:09 -06:00