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.