Skip to content

Commit

Permalink
#43 have been implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm committed Dec 28, 2013
1 parent 8885f03 commit 8595e75
Show file tree
Hide file tree
Showing 4 changed files with 368 additions and 27 deletions.
2 changes: 2 additions & 0 deletions ReplyWithHeader/MHConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
#define MHHeaderLabelMode @"MHHeaderLabelMode"
#define MHHeaderOrderMode @"MHHeaderOrderMode"

#define MHHeaderAttributionFromTagStyle @"MHHeaderAttributionFromTagStyle"

#define MHPluginNotifyNewVersion @"MHNotifyPluginNewVersion"
#define MHSubjectPrefixTextEnabled @"MHSubjectPrefixTextEnabled"
#define MHBundleHeaderLanguageCode @"MHBundleHeaderLanguageCode"
Expand Down
6 changes: 5 additions & 1 deletion ReplyWithHeader/MHHeaderString.m
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ - (void)applyHeaderLabelChange
range = [[row string] rangeOfString:@":"];
NSString *fromString = [[row string] substringFromIndex:range.location + 2];

fromString = [self getFullNameFromEmailAddress:fromString isMailToNeeded:TRUE];
NSInteger fromTagStyle = GET_DEFAULT_INT(MHHeaderAttributionFromTagStyle);
BOOL mailToNeeded = FALSE;

if (fromTagStyle == 1) mailToNeeded = TRUE;
fromString = [self getFullNameFromEmailAddress:fromString isMailToNeeded:mailToNeeded];

[row replaceCharactersInRange:NSMakeRange(range.location + 2, [row length] - (range.location + 2)) withString:fromString];
}
Expand Down
1 change: 1 addition & 0 deletions ReplyWithHeader/MailHeader.m
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ + (void)assignUserDefaults
[NSNumber numberWithBool:NO], MHRemoveSignatureEnabled,
[NSNumber numberWithInt:2], MHHeaderLabelMode,
[NSNumber numberWithInt:2], MHHeaderOrderMode,
[NSNumber numberWithInt:0], MHHeaderAttributionFromTagStyle,
[NSNumber numberWithBool:NO], MHLogEnabled,
nil
];
Expand Down
Loading

0 comments on commit 8595e75

Please sign in to comment.