g_signal_connect( w, "toggled", G_CALLBACK(target_cb), w2 );
hig_workarea_add_row_w( t, &row, w, w2, NULL );
- s = _("_Forward these port(s) from my router" );
+ s = _("Use port _forwarding from my router" );
w = new_check_button( s, PREF_KEY_NAT, core );
hig_workarea_add_wide_control( t, &row, w );
*** Start/Stop Callback
**/
-static void
-fireActiveChange( tr_torrent * tor, int isRunning )
-{
- assert( tor != NULL );
-
- if( tor->active_func != NULL )
- (tor->active_func)( tor, isRunning, tor->active_func_user_data );
-}
-
-void
-tr_torrentSetActiveCallback( tr_torrent * tor,
- tr_torrent_active_func func,
- void * user_data )
-{
- assert( tor != NULL );
- tor->active_func = func;
- tor->active_func_user_data = user_data;
-}
-
-void
-tr_torrentClearActiveCallback( tr_torrent * torrent )
-{
- tr_torrentSetActiveCallback( torrent, NULL, NULL );
-}
-
-
static void
checkAndStartImpl( void * vtor )
{
tr_globalLock( tor->handle );
tor->isRunning = 1;
- fireActiveChange( tor, tor->isRunning );
*tor->errorString = '\0';
tr_torrentResetTransferStats( tor );
tor->cpStatus = tr_cpGetStatus( tor->completion );
tr_verifyRemove( tor );
tr_peerMgrStopTorrent( tor->handle->peerMgr, tor->info.hash );
tr_trackerStop( tor->tracker );
- fireActiveChange( tor, 0 );
for( i=0; i<tor->info.fileCount; ++i )
{
tr_torrent_status_func * status_func;
void * status_func_user_data;
- tr_torrent_active_func * active_func;
- void * active_func_user_data;
-
unsigned int isRunning : 1;
unsigned int isDeleting : 1;
void tr_torrentClearStatusCallback( tr_torrent * torrent );
-
-/**
-***
-**/
-
-typedef void (tr_torrent_active_func)(tr_torrent * torrent,
- int isRunning,
- void * user_data );
-
-/**
- * Register to be notified whenever a torrent starts or stops.
- *
- * func is invoked FROM LIBTRANSMISSION'S THREAD!
- * This means func must be fast (to avoid blocking peers),
- * shouldn't call libtransmission functions (to avoid deadlock),
- * and shouldn't modify client-level memory without using a mutex!
- */
-void tr_torrentSetActiveCallback( tr_torrent * torrent,
- tr_torrent_active_func func,
- void * user_data );
-
-void tr_torrentClearActiveCallback( tr_torrent * torrent );
-
-
/**
* MANUAL ANNOUNCE
*