Ticket #261: colloquy_patch.diff

File colloquy_patch.diff, 1.1 KB (added by prophile, 4 years ago)

Hidden preference patch

  • Controllers/MVApplicationController.m

     
    445445        return NSTerminateNow; // no active connections, we can just quit now 
    446446    if( ! [[[JVChatController defaultController] chatViewControllersKindOfClass:[JVDirectChatPanel class]] count] ) 
    447447        return NSTerminateNow; // no active chats, we can just quit now 
     448    if( [[NSUserDefaults standardUserDefaults] boolForKey:@"JVAlwaysTerminateWithoutConfirm"] ) 
     449        return NSTerminateNow; // user wants never to be asked, their wish is my command 
    448450    if( NSRunCriticalAlertPanel( NSLocalizedString( @"Are you sure you want to quit?", "are you sure you want to quit title" ), NSLocalizedString( @"Are you sure you want to quit Colloquy and disconnect from all active connections?", "are you sure you want to quit message" ),  NSLocalizedString( @"Quit", "quit button" ),  NSLocalizedString( @"Cancel", "cancel button" ), nil ) == NSCancelButton ) 
    449451        return NSTerminateCancel; 
    450452    return NSTerminateNow;