Changeset 3269
- Timestamp:
- 06/07/06 22:19:51 (2 years ago)
- Files:
-
- trunk/Controllers/JVNotificationController.m (modified) (1 diff)
- trunk/Languages/English.lproj/JVNotificationPreferences.nib/classes.nib (modified) (1 diff)
- trunk/Languages/English.lproj/JVNotificationPreferences.nib/info.nib (modified) (2 diffs)
- trunk/Languages/English.lproj/JVNotificationPreferences.nib/keyedobjects.nib (added)
- trunk/Panels/JVChatRoomPanel.m (modified) (1 diff)
- trunk/Preferences/JVNotificationPreferences.h (modified) (1 diff)
- trunk/Preferences/JVNotificationPreferences.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Controllers/JVNotificationController.m
r3259 r3269 52 52 NSDictionary *eventPrefs = [[NSUserDefaults standardUserDefaults] dictionaryForKey:[NSString stringWithFormat:@"JVNotificationSettings %@", identifier]]; 53 53 54 if( [[eventPrefs objectForKey:@"playSound"] boolValue] && ! [[NSUserDefaults standardUserDefaults] boolForKey:@"JVChatNotificationsMuted"] ) 55 [self _playSound:[eventPrefs objectForKey:@"soundPath"]]; 54 if( [[eventPrefs objectForKey:@"playSound"] boolValue] && ! [[NSUserDefaults standardUserDefaults] boolForKey:@"JVChatNotificationsMuted"] ) { 55 if( [[eventPrefs objectForKey:@"playSoundOnlyIfBackground"] boolValue] && ! [[NSApplication sharedApplication] isActive] ) 56 [self _playSound:[eventPrefs objectForKey:@"soundPath"]]; 57 else if( ! [[eventPrefs objectForKey:@"playSoundOnlyIfBackground"] boolValue] ) 58 [self _playSound:[eventPrefs objectForKey:@"soundPath"]]; 59 } 56 60 57 61 if( [[eventPrefs objectForKey:@"bounceIcon"] boolValue] ) { trunk/Languages/English.lproj/JVNotificationPreferences.nib/classes.nib
r2744 r3269 24 24 playSound = NSButton; 25 25 showBubble = NSButton; 26 soundOnlyIfBackground = NSButton; 26 27 sounds = NSPopUpButton; 27 28 untilAttention = NSButton; trunk/Languages/English.lproj/JVNotificationPreferences.nib/info.nib
r2744 r3269 4 4 <dict> 5 5 <key>IBDocumentLocation</key> 6 <string> 178 107 356 240 0 0 1280 832</string>6 <string>209 115 356 240 0 0 1440 878 </string> 7 7 <key>IBEditorPositions</key> 8 8 <dict> 9 9 <key>5</key> 10 <string> 367 398 545 343 0 0 1280 832</string>10 <string>447 408 545 363 0 0 1440 878 </string> 11 11 </dict> 12 12 <key>IBFramework Version</key> 13 <string>4 37.0</string>13 <string>446.1</string> 14 14 <key>IBGroupedObjects</key> 15 15 <dict> … … 33 33 </array> 34 34 <key>IBSystem Version</key> 35 <string>8 B15</string>35 <string>8I1119</string> 36 36 </dict> 37 37 </plist> trunk/Panels/JVChatRoomPanel.m
r3246 r3269 285 285 } 286 286 287 if( [message ignoreStatus] == JVNotIgnored && [[message sender] respondsToSelector:@selector( isLocalUser )] && ! [[message sender] isLocalUser] && ( ! [[[self view] window] isMainWindow] || ! _isActive )) {287 if( [message ignoreStatus] == JVNotIgnored && [[message sender] respondsToSelector:@selector( isLocalUser )] && ! [[message sender] isLocalUser] ) { 288 288 NSMutableDictionary *context = [NSMutableDictionary dictionary]; 289 289 [context setObject:[NSString stringWithFormat:NSLocalizedString( @"%@ Room Activity", "room activity bubble title" ), [self title]] forKey:@"title"]; trunk/Preferences/JVNotificationPreferences.h
r3072 r3269 5 5 IBOutlet NSPopUpButton *chatActions; 6 6 IBOutlet NSButton *playSound; 7 IBOutlet NSButton *soundOnlyIfBackground; 7 8 IBOutlet NSPopUpButton *sounds; 8 9 IBOutlet NSButton *bounceIcon; trunk/Preferences/JVNotificationPreferences.m
r3259 r3269 32 32 BOOL boolValue = [[_eventPrefs objectForKey:@"playSound"] boolValue]; 33 33 [playSound setState:boolValue]; 34 [soundOnlyIfBackground setEnabled:boolValue]; 34 35 [sounds setEnabled:boolValue]; 36 if( ! boolValue ) [soundOnlyIfBackground setState:NSOffState]; 37 else [soundOnlyIfBackground setState:[[_eventPrefs objectForKey:@"playSoundOnlyIfBackground"] boolValue]]; 35 38 [self selectSoundWithPath:[_eventPrefs objectForKey:@"soundPath"]]; 36 39 … … 176 179 - (void) playSound:(id) sender { 177 180 [sounds setEnabled:(BOOL)[sender state]]; 181 [soundOnlyIfBackground setEnabled:(BOOL)[sender state]]; 182 if( [sender state] == NSOffState ) [soundOnlyIfBackground setState:NSOffState]; 183 else [soundOnlyIfBackground setState:[[_eventPrefs objectForKey:@"playSoundOnlyIfBackground"] boolValue]]; 178 184 [_eventPrefs setObject:[NSNumber numberWithBool:(BOOL)[sender state]] forKey:@"playSound"]; 179 185 [self switchSound:sounds];
