# HG changeset patch # User Zachary West # Date 1257107236 18000 # Node ID a79db9a3f818014ddce7dbcfbe7b134f4345a64c # Parent 63a5052fc169dd84619ab7360929a16c9f683d55 Add a hidden default "AINoNewMailWindow" which prevents the "new mail" dialog from opening. Refs #7923. To disable new mail window: `defaults write com.adiumx.adiumx AINoNewMailWindow -BOOL yes` To re-enable new mail window: `defaults delete com.adiumx.adiumx AINoNewMailWindow` diff -r 63a5052fc169dd84619ab7360929a16c9f683d55 -r a79db9a3f818014ddce7dbcfbe7b134f4345a64c Plugins/Purple Service/ESPurpleNotifyEmailController.m --- a/Plugins/Purple Service/ESPurpleNotifyEmailController.m Sun Nov 01 15:06:07 2009 -0500 +++ b/Plugins/Purple Service/ESPurpleNotifyEmailController.m Sun Nov 01 15:27:16 2009 -0500 @@ -167,19 +167,22 @@ + (void)showNotifyEmailWindowForAccount:(AIAccount *)account withMessage:(NSAttributedString *)inMessage URLString:(NSString *)inURLString { NSString *mailApplicationName = [self mailApplicationName]; - [ESTextAndButtonsWindowController showTextAndButtonsWindowWithTitle:AILocalizedString(@"New Mail",nil) - defaultButton:nil - alternateButton:(inURLString ? - AILocalizedString(@"Open Mail in Browser",nil) : - nil) - otherButton:((mailApplicationName && [mailApplicationName length]) ? - [NSString stringWithFormat:AILocalizedString(@"Launch %@", nil), mailApplicationName] : - nil) - onWindow:nil - withMessageHeader:nil - andMessage:inMessage - target:self - userInfo:inURLString]; + + if (![[NSUserDefaults standardUserDefaults] boolForKey:@"AINoNewMailWindow"]) { + [ESTextAndButtonsWindowController showTextAndButtonsWindowWithTitle:AILocalizedString(@"New Mail",nil) + defaultButton:nil + alternateButton:(inURLString ? + AILocalizedString(@"Open Mail in Browser",nil) : + nil) + otherButton:((mailApplicationName && [mailApplicationName length]) ? + [NSString stringWithFormat:AILocalizedString(@"Launch %@", nil), mailApplicationName] : + nil) + onWindow:nil + withMessageHeader:nil + andMessage:inMessage + target:self + userInfo:inURLString]; + } //XXX - Hook this to the account for listobject [adium.contactAlertsController generateEvent:ACCOUNT_RECEIVED_EMAIL