Commit 2f66ac0c authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: added an option to the crash reporter to disable the submission of the...

macosx: added an option to the crash reporter to disable the submission of the default email address
parent a8821cd8
......@@ -2,18 +2,27 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>69 71 356 240 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>3568</key>
<string>476 535 328 85 0 0 1280 778 </string>
<key>915</key>
<string>69 316 187 285 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key>
<string>649</string>
<string>489.0</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../vlc.xcodeproj</string>
<key>IBOldestOS</key>
<integer>4</integer>
<key>IBOpenObjects</key>
<array>
<integer>3706</integer>
<integer>21</integer>
<integer>915</integer>
<integer>334</integer>
<integer>3568</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>9E17</string>
......
......@@ -163,6 +163,8 @@ struct intf_sys_t
IBOutlet NSTextField * o_crashrep_title_txt;
IBOutlet NSTextField * o_crashrep_desc_txt;
IBOutlet NSWindow * o_crashrep_win;
IBOutlet NSButton * o_crashrep_includeEmail_ckb;
IBOutlet NSTextField * o_crashrep_includeEmail_txt;
/* main menu */
......
......@@ -637,6 +637,8 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_crashrep_title_txt setStringValue: _NS("VLC crashed previously")];
[o_crashrep_win setTitle: _NS("VLC crashed previously")];
[o_crashrep_desc_txt setStringValue: _NS("Do you want to send details on the crash to VLC's development team?\n\nIf you want, you can enter a few lines on what you did before VLC crashed along with other helpful information: a link to download a sample file, a URL of a network stream, ...")];
[o_crashrep_includeEmail_ckb setTitle: _NS("I agree to be possibly contacted about this bugreport.")];
[o_crashrep_includeEmail_txt setStringValue: _NS("Only your default E-Mail address will be submitted, including no further information.")];
}
#pragma mark -
......@@ -2088,11 +2090,16 @@ end:
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];
[req setHTTPMethod:@"POST"];
NSString * email;
if( [o_crashrep_includeEmail_ckb state] == NSOnState )
{
ABPerson * contact = [[ABAddressBook sharedAddressBook] me];
ABMultiValue *emails = [contact valueForProperty:kABEmailProperty];
NSString * email = [emails valueAtIndex:[emails indexForIdentifier:
email = [emails valueAtIndex:[emails indexForIdentifier:
[emails primaryIdentifier]]];
}
else
email = [NSString string];
NSString *postBody;
postBody = [NSString stringWithFormat:@"CrashLog=%@&Comment=%@&Email=%@\r\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment