warning when starting up with message log set to debug

This commit is contained in:
Mitchell Livingston 2007-04-25 03:00:43 +00:00
parent b073b85e69
commit c31578423d
5 changed files with 28 additions and 6 deletions

View File

@ -418,6 +418,22 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
//auto importing
fAutoImportedNames = [[NSMutableArray alloc] init];
[self checkAutoImportDirectory];
//debug warning
if ([fDefaults boolForKey: @"WarningDebug"] && [fDefaults integerForKey: @"MessageLevel"] == TR_MSG_DBG)
{
NSAlert * alert = [[NSAlert alloc] init];
[alert setMessageText: NSLocalizedString(@"The Message Log is set to \"Debug\"", "Debug log alert -> message")];
[alert setInformativeText: NSLocalizedString(@"Continuous use at this level might increase memory usage."
" This setting can be changed in the Message Log window (accessible from the Window menu).",
"Debug log alert -> informative message")];
[alert addButtonWithTitle: NSLocalizedString(@"OK", "Debug log alert -> button")];
[alert addButtonWithTitle: NSLocalizedString(@"Don't Remind Again", "Debug log alert -> button")];
if ([alert runModal] == NSAlertSecondButtonReturn)
[fDefaults setBool: NO forKey: @"WarningDebug"];
[alert release];
}
}
- (void) applicationDidFinishLaunching: (NSNotification *) notification

View File

@ -44,10 +44,10 @@
<false/>
<key>IncompleteDownloadFolder</key>
<string>~/Desktop</string>
<key>InspectorSelected</key>
<string>Info</string>
<key>InfoVisible</key>
<false/>
<key>InspectorSelected</key>
<string>Info</string>
<key>MessageLevel</key>
<integer>1</integer>
<key>MoveChoice</key>
@ -74,8 +74,6 @@
<false/>
<key>RatioLimit</key>
<integer>2</integer>
<key>RemainingSpaceWarning</key>
<true/>
<key>SUScheduledCheckInterval</key>
<integer>86400</integer>
<key>SeedingSound</key>
@ -110,5 +108,9 @@
<false/>
<key>UseIncompleteDownloadFolder</key>
<false/>
<key>WarningDebug</key>
<true/>
<key>WarningRemainingSpace</key>
<true/>
</dict>
</plist>

View File

@ -9,7 +9,7 @@
<key>153</key>
<string>294 444 563 268 0 0 1152 842 </string>
<key>28</key>
<string>139 407 563 307 0 0 1152 842 </string>
<string>294 424 563 307 0 0 1152 842 </string>
<key>41</key>
<string>294 425 563 305 0 0 1152 842 </string>
<key>66</key>
@ -21,6 +21,10 @@
<array>
<integer>253</integer>
</array>
<key>IBOpenObjects</key>
<array>
<integer>28</integer>
</array>
<key>IBSystem Version</key>
<string>8P135</string>
</dict>

View File

@ -709,7 +709,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
[alert release];
if (result == NSAlertThirdButtonReturn)
[fDefaults setBool: NO forKey: @"RemainingSpaceWarning"];
[fDefaults setBool: NO forKey: @"WarningRemainingSpace"];
return result != NSAlertFirstButtonReturn;
}