(trunk, libT) #2844 "add able to disable '.part' suffix for incomplete files" -- added to GTK+ and Qt clients and to RPC spec for 1.90
This commit is contained in:
parent
dd9da625d1
commit
92f67263ee
|
@ -406,6 +406,7 @@
|
||||||
"peer-port" | number port number
|
"peer-port" | number port number
|
||||||
"peer-port-random-on-start"| boolean true means pick a random peer port on launch
|
"peer-port-random-on-start"| boolean true means pick a random peer port on launch
|
||||||
"port-forwarding-enabled" | boolean true means enabled
|
"port-forwarding-enabled" | boolean true means enabled
|
||||||
|
"rename-partial-files" | boolean true means append ".part" to incomplete files
|
||||||
"rpc-version" | number the current RPC API version
|
"rpc-version" | number the current RPC API version
|
||||||
"rpc-version-minimum" | number the minimum RPC API version supported
|
"rpc-version-minimum" | number the minimum RPC API version supported
|
||||||
"seedRatioLimit" | double the default seed ratio for torrents to use
|
"seedRatioLimit" | double the default seed ratio for torrents to use
|
||||||
|
@ -572,5 +573,7 @@
|
||||||
| | yes | torrent-get | new arg "trackerStats"
|
| | yes | torrent-get | new arg "trackerStats"
|
||||||
| | yes | session-set | new arg "incomplete-dir"
|
| | yes | session-set | new arg "incomplete-dir"
|
||||||
| | yes | session-set | new arg "incomplete-dir-enabled"
|
| | yes | session-set | new arg "incomplete-dir-enabled"
|
||||||
|
------+---------+-----------+----------------+-------------------------------
|
||||||
|
8 | 1.90 | yes | session-set | new arg "rename-partial-files"
|
||||||
|
| | yes | session-get | new arg "rename-partial-files"
|
||||||
|
|
||||||
|
|
|
@ -1193,6 +1193,10 @@ prefschanged( TrCore * core UNUSED,
|
||||||
{
|
{
|
||||||
tr_sessionSetPexEnabled( tr, pref_flag_get( key ) );
|
tr_sessionSetPexEnabled( tr, pref_flag_get( key ) );
|
||||||
}
|
}
|
||||||
|
else if( !strcmp( key, TR_PREFS_KEY_RENAME_PARTIAL_FILES ) )
|
||||||
|
{
|
||||||
|
tr_sessionSetIncompleteFileNamingEnabled( tr, pref_flag_get( key ) );
|
||||||
|
}
|
||||||
else if( !strcmp( key, TR_PREFS_KEY_DHT_ENABLED ) )
|
else if( !strcmp( key, TR_PREFS_KEY_DHT_ENABLED ) )
|
||||||
{
|
{
|
||||||
tr_sessionSetDHTEnabled( tr, pref_flag_get( key ) );
|
tr_sessionSetDHTEnabled( tr, pref_flag_get( key ) );
|
||||||
|
|
|
@ -297,6 +297,10 @@ torrentPage( GObject * core )
|
||||||
w = new_check_button( s, PREF_KEY_TRASH_ORIGINAL, core );
|
w = new_check_button( s, PREF_KEY_TRASH_ORIGINAL, core );
|
||||||
hig_workarea_add_wide_control( t, &row, w );
|
hig_workarea_add_wide_control( t, &row, w );
|
||||||
|
|
||||||
|
s = _( "Append \"._part\" to incomplete files' names" );
|
||||||
|
w = new_check_button( s, TR_PREFS_KEY_RENAME_PARTIAL_FILES, core );
|
||||||
|
hig_workarea_add_wide_control( t, &row, w );
|
||||||
|
|
||||||
s = _( "Keep _incomplete torrents in:" );
|
s = _( "Keep _incomplete torrents in:" );
|
||||||
l = new_check_button( s, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, core );
|
l = new_check_button( s, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, core );
|
||||||
w = new_path_chooser_button( TR_PREFS_KEY_INCOMPLETE_DIR, core );
|
w = new_path_chooser_button( TR_PREFS_KEY_INCOMPLETE_DIR, core );
|
||||||
|
|
|
@ -1185,6 +1185,8 @@ sessionSet( tr_session * session,
|
||||||
tr_sessionSetPeerPort( session, i );
|
tr_sessionSetPeerPort( session, i );
|
||||||
if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_PORT_FORWARDING, &boolVal ) )
|
if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_PORT_FORWARDING, &boolVal ) )
|
||||||
tr_sessionSetPortForwardingEnabled( session, boolVal );
|
tr_sessionSetPortForwardingEnabled( session, boolVal );
|
||||||
|
if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_RENAME_PARTIAL_FILES, &boolVal ) )
|
||||||
|
tr_sessionSetIncompleteFileNamingEnabled( session, boolVal );
|
||||||
if( tr_bencDictFindReal( args_in, "seedRatioLimit", &d ) )
|
if( tr_bencDictFindReal( args_in, "seedRatioLimit", &d ) )
|
||||||
tr_sessionSetRatioLimit( session, d );
|
tr_sessionSetRatioLimit( session, d );
|
||||||
if( tr_bencDictFindBool( args_in, "seedRatioLimited", &boolVal ) )
|
if( tr_bencDictFindBool( args_in, "seedRatioLimited", &boolVal ) )
|
||||||
|
@ -1287,7 +1289,8 @@ sessionGet( tr_session * s,
|
||||||
tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_PORT, tr_sessionGetPeerPort( s ) );
|
tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_PORT, tr_sessionGetPeerPort( s ) );
|
||||||
tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_PORT_RANDOM_ON_START, tr_sessionGetPeerPortRandomOnStart( s ) );
|
tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_PORT_RANDOM_ON_START, tr_sessionGetPeerPortRandomOnStart( s ) );
|
||||||
tr_bencDictAddBool( d, TR_PREFS_KEY_PORT_FORWARDING, tr_sessionIsPortForwardingEnabled( s ) );
|
tr_bencDictAddBool( d, TR_PREFS_KEY_PORT_FORWARDING, tr_sessionIsPortForwardingEnabled( s ) );
|
||||||
tr_bencDictAddInt ( d, "rpc-version", 7 );
|
tr_bencDictAddBool( d, TR_PREFS_KEY_RENAME_PARTIAL_FILES, tr_sessionIsIncompleteFileNamingEnabled( s ) );
|
||||||
|
tr_bencDictAddInt ( d, "rpc-version", 8 );
|
||||||
tr_bencDictAddInt ( d, "rpc-version-minimum", 1 );
|
tr_bencDictAddInt ( d, "rpc-version-minimum", 1 );
|
||||||
tr_bencDictAddReal( d, "seedRatioLimit", tr_sessionGetRatioLimit( s ) );
|
tr_bencDictAddReal( d, "seedRatioLimit", tr_sessionGetRatioLimit( s ) );
|
||||||
tr_bencDictAddBool( d, "seedRatioLimited", tr_sessionIsRatioLimited( s ) );
|
tr_bencDictAddBool( d, "seedRatioLimited", tr_sessionIsRatioLimited( s ) );
|
||||||
|
|
|
@ -566,6 +566,7 @@ PrefsDialog :: createTorrentsTab( )
|
||||||
hig->addWideControl( checkBoxNew( tr( "Show &options dialog" ), Prefs::OPTIONS_PROMPT ) );
|
hig->addWideControl( checkBoxNew( tr( "Show &options dialog" ), Prefs::OPTIONS_PROMPT ) );
|
||||||
hig->addWideControl( checkBoxNew( tr( "&Start when added" ), Prefs::START ) );
|
hig->addWideControl( checkBoxNew( tr( "&Start when added" ), Prefs::START ) );
|
||||||
hig->addWideControl( checkBoxNew( tr( "Mo&ve .torrent file to the trash" ), Prefs::TRASH_ORIGINAL ) );
|
hig->addWideControl( checkBoxNew( tr( "Mo&ve .torrent file to the trash" ), Prefs::TRASH_ORIGINAL ) );
|
||||||
|
hig->addWideControl( checkBoxNew( tr( "Append \".&part\" to incomplete files' names" ), Prefs::RENAME_PARTIAL_FILES ) );
|
||||||
|
|
||||||
b = myIncompleteButton = new QPushButton;
|
b = myIncompleteButton = new QPushButton;
|
||||||
b->setIcon( folderPixmap );
|
b->setIcon( folderPixmap );
|
||||||
|
|
|
@ -102,6 +102,7 @@ Prefs::PrefItem Prefs::myItems[] =
|
||||||
{ PROXY_USERNAME, TR_PREFS_KEY_PROXY_USERNAME, QVariant::String },
|
{ PROXY_USERNAME, TR_PREFS_KEY_PROXY_USERNAME, QVariant::String },
|
||||||
{ RATIO, TR_PREFS_KEY_RATIO, QVariant::Double },
|
{ RATIO, TR_PREFS_KEY_RATIO, QVariant::Double },
|
||||||
{ RATIO_ENABLED, TR_PREFS_KEY_RATIO_ENABLED, QVariant::Bool },
|
{ RATIO_ENABLED, TR_PREFS_KEY_RATIO_ENABLED, QVariant::Bool },
|
||||||
|
{ RENAME_PARTIAL_FILES, TR_PREFS_KEY_RENAME_PARTIAL_FILES, QVariant::Bool },
|
||||||
{ RPC_AUTH_REQUIRED, TR_PREFS_KEY_RPC_AUTH_REQUIRED, QVariant::Bool },
|
{ RPC_AUTH_REQUIRED, TR_PREFS_KEY_RPC_AUTH_REQUIRED, QVariant::Bool },
|
||||||
{ RPC_ENABLED, TR_PREFS_KEY_RPC_ENABLED, QVariant::Bool },
|
{ RPC_ENABLED, TR_PREFS_KEY_RPC_ENABLED, QVariant::Bool },
|
||||||
{ RPC_PASSWORD, TR_PREFS_KEY_RPC_PASSWORD, QVariant::String },
|
{ RPC_PASSWORD, TR_PREFS_KEY_RPC_PASSWORD, QVariant::String },
|
||||||
|
|
|
@ -106,6 +106,7 @@ class Prefs: public QObject
|
||||||
PROXY_USERNAME,
|
PROXY_USERNAME,
|
||||||
RATIO,
|
RATIO,
|
||||||
RATIO_ENABLED,
|
RATIO_ENABLED,
|
||||||
|
RENAME_PARTIAL_FILES,
|
||||||
RPC_AUTH_REQUIRED,
|
RPC_AUTH_REQUIRED,
|
||||||
RPC_ENABLED,
|
RPC_ENABLED,
|
||||||
RPC_PASSWORD,
|
RPC_PASSWORD,
|
||||||
|
|
Loading…
Reference in New Issue