From 9774d51212dcaffa4d7a63fa8b905f75a745b885 Mon Sep 17 00:00:00 2001 From: Yonatan Mittlefehldt Date: Fri, 22 Aug 2014 10:39:18 +0200 Subject: [PATCH] Added option to set expiration to 90 days --- MacPass/MPDatePickingViewController.m | 8 ++++++-- MacPass/de.lproj/Localizable.strings | Bin 10032 -> 10086 bytes MacPass/en.lproj/Localizable.strings | Bin 9410 -> 9462 bytes MacPass/fr.lproj/Localizable.strings | Bin 10124 -> 10176 bytes MacPass/nl.lproj/Localizable.strings | Bin 10036 -> 10098 bytes MacPass/zh-Hans.lproj/Localizable.strings | Bin 7726 -> 7768 bytes 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/MacPass/MPDatePickingViewController.m b/MacPass/MPDatePickingViewController.m index 76f45ddc..b3ce0a4e 100644 --- a/MacPass/MPDatePickingViewController.m +++ b/MacPass/MPDatePickingViewController.m @@ -16,6 +16,7 @@ typedef NS_ENUM(NSUInteger, MPDatePreset) { MPDatePresetTomorrow, MPDatePresetOneWeek, MPDatePresetOneMonth, + MPDatePreset90Days, MPDatePresetOneYear, }; @@ -33,8 +34,8 @@ typedef NS_ENUM(NSUInteger, MPDatePreset) { - (void)awakeFromNib { NSMenu *presetMenu = [[NSMenu alloc] init]; - NSUInteger tags[] = { MPDatePresetTomorrow, MPDatePresetOneWeek, MPDatePresetOneMonth, MPDatePresetOneYear }; - NSArray *dateItems = @[ NSLocalizedString(@"TOMORROW", ""), NSLocalizedString(@"ONE_WEEK", ""), NSLocalizedString(@"ONE_MONTH", ""), NSLocalizedString(@"ONE_YEAR", "") ]; + NSUInteger tags[] = { MPDatePresetTomorrow, MPDatePresetOneWeek, MPDatePresetOneMonth, MPDatePreset90Days, MPDatePresetOneYear }; + NSArray *dateItems = @[ NSLocalizedString(@"TOMORROW", ""), NSLocalizedString(@"ONE_WEEK", ""), NSLocalizedString(@"ONE_MONTH", ""), NSLocalizedString(@"90_DAYS", ""), NSLocalizedString(@"ONE_YEAR", "") ]; for(NSInteger iIndex = 0; iIndex < sizeof(tags)/sizeof(NSUInteger); iIndex++) { NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:dateItems[iIndex] action:NULL keyEquivalent:@""]; [item setTag:tags[iIndex]]; @@ -75,6 +76,9 @@ typedef NS_ENUM(NSUInteger, MPDatePreset) { case MPDatePresetOneMonth: [offsetComponents setMonth:1]; break; + case MPDatePreset90Days: + [offsetComponents setDay:90]; + break; case MPDatePresetOneYear: [offsetComponents setYear:1]; break; diff --git a/MacPass/de.lproj/Localizable.strings b/MacPass/de.lproj/Localizable.strings index daa27b7f2de20d636d7ebb9cc28af10b41965f51..6441b28874d57f981a7b6b1d919128ba0ad1315b 100644 GIT binary patch delta 56 zcmdns_snm@FD7+M1_Oq81{VfLhDe5B1|7&001fHX)}fgyzByt5K