Skip to content

Commit

Permalink
Hack UKCrashReporter to not use the address book to fill in the repor…
Browse files Browse the repository at this point in the history
…ter's email address because it pops a permission dialog.
  • Loading branch information
gnachman committed Mar 17, 2014
1 parent e716a27 commit 5fb8304
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
12 changes: 0 additions & 12 deletions UKCrashReporter/UKCrashReporter.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#import "UKCrashReporter.h"
#import "UKSystemInfo.h"
#import <AddressBook/AddressBook.h>


NSString* UKCrashReporterFindTenFiveCrashReportPath( NSString* appName, NSArray *folders );
Expand Down Expand Up @@ -187,18 +186,7 @@ -(void) awakeFromNib
userMessage = [[NSLocalizedStringFromTable(@"FEEDBACK_MESSAGE_TEXT",@"UKCrashReporter",@"") mutableCopy] autorelease];
[userMessage replaceOccurrencesOfString: @"%%LONGUSERNAME" withString: NSFullUserName()
options: 0 range: NSMakeRange(0, [userMessage length])];
ABMultiValue* emailAddresses = [[[ABAddressBook sharedAddressBook] me] valueForProperty: kABEmailProperty];
NSString* emailAddr = NSLocalizedStringFromTable(@"MISSING_EMAIL_ADDRESS",@"UKCrashReporter",@"");
if( emailAddresses )
{
NSString* defaultKey = [emailAddresses primaryIdentifier];
if( defaultKey )
{
NSUInteger defaultIndex = [emailAddresses indexForIdentifier: defaultKey];
if( defaultIndex != NSNotFound )
emailAddr = [emailAddresses valueAtIndex: defaultIndex];
}
}
[userMessage replaceOccurrencesOfString: @"%%EMAILADDRESS" withString: emailAddr
options: 0 range: NSMakeRange(0, [userMessage length])];
[informationField setString: userMessage];
Expand Down
2 changes: 0 additions & 2 deletions iTerm.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@
1D94EAB312D64022008225A9 /* UKNibOwner.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D94EAAA12D64022008225A9 /* UKNibOwner.m */; };
1D94EAB412D64022008225A9 /* UKSystemInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D94EAAB12D64022008225A9 /* UKSystemInfo.h */; };
1D94EAB512D64022008225A9 /* UKSystemInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D94EAAC12D64022008225A9 /* UKSystemInfo.m */; };
1D94EAC812D641D3008225A9 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D94EAC712D641D3008225A9 /* AddressBook.framework */; };
1D988597135D23BD0072023F /* ProcessCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D988595135D23BD0072023F /* ProcessCache.h */; };
1D988598135D23BD0072023F /* ProcessCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D988596135D23BD0072023F /* ProcessCache.m */; };
1D99785312EEB3D600F0794D /* GlobalSearch.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1D99785112EEB3D600F0794D /* GlobalSearch.xib */; };
Expand Down Expand Up @@ -1419,7 +1418,6 @@
F6E2DEDA0AE2F67200D20B3B /* Sparkle.framework in Frameworks */,
1D13EADC12113A2D00909F9C /* libncurses.dylib in Frameworks */,
1D6C18BE12951A3C00937A4A /* Carbon.framework in Frameworks */,
1D94EAC812D641D3008225A9 /* AddressBook.framework in Frameworks */,
1DF0897113DBAF4C00A52AD8 /* Quartz.framework in Frameworks */,
1DA7894814AC19F500C8FBD9 /* Growl in Frameworks */,
);
Expand Down

0 comments on commit 5fb8304

Please sign in to comment.