Skip to content

Commit

Permalink
Merge branch 'release/1.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ygini committed Oct 7, 2018
2 parents ee6c9fd + ee516eb commit f591928
Show file tree
Hide file tree
Showing 37 changed files with 1,217 additions and 36 deletions.
10 changes: 7 additions & 3 deletions src/HITDevKit/HITDevKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
E1B2C8C81B59351B005A9936 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = "Yoann Gini (Open Source Project)";
TargetAttributes = {
E1B2C8D01B59351B005A9936 = {
Expand Down Expand Up @@ -315,12 +315,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -369,12 +371,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -406,7 +410,7 @@
E1B2C8E81B59351B005A9936 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
Expand All @@ -428,7 +432,7 @@
E1B2C8E91B59351B005A9936 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
Expand Down
6 changes: 5 additions & 1 deletion src/HITDevKit/HITDevKit/HITPeriodicPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ - (instancetype)initWithSettings:(NSDictionary *)settings
{
self = [super initWithSettings:settings];
if (self) {
_repeat = [settings objectForKey:kHITPeriodicPluginRepeatKey];
if ([settings.allKeys containsObject:kHITPeriodicPluginRepeatKey]) {
_repeat = [settings objectForKey:kHITPeriodicPluginRepeatKey];
} else {
_repeat = @60;
}

if ([_repeat intValue] > 0) {
[self performSelector:@selector(setupCronJob)
Expand Down
2 changes: 1 addition & 1 deletion src/HITDevKit/HITDevKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>270</string>
<string>288</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Yoann Gini (Open Source Project). All rights reserved.</string>
<key>NSPrincipalClass</key>
Expand Down
49 changes: 48 additions & 1 deletion src/Hello IT.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
F8340B9D1C96CF9000C820D7 /* statusbar-warning@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F8340B891C96CF9000C820D7 /* statusbar-warning@2x.png */; };
F8340B9E1C96CF9000C820D7 /* statusbar.png in Resources */ = {isa = PBXBuildFile; fileRef = F8340B8A1C96CF9000C820D7 /* statusbar.png */; };
F8340B9F1C96CF9000C820D7 /* statusbar@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F8340B8B1C96CF9000C820D7 /* statusbar@2x.png */; };
F84238FF20C8748200FB5410 /* CachetHQComponent.hitp in Copy Default Plugins */ = {isa = PBXBuildFile; fileRef = F8D61B8A20C8731A00DE2453 /* CachetHQComponent.hitp */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
F89B593B1DA7DC350028D75F /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = F89B593A1DA7DC350028D75F /* Reachability.m */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -131,13 +132,27 @@
remoteGlobalIDString = F83294A51F773076009DA574;
remoteInfo = ADPass;
};
F842390120C8748800FB5410 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = F8B6573920C727D7009F31B6;
remoteInfo = CachetHQComponent;
};
F86CCC0A1F790D250043CF55 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F83294AE1F773076009DA574 /* ADPass.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = F83294A41F773076009DA574;
remoteInfo = ADPass;
};
F8D61B8920C8731A00DE2453 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F8B6573A20C727D7009F31B6;
remoteInfo = CachetHQComponent;
};
F8F4E5761F1A73CC004E8789 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = E1B2C8ED1B59351B005A9936 /* HITDevKit.xcodeproj */;
Expand Down Expand Up @@ -210,6 +225,7 @@
dstPath = "";
dstSubfolderSpec = 13;
files = (
F84238FF20C8748200FB5410 /* CachetHQComponent.hitp in Copy Default Plugins */,
F83294DD1F7736B5009DA574 /* ADPass.hitp in Copy Default Plugins */,
E14B67DA1B59110D00941A27 /* ScriptedItem.hitp in Copy Default Plugins */,
E14B67BB1B57888700941A27 /* OpenApplication.hitp in Copy Default Plugins */,
Expand Down Expand Up @@ -282,6 +298,7 @@
F89B59391DA7DC350028D75F /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; };
F89B593A1DA7DC350028D75F /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
F8B315891FA6BB1400839784 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/MainMenu.strings; sourceTree = "<group>"; };
F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CachetHQ.xcodeproj; path = CachetHQ/CachetHQ.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -329,6 +346,7 @@
E17743301B51E6E600A5B406 /* Plugins */ = {
isa = PBXGroup;
children = (
F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */,
F83294AE1F773076009DA574 /* ADPass.xcodeproj */,
E17743591B51EA8500A5B406 /* OpenResource.xcodeproj */,
E17743751B51F19B00A5B406 /* Separator.xcodeproj */,
Expand Down Expand Up @@ -489,6 +507,14 @@
name = statusbar;
sourceTree = "<group>";
};
F8D61B8620C8731A00DE2453 /* Products */ = {
isa = PBXGroup;
children = (
F8D61B8A20C8731A00DE2453 /* CachetHQComponent.hitp */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -507,6 +533,7 @@
);
dependencies = (
F8F4E5771F1A73CC004E8789 /* PBXTargetDependency */,
F842390220C8748800FB5410 /* PBXTargetDependency */,
F86CCC0B1F790D250043CF55 /* PBXTargetDependency */,
F8F4E5791F1A73CC004E8789 /* PBXTargetDependency */,
F8F4E57B1F1A73CC004E8789 /* PBXTargetDependency */,
Expand Down Expand Up @@ -546,7 +573,7 @@
E1D067F21B51D08E00567172 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = "Yoann Gini (Open Source Project)";
TargetAttributes = {
E1D067F91B51D08E00567172 = {
Expand Down Expand Up @@ -576,6 +603,10 @@
ProductGroup = F83294AF1F773076009DA574 /* Products */;
ProjectRef = F83294AE1F773076009DA574 /* ADPass.xcodeproj */;
},
{
ProductGroup = F8D61B8620C8731A00DE2453 /* Products */;
ProjectRef = F8D61B8520C8731A00DE2453 /* CachetHQ.xcodeproj */;
},
{
ProductGroup = E1B2C8EE1B59351B005A9936 /* Products */;
ProjectRef = E1B2C8ED1B59351B005A9936 /* HITDevKit.xcodeproj */;
Expand Down Expand Up @@ -699,6 +730,13 @@
remoteRef = F83294B21F773078009DA574 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F8D61B8A20C8731A00DE2453 /* CachetHQComponent.hitp */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = CachetHQComponent.hitp;
remoteRef = F8D61B8920C8731A00DE2453 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
Expand Down Expand Up @@ -785,6 +823,11 @@
target = E1D067F91B51D08E00567172 /* Hello IT */;
targetProxy = E1D0680E1B51D08F00567172 /* PBXContainerItemProxy */;
};
F842390220C8748800FB5410 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = CachetHQComponent;
targetProxy = F842390120C8748800FB5410 /* PBXContainerItemProxy */;
};
F86CCC0B1F790D250043CF55 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = ADPass;
Expand Down Expand Up @@ -863,12 +906,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -916,12 +961,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
4 changes: 2 additions & 2 deletions src/Hello IT/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.0</string>
<string>1.4.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>270</string>
<string>288</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
6 changes: 5 additions & 1 deletion src/Plugins/ADPass/ADPass.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
F832949D1F773076009DA574 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = "Yoann Gini";
TargetAttributes = {
F83294A41F773076009DA574 = {
Expand Down Expand Up @@ -178,13 +178,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -233,13 +235,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
21 changes: 17 additions & 4 deletions src/Plugins/ADPass/ADPass/HITPADPass.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define kHITPADPassLastNotifKey @"public.ad.pass.lastNotification"

#define kHITPADPassWillExpireFormat @"willExpireFormat"
#define kHITPADPassNeverExpireInfo @"neverExpireInfo"
#define kHITPADPassTooltip @"tooltip"
#define kHITPADPassOfflineTooltip @"offlineTooltip"

Expand All @@ -34,6 +35,7 @@ @interface HITPADPass () <NSUserNotificationCenterDelegate>
@property NSString *localeTablePath;

@property NSString *willExpireFormat;
@property NSString *neverExpireInfo;
@property NSString *tooltip;
@property NSString *offlineTooltip;

Expand All @@ -55,24 +57,30 @@ - (instancetype)initWithSettings:(NSDictionary*)settings
if (self) {
[NSUserNotificationCenter defaultUserNotificationCenter].delegate = self;

_alertXDaysBefore = [[settings objectForKey:kHITPADPassAlertXDaysBefore] integerValue];

if (_alertXDaysBefore == 0) {
if ([settings.allKeys containsObject:kHITPADPassAlertXDaysBefore]) {
_alertXDaysBefore = [[settings objectForKey:kHITPADPassAlertXDaysBefore] integerValue];
} else {
_alertXDaysBefore = 15;
}

NSString *defaultWillExpireFormat = @"🔐 📆 %ld";
NSString *defaultNeverExpireInfo = @"🔐 ∞";
NSString *defaultTooltip = @"Delay before your password expire, change it before!";
NSString *defaultOfflineTooltip = @"Your IT infrastructure isn't available. Current info is based on the last recorded value.";

_willExpireFormat = [settings objectForKey:kHITPADPassWillExpireFormat];
_neverExpireInfo = [settings objectForKey:kHITPADPassNeverExpireInfo];
_tooltip = [settings objectForKey:kHITPADPassTooltip];
_offlineTooltip = [settings objectForKey:kHITPADPassOfflineTooltip];

if ([_willExpireFormat length] == 0) {
_willExpireFormat = [[NSBundle bundleForClass:[self class]] localizedStringForKey:kHITPADPassWillExpireFormat value:defaultWillExpireFormat table:nil];
}

if ([_neverExpireInfo length] == 0) {
_neverExpireInfo = [[NSBundle bundleForClass:[self class]] localizedStringForKey:kHITPADPassNeverExpireInfo value:defaultNeverExpireInfo table:nil];
}

if ([_tooltip length] == 0) {
_tooltip = [[NSBundle bundleForClass:[self class]] localizedStringForKey:kHITPADPassTooltip value:defaultTooltip table:nil];
}
Expand Down Expand Up @@ -138,7 +146,12 @@ - (void)periodicAction:(NSTimer *)timer {
- (void)updateTitle {
NSDateComponents *components = [[NSCalendar currentCalendar] components:NSCalendarUnitDay fromDate:[NSDate date] toDate:self.passwordExpiryDate options:0];
long daysBeforeExpiry = (long)[components day];
self.menuItem.title = [NSString stringWithFormat:self.willExpireFormat, daysBeforeExpiry];

if (daysBeforeExpiry == 10522613) {
self.menuItem.title = self.neverExpireInfo;
} else {
self.menuItem.title = [NSString stringWithFormat:self.willExpireFormat, daysBeforeExpiry];
}

if (self.lastADRequestSucceded) {
self.menuItem.target = self;
Expand Down
1 change: 1 addition & 0 deletions src/Plugins/ADPass/ADPass/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// To show `Your password will expire in 42d` use format `Your password will expire in %ldd`

"willExpireFormat" = "Password expire in %ldd";
"neverExpireInfo" = "Your password does not expire";
"tooltip" = "Delay before your password expire, change it before!";
"disabledTooltip" = "Your IT infrastructure isn't available. Current info is based on the last recorded value and you can't change your password.";

Expand Down
1 change: 1 addition & 0 deletions src/Plugins/ADPass/ADPass/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// To show `Your password will expire in 42d` use format `Your password will expire in %ldd`

"willExpireFormat" = "Votre mot de passe expire dans %ldj";
"neverExpireInfo" = "Votre mot de passe n'expire jamais";
"tooltip" = "Nombre de jours avant que votre mot de passe ne change, pensez à le changer avant !";
"disabledTooltip" = "Votre système d'information est injoignable. L'information actuelle est basée sur la dernière valeur enregistrée et vous ne pouvez pas changer votre mot de passe.";

Expand Down
Loading

0 comments on commit f591928

Please sign in to comment.