Commit Graph

214 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 e1d53855f4 Avoid declaring multiple variables on the same line 2017-05-01 18:46:41 +03:00
Mike Gelfand fbd8d4c79f Fix a number of other style inconsistencies met along the way 2017-04-30 19:33:55 +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 ecd1eb7914 Update file icon when its name changes in details dialog (GTK+ client)
Additionally, make main window redraw the torrent so that new name and icon
are visible right away.
2017-02-21 23:21:25 +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
Mike Gelfand 88983c1ac1 Use tr_sys_path_remove instead of remove 2015-10-23 04:09:40 +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 2e6d5c8bc9 Add more booleans to the picture 2015-05-31 22:13:31 +00:00
Mike Gelfand cdf3cf62f9 Fix some issues revealed by coverity 2015-05-09 11:56:35 +00:00
Jordan Lee f83ff36cd5 (trunk gtk) use G_SOURCE_REMOVE where appropriate 2013-07-20 16:37:59 +00:00
Jordan Lee 027e3f3066 (trunk, libT) #4682 'Add return id from duplicate torrent torrent-add rpc' -- added. 2013-05-22 20:35:38 +00:00
Jordan Lee d1571bda02 (gtk) use replace strcmp() with g_strcmp0() everywhere 2013-02-14 15:17:42 +00:00
Jordan Lee 76a3b116f0 use g_strcmp0() instead of strcmp() to guard against corrupt settings in the config file 2013-02-10 23:06:05 +00:00
Jordan Lee d76d2a34d9 (gtk) match transmission-qt's way of showing up & down speeds in the statusbar 2013-02-08 01:34:59 +00:00
Jordan Lee a4bbceb483 fix r13896 oops 2013-01-30 00:28:53 +00:00
Jordan Lee 4a059b79b8 when sorting by activity and both torrents' upload and download speed is zero, use how many peers we're ready to upload to / download from as a secondary key. 2013-01-30 00:20:51 +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 dc42791380 (gtk) remember to clear out the error pointer 2013-01-21 03:18:44 +00:00
Jordan Lee 5093f99652 (gtk) silence a couple of potential GFileInfo console warnings 2013-01-20 04:10:47 +00:00
Jordan Lee bff4a98fa6 (gtk) silence a g_object_unref() warning when appending '.added' to a .torrent file fails 2013-01-17 00:45:31 +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 8f9e96d0ce (trunk gtk) #5205 'GTK+ client crashes in recent trunk' -- fixed. 2012-12-31 22:37:18 +00:00
Jordan Lee 3c9640bb8f make tr_info.webseedCount and tr_info.trackerCount unsigned. 2012-12-30 22:06:45 +00:00
Jordan Lee d4ab5d299f #5185 (trunk, gtk) fix sort-by-age with patch from elhana. 2012-12-26 23:36:23 +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 33c4d25f19 fix a handful of console warnings that were generated by trying to trash a NULL .torrent file b/c the torrent had been added from a URL 2012-09-23 15:38:07 +00:00
Jordan Lee 6ec4aec13a (trunk gtk) #5204 "Transmission GTK client crashes on start" -- another possible fix ;) 2011-10-11 20:32:15 +00:00
Jordan Lee b645959eea (trunk gtk) #4554 "Transmission GTK client crashes on start" -- possible fix. 2011-10-11 15:30:33 +00:00
Jordan Lee bb41777ac7 (trunk gtk) sync the gtk+ client's watchdir behavior with the daemon's wrt r12668 2011-08-13 22:24:31 +00:00
Jordan Lee c00b97169c use a gulong when remembering the return value of g_signal_connect(). we were using a guint in some places. 2011-08-13 21:03:38 +00:00
Jordan Lee 38a1df9344 (trunk gtk) remove some unnecessary #includes 2011-08-13 14:19:40 +00:00
Jordan Lee 6f850a3d87 (trunk gtk) simplify the gtk+ client's watchdir code 2011-08-13 13:58:35 +00:00
Jordan Lee 7ab14ad4b1 (trunk gtk) in torrent-cell-renderer and tr-core, use the _parent_class field generated by G_DEFINE_TYPE. 2011-08-09 06:31:33 +00:00
Jordan Lee 6290169099 (trunk gtk) use G_DEFINE_TYPE when implementing the tr-core and torent-cell-renderer classes 2011-08-09 05:47:24 +00:00
Jordan Lee 4d4eeae682 (trunk gtk) first cut at using GApplication. This lets glib replace hundreds of lines of homegrown code. Whee! 2011-08-09 02:30:31 +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 6d1869c33b remove the gtr_timeout_add_seconds() portability wrapper around gdk_threads_add_timeout_seconds(); it's unnecessary now that the minimum gtk version's been bumped. 2011-08-08 17:06:46 +00:00
Jordan Lee 270126820a (trunk gtk) bump the glib2 requirement from 2.8 to 2.26 s.t. transmission-gtk can use glib's GDBus module and drop the glib-dbus library dependency 2011-08-07 16:42:38 +00:00
Jordan Lee 307754e807 #671 "torrent queuing" -- modify the queue implementation s.t. every torrent has a queuePosition, even if it's not currently in the queue. 2011-08-02 03:59:54 +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 6326003e73 (trunk gtk) very minor tweak in deciding which rows to update in the torrent model.
Since we only display speed to two decimal places, we don't need to compare previous and current torrent speed with more precision than that.
2011-04-20 01:16:16 +00:00