Changeset 497 for trunk/macosx/Controller.m
- Timestamp:
- Jul 1, 2006, 9:34:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r496 r497 122 122 NSView * contentView = [fWindow contentView]; 123 123 [contentView addSubview: fStatusBar]; 124 [fStatusBar setFrameOrigin: NSMakePoint(0, [fScrollView frame].origin.y 125 + [fScrollView frame].size.height)]; 124 [fStatusBar setFrameOrigin: NSMakePoint(0, [fScrollView frame].origin.y + [fScrollView frame].size.height)]; 126 125 [self showStatusBar: [fDefaults boolForKey: @"StatusBar"] animate: NO]; 127 126 128 127 //set speed limit 129 BOOL speedLimit = [fDefaults boolForKey: @"SpeedLimit"]; 130 if (speedLimit) 131 { 132 [fSpeedLimitItem setState: speedLimit]; 133 [fSpeedLimitDockItem setState: speedLimit]; 128 if ([fDefaults boolForKey: @"SpeedLimit"]) 129 { 130 [fSpeedLimitItem setState: NSOnState]; 131 [fSpeedLimitDockItem setState: NSOnState]; 134 132 [fSpeedLimitButton setState: NSOnState]; 135 133 } 136 134 137 135 [fActionButton setToolTip: @"Shortcuts for changing global settings."]; 138 136 [fSpeedLimitButton setToolTip: @"Speed Limit overrides the total bandwidth limits with its own limits."]; … … 241 239 fTimer = [NSTimer scheduledTimerWithTimeInterval: 1.0 target: self 242 240 selector: @selector( updateUI: ) userInfo: nil repeats: YES]; 243 [[NSRunLoop currentRunLoop] addTimer: fTimer 244 forMode: NSModalPanelRunLoopMode]; 245 [[NSRunLoop currentRunLoop] addTimer: fTimer 246 forMode: NSEventTrackingRunLoopMode]; 241 [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode]; 242 [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode]; 247 243 248 244 [self sortTorrents]; 249 245 250 //show windows251 246 [fWindow makeKeyAndOrderFront: nil]; 252 247 … … 1038 1033 - (void) globalStartSettingChange: (NSNotification *) notification 1039 1034 { 1035 #warning redo 1040 1036 NSString * startSetting = [fDefaults stringForKey: @"StartSetting"]; 1041 1037 … … 1078 1074 amountToStart = waitingCount; 1079 1075 1080 //sort torrents by date to start earliest added1076 //sort torrents by order 1081 1077 if (amountToStart < waitingCount) 1082 1078 { … … 1106 1102 - (void) torrentStartSettingChange: (NSNotification *) notification 1107 1103 { 1108 [self attemptToStartAuto: [notification object]]; 1104 //sort torrents by order value 1105 NSSortDescriptor * orderDescriptor = [[[NSSortDescriptor alloc] initWithKey: 1106 @"orderValue" ascending: YES] autorelease]; 1107 NSArray * descriptors = [[NSArray alloc] initWithObjects: orderDescriptor, nil]; 1108 1109 NSArray * torrents = [[notification object] sortedArrayUsingDescriptors: descriptors]; 1110 [descriptors release]; 1111 1112 //attempt to start all torrents 1113 NSEnumerator * enumerator = [torrents objectEnumerator]; 1114 Torrent * torrent; 1115 1116 while ((torrent = [enumerator nextObject])) 1117 [self attemptToStartAuto: torrent]; 1109 1118 1110 1119 [self updateUI: nil];
Note: See TracChangeset
for help on using the changeset viewer.