(trunk) #1796 "run script after torrent completion" -- implemented for libT, RPC, and the GTK+ and Qt clients

This commit is contained in:
Charles Kerr
2010-05-08 22:42:28 +00:00
parent 382ae1334c
commit da2ef53eeb
14 changed files with 271 additions and 99 deletions

View File

@@ -1144,12 +1144,10 @@ onAddTorrent( TrCore * core,
}
static void
prefschanged( TrCore * core UNUSED,
const char * key,
gpointer data )
prefschanged( TrCore * core UNUSED, const char * key, gpointer data )
{
struct cbdata * cbdata = data;
tr_session * tr = tr_core_session( cbdata->core );
struct cbdata * cbdata = data;
tr_session * tr = tr_core_session( cbdata->core );
if( !strcmp( key, TR_PREFS_KEY_ENCRYPTION ) )
{
@@ -1323,6 +1321,14 @@ prefschanged( TrCore * core UNUSED,
{
tr_sessionSetIncompleteDirEnabled( tr, pref_flag_get( key ) );
}
else if( !strcmp( key, TR_PREFS_KEY_SCRIPT_TORRENT_DONE_ENABLED ) )
{
tr_sessionSetTorrentDoneScriptEnabled( tr, pref_flag_get( key ) );
}
else if( !strcmp( key, TR_PREFS_KEY_SCRIPT_TORRENT_DONE_FILENAME ) )
{
tr_sessionSetTorrentDoneScript( tr, pref_string_get( key ) );
}
else if( !strcmp( key, TR_PREFS_KEY_START) )
{
tr_sessionSetPaused( tr, !pref_flag_get( key ) );