Changeset 1154

Show
Ignore:
Timestamp:
05/13/04 18:29:58 (5 years ago)
Author:
morris
Message:

add sound for broadcasts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCChat.m

    r1153 r1154  
    1 /* $Id: WCChat.m,v 1.30 2004/05/11 21:46:26 morris Exp $ */ 
     1/* $Id: WCChat.m,v 1.31 2004/05/13 16:29:54 morris Exp $ */ 
    22 
    33/* 
     
    834834 
    835835 
    836  
    837836- (BOOL)textView:(NSTextView *)sender doCommandBySelector:(SEL)selector { 
    838837        BOOL    commandKey, optionKey, controlKey, value = NO; 
     
    841840        if(sender != _chatInputTextView) 
    842841                return NO; 
     842         
    843843        // --- get key state 
    844844        commandKey      = (([[NSApp currentEvent] modifierFlags] & NSCommandKeyMask) != 0); 
  • WiredClient/trunk/WCMessages.m

    r1108 r1154  
    1 /* $Id: WCMessages.m,v 1.14 2004/03/28 23:35:07 morris Exp $ */ 
     1/* $Id: WCMessages.m,v 1.15 2004/05/13 16:29:54 morris Exp $ */ 
    22 
    33/* 
     
    307307 
    308308- (void)showBroadcast { 
     309        // --- center 
    309310        if(![_broadcastWindow isVisible]) { 
    310311                [_broadcastWindow center]; 
     
    312313        } 
    313314         
     315        // --- display 
    314316        [_broadcastWindow makeKeyAndOrderFront:self]; 
     317 
     318        // --- play sound 
     319        if([(NSString *) [WCSettings objectForKey:WCBroadcastEventSound] length] > 0) 
     320                [[NSSound soundNamed:[WCSettings objectForKey:WCBroadcastEventSound]] play]; 
    315321} 
    316322 
  • WiredClient/trunk/WCPreferences.h

    r1131 r1154  
    1 /* $Id: WCPreferences.h,v 1.11 2004/05/03 17:31:46 morris Exp $ */ 
     1/* $Id: WCPreferences.h,v 1.12 2004/05/13 16:29:54 morris Exp $ */ 
    22 
    33/* 
     
    103103        IBOutlet NSPopUpButton          *_messagesEventPopUpButton; 
    104104        IBOutlet NSPopUpButton          *_newsEventPopUpButton; 
     105        IBOutlet NSPopUpButton          *_broadcastEventPopUpButton; 
    105106        IBOutlet NSPopUpButton          *_transferStartedEventPopUpButton; 
    106107        IBOutlet NSPopUpButton          *_transferDoneEventPopUpButton; 
  • WiredClient/trunk/WCPreferences.m

    r1146 r1154  
    1 /* $Id: WCPreferences.m,v 1.17 2004/05/06 15:26:37 morris Exp $ */ 
     1/* $Id: WCPreferences.m,v 1.18 2004/05/13 16:29:54 morris Exp $ */ 
    22 
    33/* 
     
    110110                        [_messagesEventPopUpButton addItemWithTitle:sound]; 
    111111                        [_newsEventPopUpButton addItemWithTitle:sound]; 
     112                        [_broadcastEventPopUpButton addItemWithTitle:sound]; 
    112113                        [_transferStartedEventPopUpButton addItemWithTitle:sound]; 
    113114                        [_transferDoneEventPopUpButton addItemWithTitle:sound]; 
     
    262263                : @"" 
    263264                                   forKey:WCNewsEventSound]; 
     265         
     266        [WCSettings setObject:[[_broadcastEventPopUpButton selectedItem] tag] == 0 
     267                ? [_broadcastEventPopUpButton titleOfSelectedItem] 
     268                : @"" 
     269                                   forKey:WCBroadcastEventSound]; 
    264270         
    265271        [WCSettings setObject:[[_transferStartedEventPopUpButton selectedItem] tag] == 0 
     
    567573                        [WCSettings objectForKey:WCNewsEventSound]]; 
    568574        } 
     575         
     576        if([(NSString *) [WCSettings objectForKey:WCBroadcastEventSound] length] > 0) { 
     577                [_broadcastEventPopUpButton selectItemWithTitle: 
     578                        [WCSettings objectForKey:WCBroadcastEventSound]]; 
     579        } 
    569580 
    570581        if([(NSString *) [WCSettings objectForKey:WCTransferStartedEventSound] length] > 0) { 
  • WiredClient/trunk/WCSettings.h

    r1111 r1154  
    1 /* $Id: WCSettings.h,v 1.9 2004/03/29 10:45:54 morris Exp $ */ 
     1/* $Id: WCSettings.h,v 1.10 2004/05/13 16:29:54 morris Exp $ */ 
    22 
    33/* 
     
    8686#define WCMessagesEventSound                                    @"WCMessagesEventSound" 
    8787#define WCNewsEventSound                                                @"WCNewsEventSound" 
     88#define WCBroadcastEventSound                                   @"WCBroadcastEventSound" 
    8889#define WCTransferStartedEventSound                             @"WCTransferStartedEventSound" 
    8990#define WCTransferDoneEventSound                                @"WCTransferDoneEventSound" 
     
    102103 
    103104+ (id)                                                                                  objectForKey:(id)key; 
     105+ (NSString *)                                                                  stringForKey:(id)key; 
     106+ (BOOL)                                                                                boolForKey:(id)key; 
    104107+ (id)                                                                                  archivedObjectForKey:(id)key; 
    105108+ (void)                                                                                setObject:(id)object forKey:(id)key; 
  • WiredClient/trunk/WCSettings.m

    r1145 r1154  
    1 /* $Id: WCSettings.m,v 1.12 2004/05/06 15:19:29 morris Exp $ */ 
     1/* $Id: WCSettings.m,v 1.13 2004/05/13 16:29:54 morris Exp $ */ 
    22 
    33/* 
     
    187187                        WCNewsEventSound, 
    188188                @"", 
     189                        WCBroadcastEventSound, 
     190                @"", 
    189191                        WCTransferStartedEventSound, 
    190192                @"", 
     
    244246 
    245247 
     248+ (NSString *)stringForKey:(id)key { 
     249        return [settings objectForKey:key]; 
     250} 
     251 
     252 
     253 
     254+ (BOOL)boolForKey:(id)key { 
     255        return [[settings objectForKey:key] boolValue]; 
     256} 
     257 
     258 
     259 
    246260+ (id)archivedObjectForKey:(id)key { 
    247261        return [NSUnarchiver unarchiveObjectWithData:[settings objectForKey:key]]; 
  • WiredClient/trunk/WiredClient.xcode/project.pbxproj

    r1137 r1154  
    292292                                OPTIMIZATION_CFLAGS = "-O0"; 
    293293                                OTHER_LDFLAGS = "-lssl -lcrypto -bind_at_load"; 
    294                                 ZERO_LINK = NO
     294                                ZERO_LINK = YES
    295295                        }; 
    296296                        isa = PBXBuildStyle; 
     
    617617                                A548F38E0646CC3B007B5758, 
    618618                                A548F3900646CC45007B5758, 
     619                                A548F488064A87C8007B5758, 
     620                                A548F493064A87DD007B5758, 
    619621                        ); 
    620622                        isa = PBXSourcesBuildPhase; 
     
    10671069                A548F3900646CC45007B5758 = { 
    10681070                        fileRef = A548F38F0646CC45007B5758; 
     1071                        isa = PBXBuildFile; 
     1072                        settings = { 
     1073                        }; 
     1074                }; 
     1075                A548F487064A87C8007B5758 = { 
     1076                        fileEncoding = 5; 
     1077                        isa = PBXFileReference; 
     1078                        lastKnownFileType = sourcecode.c.objc; 
     1079                        path = WCOutlineView.m; 
     1080                        refType = 4; 
     1081                        sourceTree = "<group>"; 
     1082                }; 
     1083                A548F488064A87C8007B5758 = { 
     1084                        fileRef = A548F487064A87C8007B5758; 
     1085                        isa = PBXBuildFile; 
     1086                        settings = { 
     1087                        }; 
     1088                }; 
     1089                A548F492064A87DC007B5758 = { 
     1090                        fileEncoding = 5; 
     1091                        isa = PBXFileReference; 
     1092                        lastKnownFileType = sourcecode.c.h; 
     1093                        path = WCOutlineView.h; 
     1094                        refType = 4; 
     1095                        sourceTree = "<group>"; 
     1096                }; 
     1097                A548F493064A87DD007B5758 = { 
     1098                        fileRef = A548F492064A87DC007B5758; 
    10691099                        isa = PBXBuildFile; 
    10701100                        settings = { 
     
    25452575                                A5DC7F6B057AB05F00736BBF, 
    25462576                                A5DC7F6A057AB05F00736BBF, 
     2577                                A548F487064A87C8007B5758, 
     2578                                A548F492064A87DC007B5758, 
    25472579                                A5DC7F78057AB05F00736BBF, 
    25482580                                A5DC7F77057AB05F00736BBF,