- Timestamp:
- Aug 5, 2006, 1:22:30 PM (16 years ago)
- Location:
- trunk/macosx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/BarButton.h
r686 r720 38 38 - (void) resetBounds: (NSNotification *) notification; 39 39 40 - (void) setForActive ;41 - (void) setForInactive ;40 - (void) setForActive: (NSNotification *) notification; 41 - (void) setForInactive: (NSNotification *) notification; 42 42 43 43 @end -
trunk/macosx/BarButton.m
r710 r720 46 46 [self setAlternateImage: fButtonPressed]; 47 47 48 [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(resetBounds:) 48 NSNotificationCenter * nc = [NSNotificationCenter defaultCenter]; 49 50 [nc addObserver: self selector: @selector(setForActive:) 51 name: NSWindowDidBecomeKeyNotification object: nil]; 52 53 [nc addObserver: self selector: @selector(setForInactive:) 54 name: NSWindowDidResignKeyNotification object: nil]; 55 56 [nc addObserver: self selector: @selector(resetBounds:) 49 57 name: NSViewBoundsDidChangeNotification object: nil]; 50 58 } … … 243 251 } 244 252 245 - (void) setForActive 246 { 253 - (void) setForActive: (NSNotification *) notification 254 { 255 NSWindow * window; 256 if (!(window = [notification object]) || window != [self window]) 257 return; 258 247 259 if ([self image] == fButtonSelectedDim) 248 260 [self setImage: fButtonSelected]; … … 254 266 } 255 267 256 - (void) setForInactive 257 { 268 - (void) setForInactive: (NSNotification *) notification 269 { 270 NSWindow * window; 271 if (!(window = [notification object]) || window != [self window]) 272 return; 273 258 274 [self setImage: [self image] == fButtonSelected ? fButtonSelectedDim : fButtonNormalDim]; 259 275 -
trunk/macosx/Controller.m
r717 r720 2208 2208 [self resetDockBadge: nil]; 2209 2209 } 2210 2211 //set filter images as active2212 [fNoFilterButton setForActive];2213 [fSeedFilterButton setForActive];2214 [fDownloadFilterButton setForActive];2215 [fPauseFilterButton setForActive];2216 }2217 2218 - (void) windowDidResignKey: (NSNotification *) notification2219 {2220 //set filter images as inactive2221 [fNoFilterButton setForInactive];2222 [fSeedFilterButton setForInactive];2223 [fDownloadFilterButton setForInactive];2224 [fPauseFilterButton setForInactive];2225 2210 } 2226 2211 -
trunk/macosx/PrefsController.m
r719 r720 78 78 fHandle = handle; 79 79 80 [[self window] update]; //make sure nib is loaded right away80 [[self window] update]; //make sure nib is loaded right away 81 81 } 82 82 return self;
Note: See TracChangeset
for help on using the changeset viewer.