suppressionText=AILocalizedString(@"Do not warn when closing multiple chats",nil);
break;
caseAIMessageCloseUnread:
if(unreadCount){
suppressionText=AILocalizedString(@"Do not warn when closing unread chats",nil);
}
break;
}
NSString*question=nil;
if(unreadCount){
if(unreadCount==1){
question=[NSStringstringWithFormat:AILocalizedString(@"%u chats are open in this window, 1 of which has unviewed messages. Do you want to close this window anyway?",nil),
self.containedChats.count];
}else{
question=[NSStringstringWithFormat:AILocalizedString(@"%u chats are open in this window, %u of which have unviewed messages. Do you want to close this window anyway?",nil),
self.containedChats.count,
unreadCount];
}
}else{
question=[NSStringstringWithFormat:AILocalizedString(@"%u chats are open in this window. Do you want to close this window anyway?",nil),
self.containedChats.count];
}
if(suppressionText){
NSAlert*alert=[NSAlertalertWithMessageText:AILocalizedString(@"Are you sure you want to close this window?",nil)
AILog(@"Displaying tooltip for %@ --> %@ (%@) --> %@ (%@)",chat,chat.account,chat.account.formattedUID,destination,destinationFormattedUID);
if(includeDestination&&includeSource){
tooltip=[NSStringstringWithFormat:AILocalizedString(@"%@ talking to %@","AccountName talking to Username"),chat.account.formattedUID,destinationFormattedUID];