Changeset 3475
- Timestamp:
- Oct 20, 2007, 7:13:52 PM (15 years ago)
- Location:
- trunk/macosx
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/FileNameCell.m
r3083 r3475 23 23 *****************************************************************************/ 24 24 25 #import "FileOutlineView.h" 25 26 #import "FileNameCell.h" 26 #import " InfoWindowController.h"27 #import "Torrent.h" 27 28 #import "NSStringAdditions.h" 28 29 … … 90 91 fraction: 1.0]; 91 92 92 Torrent * torrent = [[[[self controlView] window] windowController] selectedTorrent];93 94 93 //title 95 94 NSColor * specialColor = nil; … … 97 96 && [[self highlightColorWithFrame: cellFrame inView: controlView] isEqual: [NSColor alternateSelectedControlColor]]) 98 97 specialColor = [NSColor whiteColor]; 99 else if ([torrent checkForFiles: [[self objectValue] objectForKey: @"Indexes"]] == NSOffState) 98 else if ([[(FileOutlineView *)[self controlView] torrent] checkForFiles: 99 [[self objectValue] objectForKey: @"Indexes"]] == NSOffState) 100 100 specialColor = [NSColor disabledControlTextColor]; 101 101 else; … … 196 196 [fStatusAttributes setObject: color forKey: NSForegroundColorAttributeName]; 197 197 198 Torrent * torrent = [ [[[self controlView] window] windowController] selectedTorrent];198 Torrent * torrent = [(FileOutlineView *)[self controlView] torrent]; 199 199 float percent = [torrent fileProgress: [[[self objectValue] objectForKey: @"Indexes"] firstIndex]] * 100.0; 200 200 -
trunk/macosx/FileOutlineView.h
r3366 r3475 25 25 #import <Cocoa/Cocoa.h> 26 26 27 @class Torrent; 28 27 29 @interface FileOutlineView : NSOutlineView 28 30 { 31 Torrent * fTorrent; 32 29 33 NSColor * fHighPriorityColor, * fLowPriorityColor, * fMixedPriorityColor; 30 34 … … 32 36 } 33 37 38 - (void) setTorrent: (Torrent *) torrent; 39 - (Torrent *) torrent; 40 34 41 - (void) setHoverRowForEvent: (NSEvent *) event; 35 42 - (int) hoverRow; -
trunk/macosx/FileOutlineView.m
r3366 r3475 26 26 #import "FileNameCell.h" 27 27 #import "FilePriorityCell.h" 28 #import "InfoWindowController.h"29 28 #import "Torrent.h" 30 29 … … 58 57 59 58 [super dealloc]; 59 } 60 61 - (void) setTorrent: (Torrent *) torrent 62 { 63 fTorrent = torrent; 64 } 65 66 - (Torrent *) torrent 67 { 68 return fTorrent; 60 69 } 61 70 … … 111 120 { 112 121 NSDictionary * item = [self itemAtRow: row]; 113 Torrent * torrent = [(InfoWindowController *)[[self window] windowController] selectedTorrent];114 122 NSIndexSet * indexes = [item objectForKey: @"Indexes"]; 115 123 116 if ([ torrent checkForFiles: indexes] != NSOffState)124 if ([fTorrent checkForFiles: indexes] != NSOffState) 117 125 { 118 NSSet * priorities = [ torrent filePrioritiesForIndexes: indexes];126 NSSet * priorities = [fTorrent filePrioritiesForIndexes: indexes]; 119 127 int count = [priorities count]; 120 128 if (count > 0) -
trunk/macosx/FilePriorityCell.m
r3083 r3475 24 24 25 25 #import "FilePriorityCell.h" 26 #import " InfoWindowController.h"26 #import "FileOutlineView.h" 27 27 #import "Torrent.h" 28 28 … … 52 52 53 53 //only for when clicking manually 54 Torrent * torrent = [[[[self controlView] window] windowController] selectedTorrent];55 56 54 int priority; 57 55 if (segment == 0) … … 62 60 priority = TR_PRI_NORMAL; 63 61 62 Torrent * torrent = [(FileOutlineView *)[self controlView] torrent]; 64 63 [torrent setFilePriority: priority forIndexes: [[self representedObject] objectForKey: @"Indexes"]]; 65 64 [(FileOutlineView *)[self controlView] reloadData]; … … 68 67 - (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView 69 68 { 70 Torrent * torrent = [( InfoWindowController *)[[[self controlView] window] windowController] selectedTorrent];69 Torrent * torrent = [(FileOutlineView *)[self controlView] torrent]; 71 70 NSDictionary * dict = [self representedObject]; 72 71 NSSet * priorities = [torrent filePrioritiesForIndexes: [dict objectForKey: @"Indexes"]]; -
trunk/macosx/InfoWindowController.h
r3304 r3475 71 71 72 72 - (void) updateInfoForTorrents: (NSArray *) torrents; 73 - (Torrent *) selectedTorrent;74 73 - (void) updateInfoStats; 75 74 -
trunk/macosx/InfoWindowController.m
r3438 r3475 229 229 } 230 230 231 [fFileOutline setTorrent: nil]; 232 231 233 [fImageView setImage: fAppIcon]; 232 234 … … 302 304 { 303 305 Torrent * torrent = [fTorrents objectAtIndex: 0]; 306 307 [fFileOutline setTorrent: torrent]; 304 308 305 309 NSImage * icon = [[torrent icon] copy]; … … 379 383 [fFileOutline deselectAll: nil]; 380 384 [fFileOutline reloadData]; 381 }382 383 - (Torrent *) selectedTorrent384 {385 return fTorrents && [fTorrents count] == 1 ? [fTorrents objectAtIndex: 0] : nil;386 385 } 387 386 -
trunk/macosx/TransmissionHelp/html/FAQ.html
r3472 r3475 61 61 </div> 62 62 <p>Growl is a notification system. Lots of applications can interface with it.<br> 63 <a href="http://growl.info ">http://growl.info</a>63 <a href="http://growl.info/">http://growl.info/</a> 64 64 <p> 65 65 <div id="pagetitle">
Note: See TracChangeset
for help on using the changeset viewer.