From 3c18a3194952e40e3586bca6de292170bbbe6d1f Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Thu, 31 Jan 2008 16:11:18 +0100 Subject: [PATCH] Code cleanup --- src/MacVim/MMAppController.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/MacVim/MMAppController.m b/src/MacVim/MMAppController.m index cd27f6b1e0..64bfe7dbf2 100644 --- a/src/MacVim/MMAppController.m +++ b/src/MacVim/MMAppController.m @@ -322,12 +322,12 @@ typedef struct if (modifiedBuffers) { NSAlert *alert = [[NSAlert alloc] init]; + [alert setAlertStyle:NSWarningAlertStyle]; [alert addButtonWithTitle:@"Quit"]; [alert addButtonWithTitle:@"Cancel"]; [alert setMessageText:@"Quit without saving?"]; [alert setInformativeText:@"There are modified buffers, " "if you quit now all changes will be lost. Quit anyway?"]; - [alert setAlertStyle:NSWarningAlertStyle]; if ([alert runModal] != NSAlertFirstButtonReturn) reply = NSTerminateCancel; @@ -339,6 +339,7 @@ typedef struct int numWindows = [vimControllers count]; int numTabs = 0; + // Count the number of open tabs e = [vimControllers objectEnumerator]; id vc; while ((vc = [e nextObject])) { @@ -352,6 +353,7 @@ typedef struct if (numWindows > 1 || numTabs > 1) { NSAlert *alert = [[NSAlert alloc] init]; + [alert setAlertStyle:NSWarningAlertStyle]; [alert addButtonWithTitle:@"Quit"]; [alert addButtonWithTitle:@"Cancel"]; [alert setMessageText:@"Are you sure you want to quit MacVim?"]; @@ -367,7 +369,6 @@ typedef struct "open in MacVim. Do you want to quit anyway?", numWindows]; - [alert setAlertStyle:NSWarningAlertStyle]; } else { info = [NSString stringWithFormat:@"There are %d tabs open " "in MacVim. Do you want to quit anyway?", numTabs];