This is caused by libtransmission using tr_webseedIsActive() in two ways: (1) webseed.c uses it to know if there are any pending requests, and (2) tr_torrentStat() uses it to set tr_stat.webseedsSendingToUs. Having a queued task isn't enough to be "active" in use (2) -- it needs to know if the webseed is actually sending data. These two uses should be moved into separate functions.
This bug was introduced a couple of days ago in the fix to #3901 "Confusing error message when libtool is missing." The fix introduced a bashism, which should be avoided if we want to work with strict sh.
Use tor->isRunning, rather than tier->isRunning, when testing to see if a torrent can manual announce or not. tor->isRunning means we're inbetween the user pressing "start" and "stop." tier->isRunning means we're inbetween successful "started" and "stopped" announcements. (This is deliberately out-of-sync from tor->isRunning because it can take awhile to for tracker announces to finish.)
Under the old code (using tier->isRunning), it was impossible to manually reannounce unless there had been a successful event=started announce first. It was also possible to manually announce after the "stop" button had been pressed if the "event=stopped" announcement hadn't finished yet.
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.
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.
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().
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.
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.
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.
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.
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.
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.
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.
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.
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.