Ticket #6042: DeadCode.diff
File DeadCode.diff, 8.0 KB (added by mattrajca, 7 years ago) |
---|
-
macosx/CreatorWindowController.m
140 140 141 141 - (void) awakeFromNib 142 142 { 143 if ([NSApp isOnLionOrBetter]) 144 [[self window] setRestorationClass: [self class]]; 143 [[self window] setRestorationClass: [self class]]; 145 144 146 145 NSString * name = [fPath lastPathComponent]; 147 146 … … 544 543 [fDefaults setBool: [fOpenCheck state] == NSOnState forKey: @"CreatorOpen"]; 545 544 fOpenWhenCreated = [fOpenCheck state] == NSOnState; //need this since the check box might not exist, and value in prefs might have changed from another creator window 546 545 [fDefaults setURL: [fLocation URLByDeletingLastPathComponent] forKey: @"CreatorLocationURL"]; 546 547 [[self window] setRestorable: NO]; 547 548 548 if ([NSApp isOnLionOrBetter])549 [[self window] setRestorable: NO];550 551 549 [[NSNotificationCenter defaultCenter] postNotificationName: @"BeginCreateTorrentFile" object: fLocation userInfo: nil]; 552 550 tr_makeMetaInfo(fInfo, [[fLocation path] UTF8String], trackerInfo, [fTrackers count], [[fCommentView string] UTF8String], [fPrivateCheck state] == NSOnState); 553 551 tr_free(trackerInfo); -
macosx/GroupsPrefsController.m
120 120 if ([[pasteboard types] containsObject: GROUP_TABLE_VIEW_DATA_TYPE]) 121 121 { 122 122 NSIndexSet * indexes = [NSKeyedUnarchiver unarchiveObjectWithData: [pasteboard dataForType: GROUP_TABLE_VIEW_DATA_TYPE]]; 123 NSInteger oldRow = [indexes firstIndex] , selectedRow = [fTableView selectedRow];123 NSInteger oldRow = [indexes firstIndex]; 124 124 125 125 if (oldRow < newRow) 126 126 newRow--; 127 128 [fTableView beginUpdates]; 127 129 128 if ([NSApp isOnLionOrBetter])129 [fTableView beginUpdates];130 131 130 [[GroupsController groups] moveGroupAtRow: oldRow toRow: newRow]; 132 133 if ([NSApp isOnLionOrBetter]) 134 { 135 [fTableView moveRowAtIndex: oldRow toIndex: newRow]; 136 [fTableView endUpdates]; 137 } 138 else 139 { 140 if (selectedRow == oldRow) 141 selectedRow = newRow; 142 else if (selectedRow > oldRow && selectedRow <= newRow) 143 selectedRow--; 144 else if (selectedRow < oldRow && selectedRow >= newRow) 145 selectedRow++; 146 else; 147 148 [fTableView selectRowIndexes: [NSIndexSet indexSetWithIndex: selectedRow] byExtendingSelection: NO]; 149 [fTableView reloadData]; 150 } 131 132 [fTableView moveRowAtIndex: oldRow toIndex: newRow]; 133 [fTableView endUpdates]; 151 134 } 152 135 153 136 return YES; -
macosx/MessageWindowController.m
57 57 NSWindow * window = [self window]; 58 58 [window setFrameAutosaveName: @"MessageWindowFrame"]; 59 59 [window setFrameUsingName: @"MessageWindowFrame"]; 60 [window setRestorationClass: [self class]]; 60 61 61 if ([NSApp isOnLionOrBetter])62 [window setRestorationClass: [self class]];63 64 62 [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(resizeColumn) 65 63 name: NSTableViewColumnDidResizeNotification object: fMessageTable]; 66 64 -
macosx/PrefsController.m
166 166 - (void) awakeFromNib 167 167 { 168 168 fHasLoaded = YES; 169 170 [[self window] setRestorationClass: [self class]]; 169 171 170 if ([NSApp isOnLionOrBetter])171 [[self window] setRestorationClass: [self class]];172 173 172 NSToolbar * toolbar = [[NSToolbar alloc] initWithIdentifier: @"Preferences Toolbar"]; 174 173 [toolbar setDelegate: self]; 175 174 [toolbar setAllowsUserCustomization: NO]; -
macosx/StatsWindowController.m
66 66 fTimer = [[NSTimer scheduledTimerWithTimeInterval: UPDATE_SECONDS target: self selector: @selector(updateStats) userInfo: nil repeats: YES] retain]; 67 67 [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode]; 68 68 [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode]; 69 70 [[self window] setRestorationClass: [self class]]; 69 71 70 if ([NSApp isOnLionOrBetter])71 [[self window] setRestorationClass: [self class]];72 73 72 [[self window] setTitle: NSLocalizedString(@"Statistics", "Stats window -> title")]; 74 73 75 74 //set label text -
macosx/StatusBarView.m
42 42 NSColor * darkColor = [NSColor colorWithCalibratedRed: 155.0/255.0 green: 155.0/255.0 blue: 155.0/255.0 alpha: 1.0]; 43 43 fGradient = [[NSGradient alloc] initWithStartingColor: lightColor endingColor: darkColor]; 44 44 45 if ([NSApp isOnLionOrBetter] &&![NSApp isOnYosemiteOrBetter])45 if (![NSApp isOnYosemiteOrBetter]) 46 46 { 47 47 CIFilter * randomFilter = [CIFilter filterWithName: @"CIRandomGenerator"]; 48 48 [randomFilter setDefaults]; -
macosx/TorrentTableView.h
43 43 44 44 IBOutlet NSMenu * fContextRow, * fContextNoRow; 45 45 46 NSInteger fMouseRow, fMouseControlRow, fMouseRevealRow, fMouseActionRow , fActionPushedRow;46 NSInteger fMouseRow, fMouseControlRow, fMouseRevealRow, fMouseActionRow; 47 47 NSArray * fSelectedValues; 48 48 49 49 IBOutlet NSMenu * fActionMenu, * fUploadMenu, * fDownloadMenu, * fRatioMenu, * fPriorityMenu; -
macosx/TorrentTableView.m
73 73 fMouseControlRow = -1; 74 74 fMouseRevealRow = -1; 75 75 fMouseActionRow = -1; 76 #warning we can get rid of the on 10.777 fActionPushedRow = -1;78 76 79 77 fActionPopoverShown = NO; 80 78 … … 169 167 [cell setControlHover: row == fMouseControlRow]; 170 168 [cell setRevealHover: row == fMouseRevealRow]; 171 169 [cell setActionHover: row == fMouseActionRow]; 172 [cell setActionPushed: row == fActionPushedRow];173 170 } 174 171 } 175 172 else … … 403 400 //avoid weird behavior when showing menu by doing this after mouse down 404 401 if (row != -1 && fMouseActionRow == row) 405 402 { 406 if (![NSApp isOnLionOrBetter])407 {408 fActionPushedRow = row;409 [self setNeedsDisplayInRect: [self rectOfRow: row]]; //ensure button is pushed down410 }411 412 403 #warning maybe make appear on mouse down 413 404 [self displayTorrentActionPopoverForEvent: event]; 414 415 if (![NSApp isOnLionOrBetter])416 {417 fActionPushedRow = -1;418 [self setNeedsDisplayInRect: [self rectOfRow: row]];419 }420 405 } 421 406 else if (!pushed && [event clickCount] == 2) //double click 422 407 { … … 548 533 NSURL * url; 549 534 if ((url = [NSURL URLFromPasteboard: [NSPasteboard generalPasteboard]])) 550 535 [fController openURL: [url absoluteString]]; 551 else if ([NSApp isOnLionOrBetter])536 else 552 537 { 553 538 NSArray * items = [[NSPasteboard generalPasteboard] readObjectsForClasses: [NSArray arrayWithObject: [NSString class]] options: nil]; 554 539 if (items)