diff options
author | stuartmorgan <stuartmorgan@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-04-22 13:22:08 +0000 |
---|---|---|
committer | stuartmorgan <stuartmorgan@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-04-22 13:22:08 +0000 |
commit | e438d9cc0bffdd03ebe096e6a0df898beed5135a (patch) | |
tree | 835528fc087ae02b33a4a6f4f014e4b4a52f7539 /src/client/mac/sender | |
parent | Fix to support extensible parameter handling, and add process crashtime/uptim... (diff) | |
download | breakpad-e438d9cc0bffdd03ebe096e6a0df898beed5135a.tar.xz |
Add a parameter to control the Mac reporter timeout.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@332 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/sender')
-rw-r--r-- | src/client/mac/sender/crash_report_sender.m | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/client/mac/sender/crash_report_sender.m b/src/client/mac/sender/crash_report_sender.m index 61564e54..03fc05c2 100644 --- a/src/client/mac/sender/crash_report_sender.m +++ b/src/client/mac/sender/crash_report_sender.m @@ -369,7 +369,6 @@ NSString *const kDefaultServerType = @"google"; @""), display]]; NSString *defaultButtonTitle = nil; NSString *otherButtonTitle = nil; - NSTimeInterval timeout = 60.0; // timeout value for the user notification // Get the localized alert strings // If we're going to submit a report, prompt the user if this is okay. @@ -386,19 +385,19 @@ NSString *const kDefaultServerType = @"google"; nil, bundle, @""); otherButtonTitle = NSLocalizedStringFromTableInBundle(@"cancelButton", nil, bundle, @""); - - // Nominally use the report interval - timeout = [[parameters_ objectForKey:@BREAKPAD_REPORT_INTERVAL] - floatValue]; } else { [self setReportMessage:NSLocalizedStringFromTableInBundle(@"noSendMsg", nil, bundle, @"")]; defaultButtonTitle = NSLocalizedStringFromTableInBundle(@"noSendButton", nil, bundle, @""); - timeout = 60.0; } - // show the notification for at least one minute - if (timeout < 60.0) { + + // Get the timeout value for the notification. + NSTimeInterval timeout = [[parameters_ objectForKey:@BREAKPAD_CONFIRM_TIMEOUT] + floatValue]; + // Show the notification for at least one minute (but allow 0, since it means + // no timeout). + if (timeout > 0.001 && timeout < 60.0) { timeout = 60.0; } @@ -452,9 +451,11 @@ NSString *const kDefaultServerType = @"google"; - (int)runModalWindow:(NSWindow*)window withTimeout:(NSTimeInterval)timeout { // Queue a |stopModal| message to be performed in |timeout| seconds. - [NSApp performSelector:@selector(stopModal) - withObject:nil - afterDelay:timeout]; + if (timeout > 0.001) { + [NSApp performSelector:@selector(stopModal) + withObject:nil + afterDelay:timeout]; + } // Run the window modally and wait for either a |stopModal| message or a // button click. |