Changeset 9330
- Timestamp:
- Oct 19, 2009, 5:25:50 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/rpc-spec.txt
r9259 r9330 391 391 "blocklist-enabled" | boolean true means enabled 392 392 "blocklist-size" | number number of rules in the blocklist 393 "download-dir" | string default path to download torrents 393 394 "dht-enabled" | boolean true means allow dht in public torrents 394 395 "encryption" | string "required", "preferred", "tolerated" 395 "download-dir" | string default path to download torrents 396 "incomplete-dir" | string path for incomplete torrents, when enabled 397 "incomplete-dir-enabled" | boolean true means keep torrents in incomplete-dir until done 396 398 "peer-limit-global" | number maximum global number of peers 397 399 "peer-limit-per-torrent" | number maximum global number of peers … … 560 562 | | NO | torrent-get | removed arg "seeders" 561 563 | | NO | torrent-get | removed arg "timesCompleted" 562 | | yes NO | torrent-get | new arg "trackerStats" 563 564 564 | | yes | torrent-get | new arg "trackerStats" 565 | | yes | session-set | new arg "incomplete-dir" 566 | | yes | session-set | new arg "incomplete-dir-enabled" 567 568 -
trunk/libtransmission/rpcimpl.c
r9259 r9330 1147 1147 if( tr_bencDictFindStr( args_in, TR_PREFS_KEY_DOWNLOAD_DIR, &str ) ) 1148 1148 tr_sessionSetDownloadDir( session, str ); 1149 if( tr_bencDictFindStr( args_in, TR_PREFS_KEY_INCOMPLETE_DIR, &str ) ) 1150 tr_sessionSetIncompleteDir( session, str ); 1151 if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, &boolVal ) ) 1152 tr_sessionSetIncompleteDirEnabled( session, boolVal ); 1149 1153 if( tr_bencDictFindInt( args_in, TR_PREFS_KEY_PEER_LIMIT_GLOBAL, &i ) ) 1150 1154 tr_sessionSetPeerLimit( session, i ); … … 1256 1260 tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_LIMIT_GLOBAL, tr_sessionGetPeerLimit( s ) ); 1257 1261 tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_LIMIT_TORRENT, tr_sessionGetPeerLimitPerTorrent( s ) ); 1262 tr_bencDictAddStr ( d, TR_PREFS_KEY_INCOMPLETE_DIR, tr_sessionGetIncompleteDir( s ) ); 1263 tr_bencDictAddBool( d, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, tr_sessionGetIncompleteDirEnabled( s ) ); 1258 1264 tr_bencDictAddBool( d, TR_PREFS_KEY_PEX_ENABLED, tr_sessionIsPexEnabled( s ) ); 1259 1265 tr_bencDictAddBool( d, TR_PREFS_KEY_DHT_ENABLED, tr_sessionIsDHTEnabled( s ) ); … … 1261 1267 tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_PORT_RANDOM_ON_START, tr_sessionGetPeerPortRandomOnStart( s ) ); 1262 1268 tr_bencDictAddBool( d, TR_PREFS_KEY_PORT_FORWARDING, tr_sessionIsPortForwardingEnabled( s ) ); 1263 tr_bencDictAddInt ( d, "rpc-version", 6);1269 tr_bencDictAddInt ( d, "rpc-version", 7 ); 1264 1270 tr_bencDictAddInt ( d, "rpc-version-minimum", 1 ); 1265 1271 tr_bencDictAddReal( d, "seedRatioLimit", tr_sessionGetRatioLimit( s ) ); -
trunk/qt/prefs-dialog.cc
r9247 r9330 487 487 488 488 void 489 PrefsDialog :: onIncompleteClicked( void ) 490 { 491 const QString title = tr( "Select Incomplete Directory" ); 492 const QString path = myPrefs.getString( Prefs::INCOMPLETE_DIR ); 493 QFileDialog * d = new QFileDialog( this, title, path ); 494 d->setFileMode( QFileDialog::Directory ); 495 connect( d, SIGNAL(filesSelected(const QStringList&)), 496 this, SLOT(onIncompleteSelected(const QStringList&)) ); 497 d->show( ); 498 } 499 500 void 501 PrefsDialog :: onIncompleteSelected( const QStringList& list ) 502 { 503 if( list.size() == 1 ) 504 myPrefs.set( Prefs::INCOMPLETE_DIR, list.first( ) ); 505 } 506 507 508 void 489 509 PrefsDialog :: onWatchClicked( void ) 490 510 { 491 QFileDialog * d = new QFileDialog( this,492 tr( "Select Watch Directory" ),493 myPrefs.getString( Prefs::DIR_WATCH ));511 const QString title = tr( "Select Watch Directory" ); 512 const QString path = myPrefs.getString( Prefs::DIR_WATCH ); 513 QFileDialog * d = new QFileDialog( this, title, path ); 494 514 d->setFileMode( QFileDialog::Directory ); 495 connect( d, SIGNAL(filesSelected(const QStringList&)), this, SLOT(onWatchSelected(const QStringList&)) ); 515 connect( d, SIGNAL(filesSelected(const QStringList&)), 516 this, SLOT(onWatchSelected(const QStringList&)) ); 496 517 d->show( ); 497 518 } … … 507 528 PrefsDialog :: onDestinationClicked( void ) 508 529 { 509 QFileDialog * d = new QFileDialog( this,510 tr( "Select Destination" ),511 myPrefs.getString( Prefs::DOWNLOAD_DIR ));530 const QString title = tr( "Select Destination" ); 531 const QString path = myPrefs.getString( Prefs::DOWNLOAD_DIR ); 532 QFileDialog * d = new QFileDialog( this, title, path ); 512 533 d->setFileMode( QFileDialog::Directory ); 513 connect( d, SIGNAL(filesSelected(const QStringList&)), this, SLOT(onDestinationSelected(const QStringList&)) ); 534 connect( d, SIGNAL(filesSelected(const QStringList&)), 535 this, SLOT(onDestinationSelected(const QStringList&)) ); 514 536 d->show( ); 515 537 } -
trunk/qt/prefs-dialog.h
r8763 r9330 53 53 void onWatchClicked( ); 54 54 void onWatchSelected( const QStringList& ); 55 void onIncompleteClicked( ); 56 void onIncompleteSelected( const QStringList& ); 55 57 void onDestinationClicked( ); 56 58 void onDestinationSelected( const QStringList& ); … … 95 97 QPushButton * myPortButton; 96 98 QPushButton * myWatchButton; 99 QPushButton * myIncompleteButton; 97 100 QPushButton * myDestinationButton; 98 101 QWidgetList myWebWidgets; -
trunk/qt/prefs.cc
r9237 r9330 78 78 { DOWNLOAD_DIR, TR_PREFS_KEY_DOWNLOAD_DIR, QVariant::String }, 79 79 { ENCRYPTION, TR_PREFS_KEY_ENCRYPTION, QVariant::Int }, 80 { INCOMPLETE_DIR, TR_PREFS_KEY_INCOMPLETE_DIR, QVariant::String }, 81 { INCOMPLETE_DIR_ENABLED, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, QVariant::Bool }, 80 82 { LAZY_BITFIELD, TR_PREFS_KEY_LAZY_BITFIELD, QVariant::Bool }, 81 83 { MSGLEVEL, TR_PREFS_KEY_MSGLEVEL, QVariant::Int }, -
trunk/qt/prefs.h
r9237 r9330 82 82 DOWNLOAD_DIR, 83 83 ENCRYPTION, 84 INCOMPLETE_DIR, 85 INCOMPLETE_DIR_ENABLED, 84 86 LAZY_BITFIELD, 85 87 MSGLEVEL, -
trunk/qt/session.cc
r9328 r9330 123 123 case Prefs :: DHT_ENABLED: 124 124 case Prefs :: DOWNLOAD_DIR: 125 case Prefs :: INCOMPLETE_DIR: 126 case Prefs :: INCOMPLETE_DIR_ENABLED: 125 127 case Prefs :: PEER_LIMIT_GLOBAL: 126 128 case Prefs :: PEER_LIMIT_TORRENT:
Note: See TracChangeset
for help on using the changeset viewer.