Changeset 6935
- Timestamp:
- Oct 20, 2008, 5:54:56 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/cli.c
r6897 r6935 174 174 175 175 static void 176 torrent StateChanged( tr_torrent * torrentUNUSED,177 cp_status_t statusUNUSED,178 void * user_dataUNUSED )176 torrentCompletenessChanged( tr_torrent * torrent UNUSED, 177 tr_completeness completeness UNUSED, 178 void * user_data UNUSED ) 179 179 { 180 180 system( finishCall ); … … 185 185 static void 186 186 scrapeDoneFunc( struct tr_handle * session UNUSED, 187 long 188 const void * 189 size_t 190 void * 187 long response_code, 188 const void * response, 189 size_t response_byte_count, 190 void * host ) 191 191 { 192 192 tr_benc top, *files; … … 261 261 size_t buflen ) 262 262 { 263 if( st-> status& TR_STATUS_CHECK_WAIT )263 if( st->activity & TR_STATUS_CHECK_WAIT ) 264 264 { 265 265 tr_snprintf( buf, buflen, "Waiting to verify local files" ); 266 266 } 267 else if( st-> status& TR_STATUS_CHECK )267 else if( st->activity & TR_STATUS_CHECK ) 268 268 { 269 269 tr_snprintf( buf, buflen, … … 272 272 100.0 * st->percentDone ); 273 273 } 274 else if( st-> status& TR_STATUS_DOWNLOAD )274 else if( st->activity & TR_STATUS_DOWNLOAD ) 275 275 { 276 276 char ratioStr[80]; … … 288 288 ratioStr ); 289 289 } 290 else if( st-> status& TR_STATUS_SEED )290 else if( st->activity & TR_STATUS_SEED ) 291 291 { 292 292 char ratioStr[80]; … … 474 474 signal( SIGHUP, sigHandler ); 475 475 #endif 476 tr_torrentSet StatusCallback( tor, torrentStateChanged, NULL );476 tr_torrentSetCompletenessCallback( tor, torrentCompletenessChanged, NULL ); 477 477 tr_torrentStart( tor ); 478 478 … … 513 513 514 514 st = tr_torrentStat( tor ); 515 if( st-> status& TR_STATUS_STOPPED )515 if( st->activity & TR_STATUS_STOPPED ) 516 516 break; 517 517 -
trunk/gtk/dialogs.c
r6873 r6935 71 71 gpointer activeTorrentCount ) 72 72 { 73 int status = -1; 74 75 gtk_tree_model_get( model, iter, MC_STATUS, &status, -1 ); 76 if( status != TR_STATUS_STOPPED ) 73 int activity = -1; 74 gtk_tree_model_get( model, iter, MC_ACTIVITY, &activity, -1 ); 75 if( activity != TR_STATUS_STOPPED ) 77 76 *(int*)activeTorrentCount += 1; 78 77 return FALSE; /* keep iterating */ -
trunk/gtk/main.c
r6873 r6935 179 179 gpointer user_data ) 180 180 { 181 int status= 0;181 int activity = 0; 182 182 struct counts_data * counts = user_data; 183 183 184 184 ++counts->totalCount; 185 185 186 gtk_tree_model_get( model, iter, MC_ STATUS, &status, -1 );187 188 if( TR_STATUS_IS_ACTIVE( status) )186 gtk_tree_model_get( model, iter, MC_ACTIVITY, &activity, -1 ); 187 188 if( TR_STATUS_IS_ACTIVE( activity ) ) 189 189 ++counts->activeCount; 190 190 else -
trunk/gtk/torrent-cell-renderer.c
r6862 r6935 80 80 81 81 /* add time when downloading */ 82 if( torStat-> status== TR_STATUS_DOWNLOAD )82 if( torStat->activity == TR_STATUS_DOWNLOAD ) 83 83 { 84 84 const int eta = torStat->eta; … … 139 139 GString * gstr = g_string_new( NULL ); 140 140 141 switch( torStat-> status)141 switch( torStat->activity ) 142 142 { 143 143 case TR_STATUS_STOPPED: … … 160 160 { 161 161 char buf[128]; 162 if( torStat-> status!= TR_STATUS_DOWNLOAD )162 if( torStat->activity != TR_STATUS_DOWNLOAD ) 163 163 { 164 164 tr_strlratio( buf, torStat->ratio, sizeof( buf ) ); … … 181 181 getStatusString( const tr_stat * torStat ) 182 182 { 183 const int isActive = torStat-> status!= TR_STATUS_STOPPED;184 const int isChecking = torStat-> status== TR_STATUS_CHECK185 || torStat->status== TR_STATUS_CHECK_WAIT;183 const int isActive = torStat->activity != TR_STATUS_STOPPED; 184 const int isChecking = torStat->activity == TR_STATUS_CHECK 185 || torStat->activity == TR_STATUS_CHECK_WAIT; 186 186 187 187 GString * gstr = g_string_new( NULL ); … … 191 191 g_string_assign( gstr, torStat->errorString ); 192 192 } 193 else switch( torStat-> status)193 else switch( torStat->activity ) 194 194 { 195 195 case TR_STATUS_STOPPED: … … 377 377 int w, h; 378 378 struct TorrentCellRendererPrivate * p = self->priv; 379 GtkCellRenderer * text_renderer = 380 torStat->error != 0 381 ? p-> 382 text_renderer_err 383 : p-> 384 text_renderer; 385 const gboolean isActive = torStat->status != 386 TR_STATUS_STOPPED; 379 GtkCellRenderer * text_renderer = torStat->error != 0 380 ? p->text_renderer_err 381 : p->text_renderer; 382 const gboolean isActive = torStat->activity != TR_STATUS_STOPPED; 387 383 388 384 my_bg = *background_area; -
trunk/gtk/tr-core.c
r6934 r6935 378 378 379 379 /* first by state */ 380 gtk_tree_model_get( model, a, MC_ STATUS, &sa, -1 );381 gtk_tree_model_get( model, b, MC_ STATUS, &sb, -1 );380 gtk_tree_model_get( model, a, MC_ACTIVITY, &sa, -1 ); 381 gtk_tree_model_get( model, b, MC_ACTIVITY, &sb, -1 ); 382 382 ret = sa - sb; 383 383 … … 715 715 716 716 static gboolean 717 statsForeach( GtkTreeModel * 717 statsForeach( GtkTreeModel * model, 718 718 GtkTreePath * path UNUSED, 719 GtkTreeIter *iter,720 gpointer 719 GtkTreeIter * iter, 720 gpointer gstats ) 721 721 { 722 722 tr_torrent * tor; 723 723 struct core_stats * stats = gstats; 724 int status;724 int activity; 725 725 726 726 gtk_tree_model_get( model, iter, MC_TORRENT_RAW, &tor, -1 ); 727 status = tr_torrentGetStatus( tor );728 729 if( status== TR_STATUS_DOWNLOAD )727 activity = tr_torrentGetActivity( tor ); 728 729 if( activity == TR_STATUS_DOWNLOAD ) 730 730 ++stats->downloadCount; 731 else if( status== TR_STATUS_SEED )731 else if( activity == TR_STATUS_SEED ) 732 732 ++stats->seedingCount; 733 733 … … 796 796 MC_TORRENT, gtor, 797 797 MC_TORRENT_RAW, tor, 798 MC_ STATUS, torStat->status,798 MC_ACTIVITY, torStat->activity, 799 799 -1 ); 800 800 … … 1010 1010 gpointer data UNUSED ) 1011 1011 { 1012 int old Status;1013 int new Status;1012 int oldActivity; 1013 int newActivity; 1014 1014 TrTorrent * gtor; 1015 1015 … … 1017 1017 gtk_tree_model_get( model, iter, 1018 1018 MC_TORRENT, >or, 1019 MC_ STATUS, &oldStatus,1019 MC_ACTIVITY, &oldActivity, 1020 1020 -1 ); 1021 new Status = tr_torrentGetStatus( tr_torrent_handle( gtor ) );1022 if( new Status != oldStatus)1021 newActivity = tr_torrentGetActivity( tr_torrent_handle( gtor ) ); 1022 if( newActivity != oldActivity ) 1023 1023 gtk_list_store_set( GTK_LIST_STORE( model ), iter, 1024 MC_ STATUS, newStatus,1024 MC_ACTIVITY, newActivity, 1025 1025 -1 ); 1026 1026 … … 1186 1186 tr_torrent * tor = NULL; 1187 1187 while(( tor = tr_torrentNext( session, tor ))) 1188 if(( active = ( tr_torrentGet Status( tor ) != TR_STATUS_STOPPED )))1188 if(( active = ( tr_torrentGetActivity( tor ) != TR_STATUS_STOPPED ))) 1189 1189 break; 1190 1190 if( !active ) -
trunk/gtk/tr-core.h
r6795 r6935 218 218 MC_TORRENT, 219 219 MC_TORRENT_RAW, 220 MC_ STATUS,220 MC_ACTIVITY, 221 221 MC_ROW_COUNT 222 222 }; -
trunk/gtk/tr-torrent.c
r6836 r6935 163 163 164 164 static void 165 statusChangedCallback( tr_torrent* tor UNUSED,166 cp_status_t status,167 void * user_data )168 { 169 if( status == TR_CP_COMPLETE )165 completenessChangedCallback( tr_torrent * tor UNUSED, 166 tr_completeness completeness, 167 void * user_data ) 168 { 169 if( completeness == TR_CP_COMPLETE ) 170 170 g_idle_add( notifyInMainThread, user_data ); 171 171 } 172 172 173 173 static TrTorrent * 174 maketorrent( tr_torrent * handle)175 { 176 TrTorrent * tor = g_object_new( TR_TORRENT_TYPE, NULL );177 178 tor->priv->handle = handle;179 tr_torrentSet StatusCallback( handle, statusChangedCallback,tor );180 return tor;174 maketorrent( tr_torrent * tor ) 175 { 176 TrTorrent * gtor = g_object_new( TR_TORRENT_TYPE, NULL ); 177 178 gtor->priv->handle = tor; 179 tr_torrentSetCompletenessCallback( tor, completenessChangedCallback, gtor ); 180 return gtor; 181 181 } 182 182 … … 259 259 const int eta = st->eta; 260 260 261 switch( st-> status)261 switch( st->activity ) 262 262 { 263 263 case TR_STATUS_CHECK_WAIT: -
trunk/gtk/tr-window.c
r6829 r6935 319 319 { 320 320 case FILTER_MODE_DOWNLOADING: 321 ret = tr_torrentGet Status( tor ) == TR_STATUS_DOWNLOAD;321 ret = tr_torrentGetActivity( tor ) == TR_STATUS_DOWNLOAD; 322 322 break; 323 323 324 324 case FILTER_MODE_SEEDING: 325 ret = tr_torrentGet Status( tor ) == TR_STATUS_SEED;325 ret = tr_torrentGetActivity( tor ) == TR_STATUS_SEED; 326 326 break; 327 327 328 328 case FILTER_MODE_PAUSED: 329 ret = tr_torrentGet Status( tor ) == TR_STATUS_STOPPED;329 ret = tr_torrentGetActivity( tor ) == TR_STATUS_STOPPED; 330 330 break; 331 331 -
trunk/libtransmission/completion.c
r6840 r6935 293 293 } 294 294 295 cp_status_t 295 tr_completeness 296 296 tr_cpGetStatus( const tr_completion * cp ) 297 297 { -
trunk/libtransmission/completion.h
r6840 r6935 37 37 /* General */ 38 38 39 cp_status_ttr_cpGetStatus( const tr_completion * );39 tr_completeness tr_cpGetStatus( const tr_completion * ); 40 40 41 41 uint64_t tr_cpHaveTotal( const tr_completion * ); -
trunk/libtransmission/rpcimpl.c
r6857 r6935 378 378 tr_bencDictAddInt( d, key, st->startDate ); 379 379 else if( !strcmp( key, "status" ) ) 380 tr_bencDictAddInt( d, key, st-> status);380 tr_bencDictAddInt( d, key, st->activity ); 381 381 else if( !strcmp( key, "swarmSpeed" ) ) 382 382 tr_bencDictAddInt( d, key, (int)( st->swarmSpeed * 1024 ) ); -
trunk/libtransmission/torrent.c
r6931 r6935 544 544 } 545 545 546 tor->c pStatus = tr_cpGetStatus( tor->completion );546 tor->completeness = tr_cpGetStatus( tor->completion ); 547 547 548 548 tor->tracker = tr_trackerNew( tor ); … … 740 740 } 741 741 742 tr_torrent_ status743 tr_torrentGet Status( tr_torrent * tor )742 tr_torrent_activity 743 tr_torrentGetActivity( tr_torrent * tor ) 744 744 { 745 745 tr_torrentRecheckCompleteness( tor ); … … 751 751 if( !tor->isRunning ) 752 752 return TR_STATUS_STOPPED; 753 if( tor->c pStatus == TR_CP_INCOMPLETE )753 if( tor->completeness == TR_CP_INCOMPLETE ) 754 754 return TR_STATUS_DOWNLOAD; 755 755 … … 774 774 s = &tor->stats; 775 775 s->id = tor->uniqueId; 776 s-> status = tr_torrentGetStatus( tor );776 s->activity = tr_torrentGetActivity( tor ); 777 777 s->error = tor->error; 778 778 memcpy( s->errorString, tor->errorString, … … 809 809 s->sizeWhenDone = tr_cpSizeWhenDone( tor->completion ); 810 810 811 s->recheckProgress = s-> status== TR_STATUS_CHECK812 811 s->recheckProgress = s->activity == TR_STATUS_CHECK 812 ? 1.0 - 813 813 ( tr_torrentCountUncheckedPieces( tor ) / 814 814 (double) tor->info.pieceCount ) 815 815 : 0.0; 816 816 817 817 s->swarmSpeed = tr_rcRate( tor->swarmSpeed ); … … 1102 1102 *tor->errorString = '\0'; 1103 1103 tr_torrentResetTransferStats( tor ); 1104 tor->c pStatus = tr_cpGetStatus( tor->completion );1104 tor->completeness = tr_cpGetStatus( tor->completion ); 1105 1105 tr_torrentSaveResume( tor ); 1106 1106 tor->startDate = time( NULL ); … … 1226 1226 tr_globalLock( handle ); 1227 1227 1228 tr_torrentClear StatusCallback( tor );1228 tr_torrentClearCompletenessCallback( tor ); 1229 1229 tr_runInEventThread( handle, closeTorrent, tor ); 1230 1230 … … 1266 1266 1267 1267 static void 1268 fire StatusChange( tr_torrent* tor,1269 cp_status_tstatus )1268 fireCompletenessChange( tr_torrent * tor, 1269 tr_completeness status ) 1270 1270 { 1271 1271 assert( tor ); 1272 assert( 1273 status == TR_CP_INCOMPLETE || status == TR_CP_DONE || status ==1274 TR_CP_COMPLETE);1275 1276 if( tor-> status_func )1277 tor-> status_func( tor, status, tor->status_func_user_data );1278 } 1279 1280 void 1281 tr_torrentSet StatusCallback( tr_torrent *tor,1282 tr_torrent_status_funcfunc,1283 void *user_data )1272 assert( ( status == TR_CP_INCOMPLETE ) 1273 || ( status == TR_CP_DONE ) 1274 || ( status == TR_CP_COMPLETE ) ); 1275 1276 if( tor->completeness_func ) 1277 tor->completeness_func( tor, status, tor->completeness_func_user_data ); 1278 } 1279 1280 void 1281 tr_torrentSetCompletenessCallback( tr_torrent * tor, 1282 tr_torrent_completeness_func func, 1283 void * user_data ) 1284 1284 { 1285 1285 assert( tor ); 1286 tor-> status_func = func;1287 tor-> status_func_user_data = user_data;1288 } 1289 1290 void 1291 tr_torrentClear StatusCallback( tr_torrent * torrent )1292 { 1293 tr_torrentSet StatusCallback( torrent, NULL, NULL );1286 tor->completeness_func = func; 1287 tor->completeness_func_user_data = user_data; 1288 } 1289 1290 void 1291 tr_torrentClearCompletenessCallback( tr_torrent * torrent ) 1292 { 1293 tr_torrentSetCompletenessCallback( torrent, NULL, NULL ); 1294 1294 } 1295 1295 … … 1297 1297 tr_torrentRecheckCompleteness( tr_torrent * tor ) 1298 1298 { 1299 cp_status_t cpStatus;1299 tr_completeness completeness; 1300 1300 1301 1301 tr_torrentLock( tor ); 1302 1302 1303 c pStatus = tr_cpGetStatus( tor->completion );1304 1305 if( c pStatus != tor->cpStatus )1303 completeness = tr_cpGetStatus( tor->completion ); 1304 1305 if( completeness != tor->completeness ) 1306 1306 { 1307 1307 const int recentChange = tor->downloadedCur != 0; … … 1310 1310 { 1311 1311 tr_torinf( tor, _( "State changed from \"%1$s\" to \"%2$s\"" ), 1312 getCompletionString( tor->c pStatus ),1313 getCompletionString( c pStatus ) );1312 getCompletionString( tor->completeness ), 1313 getCompletionString( completeness ) ); 1314 1314 } 1315 1315 1316 tor->c pStatus = cpStatus;1317 fire StatusChange( tor, cpStatus );1318 1319 if( recentChange && ( c pStatus == TR_CP_COMPLETE ) )1316 tor->completeness = completeness; 1317 fireCompletenessChange( tor, completeness ); 1318 1319 if( recentChange && ( completeness == TR_CP_COMPLETE ) ) 1320 1320 { 1321 1321 tr_trackerCompleted( tor->tracker ); … … 1333 1333 tr_torrentIsSeed( const tr_torrent * tor ) 1334 1334 { 1335 return tor->c pStatus == TR_CP_COMPLETE || tor->cpStatus == TR_CP_DONE;1335 return tor->completeness == TR_CP_COMPLETE || tor->completeness == TR_CP_DONE; 1336 1336 } 1337 1337 -
trunk/libtransmission/torrent.h
r6932 r6935 195 195 196 196 struct tr_bitfield * checkedPieces; 197 cp_status_t cpStatus;197 tr_completeness completeness; 198 198 199 199 struct tr_tracker * tracker; … … 212 212 time_t startDate; 213 213 214 tr_torrent_ status_func * status_func;215 void * status_func_user_data;214 tr_torrent_completeness_func * completeness_func; 215 void * completeness_func_user_data; 216 216 217 217 unsigned int isRunning : 1; -
trunk/libtransmission/transmission.h
r6933 r6935 390 390 TR_RPC_TORRENT_STOPPED, 391 391 TR_RPC_TORRENT_REMOVING, 392 TR_RPC_TORRENT_CHANGED, 392 TR_RPC_TORRENT_CHANGED, /* catch-all for the "torrent-set" rpc method */ 393 393 TR_RPC_SESSION_CHANGED 394 394 } … … 408 408 tr_rpc_callback_status; 409 409 410 typedef tr_rpc_callback_status ( *tr_rpc_func )( tr_session * 411 handle, 412 tr_rpc_callback_type type, 413 struct tr_torrent * 414 tor_or_null, 415 void * 416 user_data ); 417 418 void tr_sessionSetRPCCallback( tr_session * handle, 419 tr_rpc_func func, 420 void * user_data ); 410 typedef tr_rpc_callback_status (*tr_rpc_func)(tr_session * session, 411 tr_rpc_callback_type type, 412 struct tr_torrent * tor_or_null, 413 void * user_data ); 414 415 /** 416 * Register to be notified whenever something is changed via RPC, 417 * such as a torrent being added, removed, started, stopped, etc. 418 * 419 * func is invoked FROM LIBTRANSMISSION'S THREAD! 420 * This means func must be fast (to avoid blocking peers), 421 * shouldn't call libtransmission functions (to avoid deadlock), 422 * and shouldn't modify client-level memory without using a mutex! 423 */ 424 void tr_sessionSetRPCCallback( tr_session * session, 425 tr_rpc_func func, 426 void * user_data ); 421 427 422 428 /** … … 970 976 { 971 977 TR_CP_INCOMPLETE, /* doesn't have all the desired pieces */ 972 TR_CP_DONE, /* has all the pieces but the DND ones */978 TR_CP_DONE, /* has all the desired pieces, but not all pieces */ 973 979 TR_CP_COMPLETE /* has every piece */ 974 980 } 975 cp_status_t; 976 977 typedef void ( tr_torrent_status_func )( tr_torrent * torrent, 978 cp_status_t status, 979 void * user_data ); 980 981 /** 982 * Register to be notified whenever a torrent's state changes. 981 tr_completeness; 982 983 typedef void ( tr_torrent_completeness_func )( tr_torrent * torrent, 984 tr_completeness completeness, 985 void * user_data ); 986 987 /** 988 * Register to be notified whenever a torrent's "completeness" 989 * changes. This will be called, for example, when a torrent 990 * finishes downloading and changes from TR_CP_INCOMPLETE to 991 * either TR_CP_COMPLETE or TR_CP_DONE. 983 992 * 984 993 * func is invoked FROM LIBTRANSMISSION'S THREAD! … … 986 995 * shouldn't call libtransmission functions (to avoid deadlock), 987 996 * and shouldn't modify client-level memory without using a mutex! 988 */ 989 void tr_torrentSetStatusCallback( tr_torrent * torrent, 990 tr_torrent_status_func func, 991 void * user_data ); 992 993 void tr_torrentClearStatusCallback( tr_torrent * torrent ); 997 * 998 * @see tr_completeness 999 */ 1000 void tr_torrentSetCompletenessCallback( 1001 tr_torrent * torrent, 1002 tr_torrent_completeness_func func, 1003 void * user_data ); 1004 1005 void tr_torrentClearCompletenessCallback( tr_torrent * torrent ); 994 1006 995 1007 … … 1155 1167 }; 1156 1168 1169 /** 1170 * What the torrent is doing right now. 1171 * 1172 * Note: these values will become a straight enum at some point in the future. 1173 * Do not rely on their current `bitfield' implementation 1174 */ 1157 1175 typedef enum 1158 1176 { … … 1163 1181 TR_STATUS_STOPPED = ( 1 << 4 ) /* Torrent is stopped */ 1164 1182 } 1165 tr_torrent_ status;1183 tr_torrent_activity; 1166 1184 1167 1185 #define TR_STATUS_IS_ACTIVE( s ) ( ( s ) != TR_STATUS_STOPPED ) … … 1175 1193 tr_lockfile_state_t; 1176 1194 1177 tr_torrent_ status tr_torrentGetStatus( tr_torrent * );1195 tr_torrent_activity tr_torrentGetActivity( tr_torrent * ); 1178 1196 1179 1197 enum … … 1199 1217 int id; 1200 1218 1201 /** The torrent's current status*/1202 tr_torrent_ status status;1219 /** What is this torrent doing right now? */ 1220 tr_torrent_activity activity; 1203 1221 1204 1222 /** Our current announce URL, or NULL if none. -
trunk/macosx/Torrent.m
r6887 r6935 61 61 @end 62 62 63 void completenessChangeCallback(tr_torrent * torrent, cp_status_tstatus, void * torrentData)63 void completenessChangeCallback(tr_torrent * torrent, tr_completeness status, void * torrentData) 64 64 { 65 65 [(Torrent *)torrentData performSelectorOnMainThread: @selector(completenessChange:) … … 951 951 - (BOOL) isActive 952 952 { 953 return fStat-> status!= TR_STATUS_STOPPED;953 return fStat->activity != TR_STATUS_STOPPED; 954 954 } 955 955 956 956 - (BOOL) isSeeding 957 957 { 958 return fStat-> status== TR_STATUS_SEED;958 return fStat->activity == TR_STATUS_SEED; 959 959 } 960 960 961 961 - (BOOL) isChecking 962 962 { 963 return fStat-> status == TR_STATUS_CHECK || fStat->status== TR_STATUS_CHECK_WAIT;963 return fStat->activity == TR_STATUS_CHECK || fStat->activity == TR_STATUS_CHECK_WAIT; 964 964 } 965 965 966 966 - (BOOL) isCheckingWaiting 967 967 { 968 return fStat-> status== TR_STATUS_CHECK_WAIT;968 return fStat->activity == TR_STATUS_CHECK_WAIT; 969 969 } 970 970 … … 1108 1108 1109 1109 //add time when downloading 1110 if (fStat-> status== TR_STATUS_DOWNLOAD || ([self isSeeding]1110 if (fStat->activity == TR_STATUS_DOWNLOAD || ([self isSeeding] 1111 1111 && (fRatioSetting == NSOnState || (fRatioSetting == NSMixedState && [fDefaults boolForKey: @"RatioCheck"])))) 1112 1112 { 1113 int eta = fStat-> status== TR_STATUS_DOWNLOAD ? [self eta] : [self etaRatio];1113 int eta = fStat->activity == TR_STATUS_DOWNLOAD ? [self eta] : [self etaRatio]; 1114 1114 string = [string stringByAppendingFormat: @" - %@", [self etaString: eta]]; 1115 1115 } … … 1131 1131 else 1132 1132 { 1133 switch (fStat-> status)1133 switch (fStat->activity) 1134 1134 { 1135 1135 case TR_STATUS_STOPPED: … … 1194 1194 if ([self isActive] && ![self isChecking]) 1195 1195 { 1196 if (fStat-> status== TR_STATUS_DOWNLOAD)1196 if (fStat->activity == TR_STATUS_DOWNLOAD) 1197 1197 string = [string stringByAppendingFormat: @" - %@: %@, %@: %@", 1198 1198 NSLocalizedString(@"DL", "Torrent -> status string"), [NSString stringForSpeed: [self downloadRate]], … … 1210 1210 NSString * string; 1211 1211 1212 switch (fStat-> status)1212 switch (fStat->activity) 1213 1213 { 1214 1214 case TR_STATUS_STOPPED: … … 1260 1260 - (NSString *) stateString 1261 1261 { 1262 switch (fStat-> status)1262 switch (fStat->activity) 1263 1263 { 1264 1264 case TR_STATUS_STOPPED: … … 1708 1708 } 1709 1709 1710 tr_torrentSet StatusCallback(fHandle, completenessChangeCallback, self);1710 tr_torrentSetCompletenessCallback(fHandle, completenessChangeCallback, self); 1711 1711 1712 1712 fNameString = [[NSString alloc] initWithUTF8String: fInfo->name];
Note: See TracChangeset
for help on using the changeset viewer.