1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 21:26:53 +00:00

remove dead code

This commit is contained in:
Jordan Lee 2011-08-28 06:20:32 +00:00
parent 228e1064e1
commit ab7fe4470e

View file

@ -1396,11 +1396,11 @@ Transmission.prototype =
if (!showing_dialog) if (!showing_dialog)
{ {
var haveSelection = false; var haveSelection = false,
var haveActive = false; haveActive = false,
var haveActiveSelection = false; haveActiveSelection = false,
var havePaused = false; havePaused = false,
var havePausedSelection = false; havePausedSelection = false;
for (var i=0, row; row=this._rows[i]; ++i) { for (var i=0, row; row=this._rows[i]; ++i) {
var isStopped = row.getTorrent().isStopped(); var isStopped = row.getTorrent().isStopped();
@ -1483,32 +1483,32 @@ Transmission.prototype =
return; return;
} }
var creator = 'N/A'; var creator = 'N/A',
var comment = 'N/A'; comment = 'N/A',
var download_dir = 'N/A'; download_dir = 'N/A',
var date_created = 'N/A'; date_created = 'N/A',
var error = 'None'; error = 'None',
var hash = 'N/A'; hash = 'N/A',
var have_public = false; have_public = false,
var have_private = false; have_private = false,
var name; name,
var sizeWhenDone = 0; sizeWhenDone = 0,
var sizeDone = 0; sizeDone = 0,
var total_completed = 0; total_completed = 0,
var total_download = 0; total_download = 0,
var total_download_peers = 0; total_download_peers = 0,
var total_download_speed = 0; total_download_speed = 0,
var total_availability = 0; total_availability = 0,
var total_size = 0; total_size = 0,
var total_state = [ ]; total_state = [ ],
var pieces = 'N/A'; pieces = 'N/A',
var total_upload = 0; total_upload = 0,
var total_upload_peers = 0; total_upload_peers = 0,
var total_upload_speed = 0; total_upload_speed = 0,
var total_verified = 0; total_verified = 0,
var na = 'N/A'; na = 'N/A',
var tab = this._inspector._info_tab; tab = this._inspector._info_tab,
var fmt = Transmission.fmt; fmt = Transmission.fmt;
$("#torrent_inspector_size, .inspector_row div").css('color', '#222'); $("#torrent_inspector_size, .inspector_row div").css('color', '#222');
@ -1902,14 +1902,16 @@ Transmission.prototype =
refreshFilterButton: function() refreshFilterButton: function()
{ {
var state = this[Prefs._FilterMode]; var text,
var state_all = state == Prefs._FilterAll; state = this[Prefs._FilterMode],
var state_string = this.getStateString(state); state_all = state == Prefs._FilterAll,
var tracker = this.filterTracker; state_string = this.getStateString(state),
var tracker_all = !tracker; tracker = this.filterTracker,
var tracker_string = tracker ? this.getReadableDomain(tracker) : ''; tracker_all = !tracker,
tracker_string = tracker ? this.getReadableDomain(tracker) : '',
torrent_count = Object.keys(this._torrents).length,
visible_count = this._rows.length;
var text;
if (state_all && tracker_all) if (state_all && tracker_all)
text = 'Show <span class="filter-selection">All</span>'; text = 'Show <span class="filter-selection">All</span>';
else if (state_all) else if (state_all)
@ -1919,8 +1921,6 @@ Transmission.prototype =
else else
text = 'Show <span class="filter-selection">' + state_string + '</span> at <span class="filter-selection">' + tracker_string + '</span>'; text = 'Show <span class="filter-selection">' + state_string + '</span> at <span class="filter-selection">' + tracker_string + '</span>';
var torrent_count = Object.keys(this._torrents).length;
var visible_count = this._rows.length;
if (torrent_count === visible_count) if (torrent_count === visible_count)
text += ' &mdash; ' + torrent_count + ' Transfers'; text += ' &mdash; ' + torrent_count + ' Transfers';
else else
@ -1937,20 +1937,6 @@ Transmission.prototype =
} }
}, },
matchesTorrentList: function(torrents)
{
if (!torrents || !this._rows)
return false;
if (torrents.length !== this._rows.length)
return false;
for (var i=0, tor; tor=torrents[i]; ++i)
if (tor.getId() !== this._rows[i].getTorrentId())
return false;
return true;
},
sortRows: function(rows) sortRows: function(rows)
{ {
var i, tor, row, var i, tor, row,