Commit Graph

490 Commits

Author SHA1 Message Date
Mike Gelfand 2d940e5caf
Bump copyright to 2020 (some more places) (#1206)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2020-05-02 12:26:42 -05:00
Charles Kerr 8739cb9c88
fixup! (trunk) update credits (#1205) 2020-05-02 11:42:18 -05: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
Mike Gelfand eef4799388 Update Uncrustify config to 0.69 2019-07-15 02:30:41 +03:00
fetzu 3c0cb395c5 Updated copyright strings to 2019
Updated Transmission Project copyright dates to 2005-2019 in headers and code.
2019-01-11 19:36:19 +01:00
Zachary J. Slater f388d17c2d Updated copyright string to 2018
Small update to copyright string
2018-04-17 00:50:33 -10:00
Mike Gelfand 1e3d20422a Reduce for loop variables scope 2017-05-14 01:38:31 +03:00
Mike Gelfand e1d53855f4 Avoid declaring multiple variables on the same line 2017-05-01 18:46:41 +03:00
Mike Gelfand a762c770f2 Make conditional expressions explicitly boolean 2017-04-30 19:26:01 +03:00
Mike Gelfand 4f9d9ad92b Code style change leftovers
For some reason, GTK client wasn't fully processed. All the rest of changes
are mostly in comments.
2017-04-21 10:40:57 +03:00
Mike Gelfand dadffa2c0f Align type qualifiers to the right (code style)
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
2017-04-20 19:53:20 +03:00
Mike Gelfand d7930984ef Adjust uncrustify config, reformat all but Mac client
There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).

The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
2017-04-20 10:01:22 +03:00
Mike Gelfand 5f3abbd6d8 Add myself to the list of Transmission authors 2017-01-15 01:38:45 +03:00
Markus Amalthea Magnuson 727b9671f7 Update all website links to canonical HTTPS version. 2016-10-31 10:00:11 +01:00
Robert Vehse 13bae8179e Update all instances of the donation link. Fixes #26. 2016-09-23 04:36:41 +02:00
Mike Gelfand 2248d3670f Get rid of $Id$ SVN keywords in source files 2016-09-02 23:10:15 +03:00
Mike Gelfand c955c04d8f Explicitly compare result of str(n)cmp/memcmp to signify that it's not boolean 2016-03-13 22:11:01 +00:00
Mike Gelfand 197fc132b3 Update user-facing copyright years 2016-02-27 23:18:02 +00:00
Mike Gelfand 495e9b2fa0 Load icons with GResource, remove deprecated inline pixbufs 2016-02-23 04:34:57 +00:00
Mike Gelfand 939b31ae3d #6051: `transmission-gtk --version` shouldn't require display 2016-01-09 18:06:17 +00:00
Mike Gelfand f89fab72f9 Remove unused session tag 2015-10-18 18:39:14 +00:00
Mike Gelfand 18ea8c429a Improve RPC performance for local sessions
Don't unnecessarily de-/serialize JSON data if local session is used.
2015-07-13 00:32:48 +00:00
Mike Gelfand 440f482d01 Replace tabs with spaces; remove trailing spaces 2015-01-02 11:15:31 +00:00
Jordan Lee d7368a58f5 Copyedit the license's revised text: (1) fix accidental word concatenations in the Qt and GTK+ clients' license popup text 2014-01-21 03:15:33 +00:00
Jordan Lee 02cff80c2d Copyedit the license's revised text: (1) remove unnecessary repitition use of the word 'license' from the top of the header and source files (2) add the standard 'we hope it's useful, but no warranty' clause to COPYING (3) make explicit that linking OpenSSL is allowed (see https://people.gnome.org/~markmc/openssl-and-the-gpl.html for background) (4) sync the Qt and GTK+ clients' license popups with COPYING's revised text 2014-01-21 03:10:30 +00:00
Jordan Lee 4b9626bb83 Licensing changes:
1. add the option the code to be used under GPLv2 or GPLv3; previously only GPLv2 was allowed

2. add the "proxy option" as described in GPLv3 so we can add future licenses without having to bulk-edit everything again :)

3. remove the awkward "exception for MIT code in Mac client" clause; it was unnecessary and confusing.
2014-01-19 01:09:44 +00:00
Jordan Lee 229f9e5ae6 (trunk, gtk) #5450: in transmission-gtk's main.c::on_app_exit(), check to see if shutdown's already been initiated so that we don't call tr_sessionClose() twice. 2013-08-05 02:39:30 +00:00
Jordan Lee 7f9f86c55a fix a minor GAppInfo memory leak in transmission-gtk 2013-07-08 19:34:58 +00:00
Jordan Lee d1571bda02 (gtk) use replace strcmp() with g_strcmp0() everywhere 2013-02-14 15:17:42 +00:00
Jordan Lee 1a768ab06f (gtk) #5271 'once we start shutting down the application, stop updating the Action states': more safeguards 2013-02-04 18:34:39 +00:00
Jordan Lee 0c8c2b5bdd (gtk) #5271 'once we start shutting down the application, stop updating the Action states': fixed 2013-02-04 16:11:08 +00:00
Jordan Lee f75027d5e9 make all the log functions/structs/enums use a single 'tr_log' namespace, such as tr_logGetQueue, tr_logAddInfo, tr_logIsLevelActive 2013-01-25 23:34:20 +00:00
Jordan Lee c4276d832e Tweak the text of the First Time User legal dialog. 2013-01-16 20:55:08 +00:00
Jordan Lee 5b1cd134ad (gtk) #5211 'Transmission main window does not get focus when toggling via AppIndicator applet' -- fixed. 2013-01-04 23:25:17 +00:00
Jordan Lee 2a52ebab20 (gtk) copyediting: use G_SOURCE_REMOVE and G_SOURCE_CONTINUE where appropriate 2013-01-04 16:36:52 +00:00
Jordan Lee 5877747ad6 (gtk) #5203 transmission-gtk shouldn't use gdk_threads_enter() and gdk_threads_leave() -- on shutdown, destruct the TrCore GObject in the glib thread, and then call tr_sessionClose() from a worker thread. 2013-01-04 06:57:39 +00:00
Jordan Lee 4e0ffffbf0 (gtk) #5203 transmission-gtk shouldn't use gdk_threads_enter() and gdk_threads_leave() -- when we get an RPC notification, delegate the work back to the gtk thread. 2013-01-04 06:35:08 +00:00
Jordan Lee c1559f3cc4 (trunk, libT) first drop of the tr_quark patch. 2012-12-22 20:35:19 +00:00
Jordan Lee e96ed247fe refactor libtransmission's tr_benc class as tr_variant. 2012-12-14 04:34:42 +00:00
Jordan Lee 3d38723ad9 Follow more common whitespace style conventions in the C code (libtransmission, daemon, utils, cli, gtk). 2012-12-05 17:29:46 +00:00
Jordan Lee 1966ffe4f5 load the UI from a resource file rather than a string. Patch by fmuellner 2012-09-07 17:18:17 +00:00
Jordan Lee f4cfc0cf56 fix tab damage 2012-09-07 04:22:21 +00:00
Jordan Lee 6a3c7f34ec (trunk, gtk) use GtkApplication and GtkApplicationWindow 2012-07-14 22:44:41 +00:00
Jordan Lee dfbfdbc81b (trunk, gtk) remove the pointless TrWindow typedef 2012-07-14 22:41:33 +00:00
Jordan Lee cdd71c6427 (trunk gtk) #4970 remove deprecated GTK+ API calls, raise GTK+ dependency to 3.2 2012-07-14 19:26:55 +00:00
Jordan Lee 252560ddd9 (trunk gtk) #4791 "Should catch SIGTERM instead of SIGKILL" -- fixed with patch by Matt Krai 2012-02-24 19:52:50 +00:00
Jordan Lee 631a77287d (trunk gtk) replace the three single dots '...' with the unicode symbol U+2026 (…). 2012-02-03 15:51:36 +00:00
Jordan Lee d524deecb0 (trunk libT) #4372 "make notification and system sounds configurable" -- instead of using notify-send, use GDBus on the org.freedesktop.Notifications API. Patch by fmuellner. 2011-12-10 19:00:50 +00:00
Jordan Lee 8e74ccb7a1 (trunk gtk) #4605 "'--minimized' switch not working any more" -- fixed. 2011-10-30 18:27:45 +00:00