diff options
author | ritsuka <[email protected]> | 2015-01-15 07:44:12 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-01-15 07:44:12 +0000 |
commit | 926b00fd98da3ea5fc1d9a7b513dba0a96762130 (patch) | |
tree | 37b0fa0094a3ea2af108c177fecd4f44b1ec4793 | |
parent | 2e1d9c41edc36776e8f28abce06a131c581153c7 (diff) |
MacGui: disable the alert on error code
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6754 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/main.mm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/macosx/main.mm b/macosx/main.mm index 225c9151c..6607ed3d2 100644 --- a/macosx/main.mm +++ b/macosx/main.mm @@ -10,18 +10,18 @@ static void hb_error_handler(const char *errmsg) { NSString *error = @(errmsg); - dispatch_async(dispatch_get_main_queue(), ^{ - NSAlert *alert = [[NSAlert alloc] init]; - [alert setMessageText:NSLocalizedString(@"Internal Error.", @"")]; - if (error) - { - [alert setInformativeText:error]; - } - [alert runModal]; - [alert release]; - }); - fprintf(stderr, "GUI ERROR dialog: %s\n", errmsg ); + if (error && [[NSUserDefaults standardUserDefaults] boolForKey:@"HBDebugAlert"]) + { + dispatch_async(dispatch_get_main_queue(), ^{ + NSAlert *alert = [[NSAlert alloc] init]; + [alert setMessageText:NSLocalizedString(@"Internal Error.", @"")]; + [alert runModal]; + [alert release]; + }); + } + + fprintf(stderr, "error: %s\n", errmsg); } int main(int argc, const char **argv) |