Changeset 13896
- Timestamp:
- Jan 30, 2013, 12:20:51 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/tr-core.c
r13868 r13896 469 469 int ret = 0; 470 470 tr_torrent *ta, *tb; 471 const tr_stat *sa, *sb;472 471 double aUp, aDown, bUp, bDown; 473 472 … … 480 479 MC_TORRENT, &tb, 481 480 -1); 482 sa = tr_torrentStatCached (ta); 483 sb = tr_torrentStatCached (tb);481 482 ret = compare_double (aUp+aDown, bUp+bDown); 484 483 485 484 if (!ret) 486 ret = compare_double (aUp+aDown, bUp+bDown); 485 { 486 const tr_stat * const sa = tr_torrentStatCached (ta); 487 const tr_stat * const sb = tr_torrentStatCached (tb); 488 ret = compare_uint64 (sa->peersSendingToUs + sa->peersGettingFromUs, 489 sb->peersSendingToUs + sb->peersGettingFromUs); 490 } 491 487 492 if (!ret) 488 ret = compare_uint64 (sa->uploadedEver, sb->uploadedEver); 489 if (!ret) 490 ret = compare_by_queue (m, a, b, user_data); 493 ret = compare_by_activity (m, a, b, user_data); 491 494 492 495 return ret; -
trunk/qt/torrent-filter.cc
r13720 r13896 101 101 case SortMode :: SORT_BY_ACTIVITY: 102 102 if( !val ) val = compare( a->downloadSpeed() + a->uploadSpeed(), b->downloadSpeed() + b->uploadSpeed() ); 103 if( !val ) val = compare( a->uploadedEver(), b->uploadedEver() ); 103 if( !val ) val = compare( a->peersWeAreUploadingTo() + a->webseedsWeAreDownloadingFrom(), 104 b->peersWeAreUploadingTo() + b->webseedsWeAreDownloadingFrom()); 104 105 // fall through 105 106 case SortMode :: SORT_BY_STATE: 106 if( !val ) val = compare( a->hasError(), b->hasError() );107 if( !val ) val = -compare( a->isPaused(), b->isPaused() ); 107 108 if( !val ) val = compare( a->getActivity(), b->getActivity() ); 108 109 if( !val ) val = -compare( a->queuePosition(), b->queuePosition() ); 110 if( !val ) val = compare( a->hasError(), b->hasError() ); 109 111 // fall through 110 112 case SortMode :: SORT_BY_PROGRESS:
Note: See TracChangeset
for help on using the changeset viewer.