handle all settings changed by rpc (previously download location was missing)
This commit is contained in:
parent
4951ba05d0
commit
bd2ad5ca97
|
@ -1553,10 +1553,8 @@ typedef enum
|
|||
|
||||
[fTrackers removeObjectsAtIndexes: indexes];
|
||||
|
||||
if (![torrent updateAllTrackersForRemove: fTrackers])
|
||||
NSBeep();
|
||||
else
|
||||
[fTrackerTable deselectAll: self];
|
||||
[torrent updateAllTrackersForRemove: fTrackers];
|
||||
[fTrackerTable deselectAll: self];
|
||||
|
||||
//reset table with either new or old value
|
||||
[fTrackers release];
|
||||
|
|
|
@ -810,7 +810,8 @@
|
|||
[fDefaults setBool: encryptionMode == TR_ENCRYPTION_PREFERRED forKey: @"EncryptionPrefer"];
|
||||
|
||||
//download directory
|
||||
#warning missing!
|
||||
NSString * downloadLocation = [[NSString stringWithUTF8String: tr_sessionGetDownloadDir(fHandle)] stringByStandardizingPath];
|
||||
[fDefaults setObject: downloadLocation forKey: @"DownloadFolder"];
|
||||
|
||||
//peers
|
||||
uint16_t peersTotal = tr_sessionGetPeerLimit(fHandle);
|
||||
|
@ -850,6 +851,8 @@
|
|||
{
|
||||
//encryption handled by bindings
|
||||
|
||||
//download directory handled by bindings
|
||||
|
||||
[fPeersGlobalField setIntValue: peersTotal];
|
||||
|
||||
//pex handled by bindings
|
||||
|
|
|
@ -151,7 +151,7 @@ typedef enum
|
|||
|
||||
- (NSMutableArray *) allTrackers: (BOOL) separators;
|
||||
- (BOOL) updateAllTrackersForAdd: (NSMutableArray *) trackers;
|
||||
- (BOOL) updateAllTrackersForRemove: (NSMutableArray *) trackers;
|
||||
- (void) updateAllTrackersForRemove: (NSMutableArray *) trackers;
|
||||
- (BOOL) hasAddedTrackers;
|
||||
|
||||
- (NSString *) comment;
|
||||
|
|
|
@ -819,15 +819,13 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL) updateAllTrackersForRemove: (NSMutableArray *) trackers
|
||||
- (void) updateAllTrackersForRemove: (NSMutableArray *) trackers
|
||||
{
|
||||
//check if no user-added groups
|
||||
if ([[trackers objectAtIndex: 0] intValue] != 0)
|
||||
fAddedTrackers = NO;
|
||||
|
||||
[self updateAllTrackers: trackers];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL) hasAddedTrackers
|
||||
|
|
Loading…
Reference in New Issue