Commit Graph

62 Commits

Author SHA1 Message Date
Mike Gelfand 1e3d20422a Reduce for loop variables scope 2017-05-14 01:38:31 +03:00
Mike Gelfand 14370e5353 Fix a number of other style inconsistencies met along the way (part 2) 2017-05-01 18:47:49 +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 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
Jordan Lee b559a20029 const correctness
silence some qual-cast warnings by sprinkling more consts throughout,
e.g. casting a const void* to a const struct foo * const *
2015-12-06 22:13:10 +00:00
Mike Gelfand cdf3cf62f9 Fix some issues revealed by coverity 2015-05-09 11:56:35 +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 4904b923fb (trunk) restore copyright year as suggested in email by rms 2014-01-18 20:56:57 +00:00
Jordan Lee d1571bda02 (gtk) use replace strcmp() with g_strcmp0() everywhere 2013-02-14 15:17:42 +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 1c90e929d1 (gtk) #4076 'free space indicator': tweak the GTK+ client's visible count label's behavior as the previous commit did for the Qt client 2013-02-02 23:01:33 +00:00
Jordan Lee 16d46a72a1 in the Qt and GTK+ clients, move the torrent count indicator from the statusbar to the filterbar 2013-02-01 20:58:55 +00:00
Jordan Lee fd61c3af0b (gtk) #5207 'Simplify GTK+ client's category filter to match Qt and Web clients' -- done. 2013-01-01 19:45:00 +00:00
Jordan Lee db721de837 (gtk) copyediting: indentation & whitespace 2013-01-01 18:43:41 +00:00
Jordan Lee 3c9640bb8f make tr_info.webseedCount and tr_info.trackerCount unsigned. 2012-12-30 22:06:45 +00:00
Jordan Lee 61bc1eabd6 fewer redundant gobject dynamic casts 2012-12-13 03:00:57 +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 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 53ea28bdf6 (trunk, gtk) fix #4867 'Some strings are not translated in Transmission in Ubuntu 12.04' 2012-04-13 14:49:34 +00:00
Jordan Lee e599b3a738 (trunk gtk) To improve translations, help gettext to differentiate between the gerund and verb forms of some -ing words like "Seeding" and "Downloading" -- fixed.
I wasn't sure how to do this, so for the benefit of my future self or anyone else who's interested, here are some breadcrumbs I found: https://trac.transmissionbt.com/ticket/4717#comment:6
2012-02-03 17:12:17 +00:00
Jordan Lee f9388714b7 (trunk gtk) add portability wrappers for gtk_hbox_new() and gtk_vbox_new(), which are deprecated now in GTK+ 3.2 2011-10-11 04:11:08 +00:00
Jordan Lee cc237aa713 #4479 'magnet links are not included in filter results' -- fixed. 2011-09-14 17:22:54 +00:00
Jordan Lee 8d89a16f4f remove the gtr_idle_add() portability wrapper around gdk_threads_add_idle() -- it's unnecessary now that the minimum gtk version's been bumped. 2011-08-08 17:10:55 +00:00
Jordan Lee 0e48418f26 (trunk gtk) since we're bumping glib's requirement to 2.26 (27 Sept 2010), it's a good time to bump the gtk+ requirement to 2.22 (32 Sept 2010). 2011-08-07 18:41:13 +00:00
Jordan Lee 61174b007e (trunk) #671 "torrent queuing" -- Preliminary implementation. Covers libtransmission; GTK+ and Qt clients, and rudimentary web client support. 2011-08-01 22:24:24 +00:00
Jordan Lee c1273a03a4 (trunk gtk) tweak to r12398: because most of the strings in category_filter_model_update() will be duplicates of each other, use g_string_chunk_insert_const() instead of g_string_insert(). 2011-04-29 20:22:11 +00:00
Jordan Lee 53fede89f6 (trunk gtk) in filter.c's category_filter_model_update(), use a string chunk for all those temporary strings that are allocated in a looop 2011-04-28 23:13:14 +00:00
Jordan Lee 6cd1dcb574 (trunk gtk) Avoid unnecessary GtkComboBox queries.
Instead of calling gtk_combo_box_get_active_iter() on the filterbar's two comboboxes in every periodic update, keep the state information in a local struct and update it when the selection changes. That way the filter code doesn't even need to know about the GtkComboBox or the GtkTreeModel.
2011-04-13 22:04:31 +00:00
Jordan Lee c213d91ffd (trunk gtk) use GQuarks instead of strings for keys in the filterbar's key/value pairs 2011-04-05 15:59:41 +00:00
Jordan Lee d233ea82e7 (trunk gtk) more heap pruning: avoid unnecessary malloc() + free() calls in gtr_get_host_from_url() 2011-04-04 16:54:09 +00:00
Jordan Lee eb06d81fb9 (trunk) fix a handful of small memory leaks that valgrind found. 2011-03-25 17:42:47 +00:00
Jordan Lee 374ed10f3b (trunk) it's bad form to #include so many system headers in libtransmission/utils.h... 2011-03-16 18:04:23 +00:00
Jordan Lee c7006ed8b3 (trunk gtk) remove the TrTorrent GObject subclass. 2011-03-03 01:59:25 +00:00
Jordan Lee be99878e98 (trunk gtk) #3971 "favicons do not work for IP addresses" -- fixed.
gtr_get_host_from_url() wasn't written to handle dotted-quad or IPv6 address strings, but can handle them now.
2011-02-01 01:38:58 +00:00
Jordan Lee 879a2afcbd Update the copyright year in the source code comments.
The Berne Convention says that the copyright year is moot, so instead of adding another year to each file as in previous years, I've removed the year altogether from the source code comments in libtransmission, gtk, qt, utils, daemon, and cli.

Juliusz's copyright notice in tr-dht and Johannes' copyright notice in tr-lpd have been left alone; it didn't seem appropriate to modify them.
2011-01-19 13:48:47 +00:00
Jordan Lee 87e78816ad (trunk gtk) #3519 "webseeds don't work" -- the `active' filter in the GTK+ client didn't test for webseed activity. 2011-01-18 23:26:41 +00:00
Jordan Lee 36e54b59e9 (trunk gtk) #3897 "filterbar should use tr_torrentStatCached() instead of tr_torrentStat()" -- fixed. 2011-01-13 11:57:06 +00:00
Charles Kerr e5bb3205a1 (trunk) Join the 21st century and use only 1 space at the end sentences. This commit is nearly as important as the semi-annual ones that remove trailing spaces from the ends of lines of code... :) 2010-12-27 19:18:17 +00:00
Charles Kerr b313c6f617 (trunk gtk, qt) "Show 'queued to verify' torrents in the 'verifying' filter" -- added to trunk. 2010-12-12 16:07:04 +00:00
Charles Kerr 1c0d149c12 (trunk gtk) #3491 "Magnet links don't appear until download of metadata." -- fixed. 2010-08-06 15:03:25 +00:00
Charles Kerr 92e989f553 (trunk gtk) experimentally remove sexy-icon-entry from the GTK+ client... GtkEntry can handle it now 2010-08-06 06:54:42 +00:00
Daniel Lee ff23406f38 (trunk) #3471:Add 'finished' to filterbar 2010-08-01 17:43:35 +00:00
Charles Kerr c089500e8d (trunk gtk) tweak the filterbar's spacing 2010-05-20 16:37:59 +00:00
Charles Kerr c7bbd4dc20 (trunk gtk) add stock icons to some of the filter states 2010-05-18 14:14:17 +00:00
Charles Kerr 211aa76826 (trunk gtk) futz with the filter bar a little bit 2010-05-16 15:51:01 +00:00