Commit 3057e781 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: backported the include-email-or-not selector in the crash reporter panel

parent 305f3541
......@@ -2,19 +2,32 @@
<!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 69 356 240 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
<string>69 314 109 169 0 0 1280 778 </string>
<key>29</key>
<string>69 314 438 44 0 0 1280 778 </string>
<key>3568</key>
<string>476 534 328 85 0 0 1280 778 </string>
<key>915</key>
<string>69 314 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>21</integer>
<integer>3817</integer>
<integer>1617</integer>
<integer>915</integer>
<integer>3706</integer>
<integer>29</integer>
<integer>2417</integer>
<integer>21</integer>
<integer>3568</integer>
</array>
<key>IBSystem Version</key>
......
......@@ -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 */
......
......@@ -638,6 +638,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 -
......@@ -2092,11 +2094,16 @@ end:
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];
[req setHTTPMethod:@"POST"];
ABPerson * contact = [[ABAddressBook sharedAddressBook] me];
ABMultiValue *emails = [contact valueForProperty:kABEmailProperty];
NSString * email = [emails valueAtIndex:[emails indexForIdentifier:
[emails primaryIdentifier]]];
NSString * email;
if( [o_crashrep_includeEmail_ckb state] == NSOnState )
{
ABPerson * contact = [[ABAddressBook sharedAddressBook] me];
ABMultiValue *emails = [contact valueForProperty:kABEmailProperty];
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