Changeset 11114
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/tr-core.c
r11107 r11114 559 559 } 560 560 561 static gboolean 562 isTorrentActive( tr_torrent * tor ) 563 { 564 const tr_stat * st = tr_torrentStat( tor ); 565 return ( st->peersSendingToUs > 0 ) 566 || ( st->peersGettingFromUs > 0 ) 567 || ( st->activity == TR_STATUS_CHECK ); 568 } 569 561 570 #ifdef HAVE_GIO 562 571 … … 786 795 G_TYPE_DOUBLE, /* tr_stat.pieceUploadSpeed_KBps */ 787 796 G_TYPE_DOUBLE, /* tr_stat.pieceDownloadSpeed_KBps */ 797 G_TYPE_BOOLEAN, /* filter.c:ACTIVITY_FILTER_ACTIVE */ 788 798 G_TYPE_INT, /* tr_stat.activity */ 789 799 G_TYPE_UCHAR, /* tr_stat.finished */ … … 907 917 MC_SPEED_UP, st->pieceUploadSpeed_KBps, 908 918 MC_SPEED_DOWN, st->pieceDownloadSpeed_KBps, 919 MC_ACTIVE, isTorrentActive( tor ), 909 920 MC_ACTIVITY, st->activity, 910 921 MC_FINISHED, st->finished, … … 1305 1316 double oldUpSpeed, newUpSpeed; 1306 1317 double oldDownSpeed, newDownSpeed; 1318 gboolean oldActive, newActive; 1307 1319 const tr_stat * st; 1308 1320 TrTorrent * gtor; … … 1312 1324 gtk_tree_model_get( model, iter, 1313 1325 MC_TORRENT, >or, 1326 MC_ACTIVE, &oldActive, 1314 1327 MC_ACTIVITY, &oldActivity, 1315 1328 MC_FINISHED, &oldFinished, … … 1323 1336 tor = tr_torrent_handle( gtor ); 1324 1337 st = tr_torrentStat( tor ); 1338 newActive = isTorrentActive( tor ); 1325 1339 newActivity = st->activity; 1326 1340 newFinished = st->finished; … … 1332 1346 /* updating the model triggers off resort/refresh, 1333 1347 so don't do it unless something's actually changed... */ 1334 if( ( newActivity != oldActivity ) 1348 if( ( newActive != oldActive ) 1349 || ( newActivity != oldActivity ) 1335 1350 || ( newFinished != oldFinished ) 1336 1351 || ( newPriority != oldPriority ) … … 1340 1355 { 1341 1356 gtk_list_store_set( GTK_LIST_STORE( model ), iter, 1357 MC_ACTIVE, newActive, 1342 1358 MC_ACTIVITY, newActivity, 1343 1359 MC_FINISHED, newFinished, -
trunk/gtk/tr-core.h
r11087 r11114 196 196 MC_SPEED_UP, 197 197 MC_SPEED_DOWN, 198 MC_ACTIVE, 198 199 MC_ACTIVITY, 199 200 MC_FINISHED,
Note: See TracChangeset
for help on using the changeset viewer.