Adium

Ticket #3134: Events.diff

File Events.diff, 8.9 kB (added by eurotrash, 3 years ago)

Events patch changes defaults to audio and visual notifications (all audio notifications are on since we apparently can't turn them off one-by-one)

  • Source/AdiumMessageEvents.m

    old new  
    4242        [[adium contactAlertsController] registerEventID:CONTENT_MESSAGE_RECEIVED withHandler:self inGroup:AIMessageEventHandlerGroup globalOnly:NO]; 
    4343        [[adium contactAlertsController] registerEventID:CONTENT_MESSAGE_RECEIVED_FIRST withHandler:self inGroup:AIMessageEventHandlerGroup globalOnly:NO]; 
    4444        [[adium contactAlertsController] registerEventID:CONTENT_MESSAGE_RECEIVED_BACKGROUND withHandler:self inGroup:AIMessageEventHandlerGroup globalOnly:NO]; 
     45        [[adium contactAlertsController] registerEventID:FILE_TRANSFER_FAILED withHandler:self inGroup:AIMessageEventHandlerGroup globalOnly:NO]; 
    4546         
    4647        //Observe chat changes 
    4748        [[adium chatController] registerChatObserver:self]; 
     
    164165                description = AILocalizedString(@"Sends an initial message",nil); 
    165166        } else if ([eventID isEqualToString:CONTENT_MESSAGE_RECEIVED_BACKGROUND]) { 
    166167                description = AILocalizedString(@"Sends a message in a background chat",nil); 
     168        } else if ([eventID isEqualToString:FILE_TRANSFER_FAILED]) { 
     169                description = AILocalizedString(@"File transfer fails",nil); 
    167170        } else { 
    168171                description = @""; 
    169172        } 
     
    183186                description = AILocalizedString(@"Message received (Initial)",nil); 
    184187        } else if ([eventID isEqualToString:CONTENT_MESSAGE_RECEIVED_BACKGROUND]) { 
    185188                description = AILocalizedString(@"Message received (Background chat)",nil); 
     189        } else if ([eventID isEqualToString:FILE_TRANSFER_FAILED]) { 
     190                description = AILocalizedString(@"File transfer failed",nil); 
    186191        } else { 
    187192                description = @""; 
    188193        } 
     
    204209                description = @"Message Received (New)"; 
    205210        } else if ([eventID isEqualToString:CONTENT_MESSAGE_RECEIVED_BACKGROUND]) { 
    206211                description = @"Message Received (Background Chat)"; 
     212        } else if ([eventID isEqualToString:FILE_TRANSFER_FAILED]) { 
     213                description = @"File transfer failed"; 
    207214        } else { 
    208215                description = @""; 
    209216        } 
     
    226233                } else if ([eventID isEqualToString:CONTENT_MESSAGE_RECEIVED_FIRST]) { 
    227234                        format = AILocalizedString(@"When %@ sends an initial message to you",nil); 
    228235                } else if ([eventID isEqualToString:CONTENT_MESSAGE_RECEIVED_BACKGROUND]) { 
    229                         format = AILocalizedString(@"When %@ sends a message to you in a background chat",nil);                  
     236                        format = AILocalizedString(@"When %@ sends a message to you in a background chat",nil); 
     237                } else if ([eventID isEqualToString:FILE_TRANSFER_FAILED]) { 
     238                        format = AILocalizedString(@"When a file transfer with %@ fails",nil);   
    230239                } else { 
    231240                        format = nil; 
    232241                } 
     
    247256                } else if ([eventID isEqualToString:CONTENT_MESSAGE_RECEIVED_FIRST]) { 
    248257                        description = AILocalizedString(@"When you receive an initial message",nil); 
    249258                } else if ([eventID isEqualToString:CONTENT_MESSAGE_RECEIVED_BACKGROUND]) { 
    250                         description = AILocalizedString(@"When you receive a message in a background chat",nil);                         
     259                        description = AILocalizedString(@"When you receive a message in a background chat",nil); 
     260                } else if ([eventID isEqualToString:FILE_TRANSFER_FAILED]) { 
     261                        description = AILocalizedString(@"When a file transfer fails",nil); 
    251262                } 
    252263        } 
    253264         
  • Resources/BuiltInEventPresets.plist

    old new  
    1  <?xml version="1.0" encoding="UTF-8"?> 
     1<?xml version="1.0" encoding="UTF-8"?> 
    22<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
    33<plist version="1.0"> 
    44<dict> 
    5         <key>Default Notifications</key> 
     5        <key>Audio Notifications</key> 
    66        <dict> 
    7                 <key>Name</key> 
    8                 <string>Default Notifications</string> 
    9                 <key>Event Sound Set</key> 
    10                 <string>$$BundlePath$$/Contents/Resources/Sounds/Adium.AdiumSoundset</string> 
    117                <key>Built In</key> 
    128                <true/> 
     9                <key>Event Sound Set</key> 
     10                <string>$$BundlePath$$/Contents/Resources/Sounds/TokyoTrainStation.AdiumSoundset</string> 
    1311                <key>Events</key> 
    1412                <array> 
    1513                        <dict> 
     14                                <key>ActionDetails</key> 
     15                                <dict> 
     16                                        <key>BehaviorType</key> 
     17                                        <real>1</real> 
     18                                </dict> 
     19                                <key>ActionID</key> 
     20                                <string>BounceDockIcon</string> 
    1621                                <key>EventID</key> 
    1722                                <string>Content_MessageReceived</string> 
    18                                <key>ActionID</key
    19                                <string>BounceDockIcon</string
     23                        </dict
     24                        <dict
    2025                                <key>ActionDetails</key> 
    2126                                <dict> 
    2227                                        <key>BehaviorType</key> 
    23                                         <real>1</real> 
    24                                 </dict>          
     28                                        <real>2</real> 
     29                                </dict> 
     30                                <key>ActionID</key> 
     31                                <string>BounceDockIcon</string> 
     32                                <key>EventID</key> 
     33                                <string>Interface_ErrorMessageReceived</string> 
    2534                        </dict> 
    2635                        <dict> 
     36                                <key>ActionID</key> 
     37                                <string>DockOverlay</string> 
    2738                                <key>EventID</key> 
     39                                <string>Content_MessageReceivedBackground</string> 
     40                        </dict> 
     41                </array> 
     42                <key>Name</key> 
     43                <string>Audio Notifications</string> 
     44        </dict> 
     45        <key>Default Notifications</key> 
     46        <dict> 
     47                <key>Built In</key> 
     48                <true/> 
     49                <key>Event Sound Set</key> 
     50                <string>$$BundlePath$$/Contents/Resources/Sounds/TokyoTrainStation.AdiumSoundset</string> 
     51                <key>Events</key> 
     52                <array> 
     53                        <dict> 
     54                                <key>ActionID</key> 
     55                                <string>Growl</string> 
     56                                <key>EventID</key> 
     57                                <string>FileTransfer_Request</string> 
     58                        </dict> 
     59                        <dict> 
     60                                <key>ActionID</key> 
     61                                <string>Growl</string> 
     62                                <key>EventID</key> 
     63                                <string>FileTransfer_Complete</string> 
     64                        </dict> 
     65                        <dict> 
     66                                <key>ActionID</key> 
     67                                <string>Growl</string> 
     68                                <key>EventID</key> 
     69                                <string>FileTransfer_Failed</string> 
     70                        </dict> 
     71                        <dict> 
     72                                <key>ActionID</key> 
     73                                <string>Growl</string> 
     74                                <key>EventID</key> 
     75                                <string>Contact_StatusOnlineYes</string> 
     76                        </dict> 
     77                        <dict> 
     78                                <key>ActionID</key> 
     79                                <string>Growl</string> 
     80                                <key>EventID</key> 
    2881                                <string>Interface_ErrorMessageReceived</string> 
     82                        </dict> 
     83                        <dict> 
    2984                                <key>ActionID</key> 
     85                                <string>Growl</string> 
     86                                <key>EventID</key> 
     87                                <string>Content_MessageReceivedBackground</string> 
     88                        </dict> 
     89                        <dict> 
     90                                <key>ActionDetails</key> 
     91                                <dict> 
     92                                        <key>BehaviorType</key> 
     93                                        <real>1</real> 
     94                                </dict> 
     95                                <key>ActionID</key> 
    3096                                <string>BounceDockIcon</string> 
     97                                <key>EventID</key> 
     98                                <string>Content_MessageReceived</string> 
     99                        </dict> 
     100                        <dict> 
    31101                                <key>ActionDetails</key> 
    32102                                <dict> 
    33103                                        <key>BehaviorType</key> 
    34104                                        <real>2</real> 
    35                                 </dict>          
    36                         </dict>  
     105                                </dict> 
     106                                <key>ActionID</key> 
     107                                <string>BounceDockIcon</string> 
     108                                <key>EventID</key> 
     109                                <string>Interface_ErrorMessageReceived</string> 
     110                        </dict> 
    37111                        <dict> 
     112                                <key>ActionID</key> 
     113                                <string>DockOverlay</string> 
    38114                                <key>EventID</key> 
    39115                                <string>Content_MessageReceivedBackground</string> 
     116                        </dict> 
     117                        <dict> 
    40118                                <key>ActionID</key> 
    41119                                <string>DockOverlay</string> 
     120                                <key>EventID</key> 
     121                                <string>Content_MessageReceived</string> 
    42122                        </dict> 
     123                        <dict> 
     124                                <key>ActionID</key> 
     125                                <string>DockOverlay</string> 
     126                                <key>EventID</key> 
     127                                <string>Content_MessageReceivedBackground</string> 
     128                        </dict> 
    43129                </array> 
     130                <key>Name</key> 
     131                <string>Default Notifications</string> 
    44132        </dict> 
    45133        <key>Visual Notifications</key> 
    46134        <dict> 
    47                 <key>Name</key> 
    48                 <string>Visual Notifications</string
     135                <key>Built In</key> 
     136                <true/
    49137                <key>Event Sound Set</key> 
    50138                <string>$$BundlePath$$/Contents/Resources/Sounds/None.AdiumSoundset</string> 
    51                 <key>Built In</key> 
    52                 <true/> 
    53139                <key>Events</key> 
    54140                <array> 
    55141                        <dict> 
     142                                <key>ActionID</key> 
     143                                <string>DockOverlay</string> 
    56144                                <key>EventID</key> 
    57145                                <string>Content_MessageReceived</string> 
    58                                 <key>ActionID</key> 
    59                                 <string>DockOverlay</string> 
    60146                        </dict> 
    61147                        <dict> 
    62                                 <key>EventID</key> 
    63                                 <string>Interface_ErrorMessageReceived</string> 
    64                                 <key>ActionID</key> 
    65                                 <string>BounceDockIcon</string> 
    66148                                <key>ActionDetails</key> 
    67149                                <dict> 
    68150                                        <key>BehaviorType</key> 
    69151                                        <real>2</real> 
    70                                 </dict>                 
    71                         </dict>         
    72                         <dict
     152                                </dict> 
     153                               <key>ActionID</key> 
     154                               <string>BounceDockIcon</string
    73155                                <key>EventID</key> 
    74156                                <string>Interface_ErrorMessageReceived</string> 
     157                        </dict> 
     158                        <dict> 
    75159                                <key>ActionID</key> 
    76160                                <string>Growl</string> 
     161                                <key>EventID</key> 
     162                                <string>Interface_ErrorMessageReceived</string> 
    77163                        </dict> 
    78164                        <dict> 
     165                                <key>ActionID</key> 
     166                                <string>Growl</string> 
    79167                                <key>EventID</key> 
    80168                                <string>Content_MessageReceivedBackground</string> 
    81                                 <key>ActionID</key> 
    82                                 <string>Growl</string> 
    83169                        </dict> 
    84170                        <dict> 
     171                                <key>ActionID</key> 
     172                                <string>DockOverlay</string> 
    85173                                <key>EventID</key> 
    86174                                <string>Content_MessageReceivedBackground</string> 
    87                                 <key>ActionID</key> 
    88                                 <string>DockOverlay</string> 
    89175                        </dict> 
    90176                        <dict> 
     177                                <key>ActionID</key> 
     178                                <string>Growl</string> 
    91179                                <key>EventID</key> 
    92180                                <string>FileTransfer_Complete</string> 
    93                                 <key>ActionID</key> 
    94                                 <string>Growl</string> 
    95181                        </dict> 
    96182                </array> 
     183                <key>Name</key> 
     184                <string>Visual Notifications</string> 
    97185        </dict> 
    98186</dict> 
    99187</plist>