Jordan Lee [Sat, 22 Jan 2011 17:45:54 +0000 (17:45 +0000)]
(trunk libT) #3933 "announcer.c peer parsing could be simpler" -- fixed.
Remove redundant code by using tr_peerMgrCompactToPex() and tr_peerMgrCompact6ToPex() to parse compact ipv4 and ipv6 peer lists. Simplify the old-style benc peer list parsing and fix a bug that returned too few bytes in the old-style peer array.
Jordan Lee [Sat, 22 Jan 2011 13:49:15 +0000 (13:49 +0000)]
(trunk libT) #3906 "DHT ignores bind-address-ipv6" -- test fix.
Add code to honor the ipv6 bind address. Thanks to jch for saving me a little work by confirming the bug and pointing out where in the code the change needed to be made.
Jordan Lee [Sat, 22 Jan 2011 13:33:05 +0000 (13:33 +0000)]
(trunk libT) #3927 "Use of libevent2 evbuffer_write on files..."
evbuffer_write() is intended for sockets. It works for files on Unix, but not on Windows, so we can't portably use it on files. Instead, use evbuffer_pullup() + write().
Jordan Lee [Sat, 22 Jan 2011 13:26:44 +0000 (13:26 +0000)]
(trunk gtk) #3887: "CPU spikes to 100% on scrolling" -- workaround committed.
The patch avoids use of GtkCellRendererText's "sensitive" property, and instead renders paused torrents' text using the widget's style's color for insensitive text. This approach honors the theme's "insensitive" color setting and uses it to draw insensitive text with no etching or shadowing.
The better option is still for Murrine to fix its text shadow issue... but until then, here is a workaround.
Jordan Lee [Sat, 22 Jan 2011 13:21:20 +0000 (13:21 +0000)]
(trunk libT) #3932 "Assertion failed: (tab != NULL), function tr_torrentAvailability"
Looks like tab can be NULL from the Mac client when magnet links are involved and the Mac client doesn't know how many pieces are available, so that assertion's not appropriate.
Jordan Lee [Sat, 22 Jan 2011 03:28:06 +0000 (03:28 +0000)]
(trunk) #3901 "Confusing error message when libtool is missing" -- fixed.
autogen.sh invokes autoreconf without checking to see if it fails (as it does if libtool can't be found). In such cases it also invokes a broken doomed version of the configure script, which generates a lot of red herring messages that distract from the real problem encountered by autoreconf.
The fix is to exit autogen.sh if its call to autoreconf fails.
Jordan Lee [Fri, 21 Jan 2011 21:51:50 +0000 (21:51 +0000)]
(trunk qt) #3930 - "Add URL" - auto-copy links from the clipboard
When opening the "Add URL" dialog, check the clipboard selection & clipboard proper to see if either contains a URL, magnet link, or info hash code. If it has any of those things, put that in the dialog's entry field as the default action. Patch by cantabile.
Jordan Lee [Fri, 21 Jan 2011 17:31:35 +0000 (17:31 +0000)]
(trunk gtk) set GtkLabel's "single-line-mode" flag to TRUE in the toolbar, in the stats dialog, and in the details dialog's info tab.
According to the GTK+ documentation, this "can be an advantage in situations where resizing the label because of text changes would be distracting, e.g. in a statusbar." It doesn't seem to prevent relayout in GTK+ 2.20.1, but maybe other versions of GTK+ will make better use of the flag.
Jordan Lee [Fri, 21 Jan 2011 17:07:23 +0000 (17:07 +0000)]
(trunk gtk) companion commit to r11738 to reduce unnecessary re-rendering in the main window
The main window called gtk_tree_model_filter_refilter() once per second to refresh the torrent list's filtering. This is not an efficient approach: gtk_tree_model_filter_refilter() emits a "row changed" event for every row, causing unnecessary re-rendering.
I've removed the call to gtk_tree_model_filter_refilter() and expanded the model to includes all the fields necessary for filtering. That way we only fire "row changed" events for rows that actually change.
By reducing the number of renders in steady state, this might ameliorate https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/655024
However it will *not* help the related "CPU spikes to 100% on scrolling" ticket at https://trac.transmissionbt.com/ticket/3887 because rendering paused torrents is still exceptionally expensive in the murrine theme.
Jordan Lee [Fri, 21 Jan 2011 16:32:27 +0000 (16:32 +0000)]
(trunk gtk) make "gtr_label_set_text" public and use it everywhere instead of gtk_label_set_text()
Some of the refresh events to the main window's torrent list are caused by main window relayout caused by the toolbar's GtkLabels recalculating their size after being updated once per second. To prevent relayout in some trivial cases, I'm replacing the gtk_label_set_text() calls with gtr_label_set_text() because the latter doesn't update the label widget if the old and new text strings are the same.
There are other changes that can handle more important cases -- I'll test those out next.
Jordan Lee [Fri, 21 Jan 2011 02:29:26 +0000 (02:29 +0000)]
Remove the documentation for PUT notation from the rpc spec
The PUT hack was useful back when Transmission's RPC was first written, but it doesn't scale well to any of the commands that make its RPC useful. We should deprecate its use and not advertise this feature anymore.
The exponentially-growing interval between retries had a bug that caused intervals to be too long if no successful announce had ever been made. This commit fixes the code that calculates the interval.
Jordan Lee [Thu, 20 Jan 2011 20:32:28 +0000 (20:32 +0000)]
(trunk) #3926 "use 'Open Torrent' instead of 'Add Torrent' in GTK+ and Qt clients" -- fix accelerator ambiguity.
Using Ctrl-O for "Open File" causes a conflict with the existing Ctrl-O for "Open Folder." The HIG-compliant shortcut wins the conflict, so "Open Folder" gets a new accelerator.
Jordan Lee [Thu, 20 Jan 2011 19:57:42 +0000 (19:57 +0000)]
(trunk) #3926: use "Open Torrent" instead of "Add Torrent" in GTK+ and Qt clients -- change the filename from add-dialog.[ch] to open-dialog.[ch]. whoooo
Jordan Lee [Wed, 19 Jan 2011 16:47:07 +0000 (16:47 +0000)]
remove mention of µTP from 2.20 NEWS. let's not get ahead of ourselves -- we shouldn't imply future µTP support when that decision hasn't been made yet.
Jordan Lee [Wed, 19 Jan 2011 13:48:47 +0000 (13:48 +0000)]
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.
Jordan Lee [Tue, 18 Jan 2011 23:44:36 +0000 (23:44 +0000)]
cleanup of who calls the libtransmission thread locking functions.
In some cases we were calling them from deep inside libtransmission, when they should have been called directly from the public-visible API functions: tr_torrentWebSpeeds_KBps(), tr_torrentPeers(), tr_torrentTrackers().
Jordan Lee [Tue, 18 Jan 2011 22:51:29 +0000 (22:51 +0000)]
code cleanup for tr_peerMgrTorrentAvailability().
1. move responsibility for getting a thread lock back to the public API fucntion, tr_torrentAvailability().
2. if the torrent doesn't have metadata, stop after zeroing out the table
3. minor code formatting cleanup
Make ensureAtomExists add to the flags of an existing atom.
Flags are cumulative -- if we learn that a given peer groks encryption
from one source, and that it accepts incoming connections from another,
then the relevant atom should have both flags.
Consolidate both versions of tr_isPex into a single function.
There used to be two versions of tr_isPex; one correct in peer-mgr.c,
and one buggy in resume.c. The buggy version caused us to reject all
peers with non-trivial flags when resuming.
Make the peer-congestion-algorithm preference visible.
When I first implemented this code, I made the preference hidden --
unless you set it yourself, it will not appear in the sttings file.
Now that it's been documented and advertised, make it visible.