Changeset 2179
- Timestamp:
- Jun 21, 2007, 11:21:19 PM (15 years ago)
- Location:
- trunk/macosx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/English.lproj/InfoWindow.nib/info.nib
r2178 r2179 8 8 <dict> 9 9 <key>549</key> 10 <string>565 283 1 44 1180 0 1152 842 </string>10 <string>565 283 174 149 0 0 1152 842 </string> 11 11 </dict> 12 12 <key>IBFramework Version</key> … … 22 22 <key>IBOpenObjects</key> 23 23 <array> 24 <integer>549</integer>25 24 <integer>5</integer> 26 25 </array> -
trunk/macosx/InfoWindowController.h
r2178 r2179 74 74 75 75 - (void) setPiecesView: (id) sender; 76 - (void) setPiecesViewForAvailable: (BOOL) available; 76 77 77 78 - (void) revealTorrentFile: (id) sender; -
trunk/macosx/InfoWindowController.m
r2178 r2179 101 101 [self setWindowForTab: identifier animate: NO]; 102 102 103 //set pieces control104 [fPiecesControl setSelectedSegment: [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"]105 ? PIECES_CONTROL_AVAILABLE : PIECES_CONTROL_PROGRESS];106 107 103 //initially sort peer table by IP 108 104 if ([[fPeerTable sortDescriptors] count] == 0) … … 221 217 [fDateActivityField setStringValue: @""]; 222 218 219 [fPiecesControl setEnabled: NO]; 220 [fPiecesView setTorrent: nil]; 221 222 [fPiecesControl setSelected: NO forSegment: PIECES_CONTROL_AVAILABLE]; 223 [fPiecesControl setSelected: NO forSegment: PIECES_CONTROL_PROGRESS]; 223 224 [fPiecesControl setEnabled: NO]; 224 225 [fPiecesView setTorrent: nil]; … … 286 287 [fDataLocationField setSelectable: YES]; 287 288 289 //set pieces view 290 BOOL piecesAvailableSegment = [[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"]; 291 [fPiecesControl setSelected: piecesAvailableSegment forSegment: PIECES_CONTROL_AVAILABLE]; 292 [fPiecesControl setSelected: !piecesAvailableSegment forSegment: PIECES_CONTROL_PROGRESS]; 288 293 [fPiecesControl setEnabled: YES]; 294 289 295 [fPiecesView setTorrent: torrent]; 290 296 … … 994 1000 - (void) setPiecesView: (id) sender 995 1001 { 996 [[NSUserDefaults standardUserDefaults] setBool: [sender selectedSegment] == PIECES_CONTROL_AVAILABLE 997 forKey: @"PiecesViewShowAvailability"]; 1002 [self setPiecesViewForAvailable: [sender selectedSegment] == PIECES_CONTROL_AVAILABLE]; 1003 } 1004 1005 - (void) setPiecesViewForAvailable: (BOOL) available 1006 { 1007 [fPiecesControl setSelected: available forSegment: PIECES_CONTROL_AVAILABLE]; 1008 [fPiecesControl setSelected: !available forSegment: PIECES_CONTROL_PROGRESS]; 1009 1010 [[NSUserDefaults standardUserDefaults] setBool: available forKey: @"PiecesViewShowAvailability"]; 998 1011 [fPiecesView updateView: YES]; 999 1012 } -
trunk/macosx/PiecesView.m
r2174 r2179 24 24 25 25 #import "PiecesView.h" 26 #import "InfoWindowController.h" 26 27 27 28 #define MAX_ACROSS 18 … … 376 377 } 377 378 379 - (BOOL) acceptsFirstMouse: (NSEvent *) event 380 { 381 return YES; 382 } 383 384 - (void) mouseDown: (NSEvent *) event 385 { 386 if (fTorrent) 387 [[[self window] windowController] setPiecesViewForAvailable: 388 ![[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"]]; 389 [super mouseDown: event]; 390 } 391 378 392 @end
Note: See TracChangeset
for help on using the changeset viewer.