Changeset 11834
- Timestamp:
- Feb 6, 2011, 5:30:46 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/main.c
r11831 r11834 454 454 TrCore * core; 455 455 int id; 456 gboolean delete_files; 456 457 }; 457 458 … … 461 462 struct torrent_idle_data * data = gdata; 462 463 463 tr_core_remove_torrent_from_id( data->core, data->id, FALSE);464 tr_core_remove_torrent_from_id( data->core, data->id, data->delete_files ); 464 465 465 466 g_free( data ); … … 512 513 } 513 514 514 case TR_RPC_TORRENT_REMOVING: { 515 case TR_RPC_TORRENT_REMOVING: 516 case TR_RPC_TORRENT_TRASHING: { 515 517 struct torrent_idle_data * data = g_new0( struct torrent_idle_data, 1 ); 516 518 data->id = tr_torrentId( tor ); 517 519 data->core = cbdata->core; 520 data->delete_files = type == TR_RPC_TORRENT_TRASHING; 518 521 gtr_idle_add( rpc_torrent_remove_idle, data ); 519 522 status = TR_RPC_NOREMOVE; -
trunk/libtransmission/rpcimpl.c
r11709 r11834 245 245 int i; 246 246 int torrentCount; 247 tr_rpc_callback_type type; 248 tr_bool deleteFlag = FALSE; 247 249 tr_torrent ** torrents = getTorrents( session, args_in, &torrentCount ); 248 250 249 251 assert( idle_data == NULL ); 250 252 253 tr_bencDictFindBool( args_in, "delete-local-data", &deleteFlag ); 254 type = deleteFlag ? TR_RPC_TORRENT_TRASHING 255 : TR_RPC_TORRENT_REMOVING; 256 251 257 for( i=0; i<torrentCount; ++i ) 252 258 { 253 259 tr_torrent * tor = torrents[i]; 254 const tr_rpc_callback_status status = notify( session, TR_RPC_TORRENT_REMOVING, tor );260 const tr_rpc_callback_status status = notify( session, type, tor ); 255 261 if( !( status & TR_RPC_NOREMOVE ) ) 256 {257 tr_bool deleteFlag = FALSE;258 tr_bencDictFindBool( args_in, "delete-local-data", &deleteFlag );259 262 tr_torrentRemove( tor, deleteFlag, NULL ); 260 }261 263 } 262 264 -
trunk/libtransmission/transmission.h
r11812 r11834 498 498 TR_RPC_TORRENT_STOPPED, 499 499 TR_RPC_TORRENT_REMOVING, 500 TR_RPC_TORRENT_TRASHING, /* _REMOVING + delete local data */ 500 501 TR_RPC_TORRENT_CHANGED, /* catch-all for the "torrent-set" rpc method */ 501 502 TR_RPC_TORRENT_MOVED,
Note: See TracChangeset
for help on using the changeset viewer.