diff --git a/Clocker-Helper/Clocker-Helper.xcodeproj/project.pbxproj b/Clocker-Helper/Clocker-Helper.xcodeproj/project.pbxproj index 1c40b92..ec934ad 100644 --- a/Clocker-Helper/Clocker-Helper.xcodeproj/project.pbxproj +++ b/Clocker-Helper/Clocker-Helper.xcodeproj/project.pbxproj @@ -168,7 +168,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer: Abhishek Banthia (75WFZYE9LW)"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -212,7 +212,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer: Abhishek Banthia (75WFZYE9LW)"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -237,7 +237,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "Clocker-Helper/Clocker-Helper.entitlements"; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = "Clocker-Helper/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; @@ -253,7 +253,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "Clocker-Helper/Clocker-Helper.entitlements"; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = "Clocker-Helper/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; diff --git a/Clocker-Helper/Clocker-Helper/AppDelegate.m b/Clocker-Helper/Clocker-Helper/AppDelegate.m index 373df90..c1be60e 100644 --- a/Clocker-Helper/Clocker-Helper/AppDelegate.m +++ b/Clocker-Helper/Clocker-Helper/AppDelegate.m @@ -19,29 +19,9 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - - [[NSDistributedNotificationCenter defaultCenter] addObserver:self - selector:@selector(killApp) - name:terminateNotification - object:mainAppBundleIdentifier]; - - - __block BOOL alreadyRunning = NO; - __block BOOL isActive = NO; - [[NSWorkspace sharedWorkspace].runningApplications enumerateObjectsUsingBlock:^(NSRunningApplication * _Nonnull app, NSUInteger idx, BOOL * _Nonnull stop) { - if ([[app bundleIdentifier] isEqualToString:@"com.abhishek.Clocker"]) { - alreadyRunning = YES; - isActive = [app isActive]; - } - }]; - - if (!alreadyRunning || !isActive) { - NSString *path = [[[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent]; - NSLog(@"Path:%@", path); - [[NSWorkspace sharedWorkspace] launchApplication:path]; - - } + NSString *path = [[[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent]; + [[NSWorkspace sharedWorkspace] launchApplication:path]; [NSApp terminate:nil]; } diff --git a/Clocker.xcodeproj/project.pbxproj b/Clocker.xcodeproj/project.pbxproj index 32c7300..88cfa96 100755 --- a/Clocker.xcodeproj/project.pbxproj +++ b/Clocker.xcodeproj/project.pbxproj @@ -11,6 +11,11 @@ 9A13BACA1CA877A6007C6CBE /* CLPreferencesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A13BACC1CA877A6007C6CBE /* CLPreferencesView.xib */; }; 9A13BACE1CA879E5007C6CBE /* CLAppearanceView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A13BAD01CA879E5007C6CBE /* CLAppearanceView.xib */; }; 9A13BAD21CA87DF4007C6CBE /* CLOnboardingWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A13BAD41CA87DF4007C6CBE /* CLOnboardingWindow.xib */; }; + 9A13BAD61CA87F08007C6CBE /* Panel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A13BAD81CA87F08007C6CBE /* Panel.xib */; }; + 9A13BADA1CA87F3F007C6CBE /* CLOneWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A13BADC1CA87F3F007C6CBE /* CLOneWindow.xib */; }; + 9A13BAE01CA882FA007C6CBE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9A13BAE21CA882FA007C6CBE /* InfoPlist.strings */; }; + 9A13BAE61CA889BB007C6CBE /* CLAppFeedbackWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A13BAE81CA889BB007C6CBE /* CLAppFeedbackWindow.xib */; }; + 9A13BAEA1CA88A76007C6CBE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9A13BAEC1CA88A76007C6CBE /* Localizable.strings */; }; 9A20A04B1C4DEED200FB45AB /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A20A04A1C4DEED200FB45AB /* IOKit.framework */; }; 9A20A0701C4E804D00FB45AB /* ServiceManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A20A06F1C4E804D00FB45AB /* ServiceManagement.framework */; }; 9A20A0721C4E80A800FB45AB /* Clocker-Helper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9A20A06E1C4E801600FB45AB /* Clocker-Helper.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -28,11 +33,9 @@ 9A43792C1BEC231100F4E27F /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A43792B1BEC231100F4E27F /* libz.tbd */; }; 9A43792E1BEC256200F4E27F /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9A43792D1BEC256200F4E27F /* Media.xcassets */; }; 9A56DB801C1CFB73004CE6AF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A56DB7D1C1CFB73004CE6AF /* MainMenu.xib */; }; - 9A56DB811C1CFB73004CE6AF /* Panel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A56DB7E1C1CFB73004CE6AF /* Panel.xib */; }; 9A5951BA1C1D0A22009C17AA /* Crashlytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5951B91C1D0A22009C17AA /* Crashlytics.framework */; }; 9A5951BD1C1D0A8D009C17AA /* CommonStrings.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A5951BB1C1D0A8D009C17AA /* CommonStrings.m */; }; 9A5951C01C1D0AA0009C17AA /* CLOneWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A5951BE1C1D0AA0009C17AA /* CLOneWindowController.m */; }; - 9A5951C21C1D0AAD009C17AA /* CLOneWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A5951C11C1D0AAD009C17AA /* CLOneWindow.xib */; }; 9A5951F51C1D3D81009C17AA /* CLTimezoneCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A5951F41C1D3D81009C17AA /* CLTimezoneCellView.m */; }; 9A5951FA1C1D5214009C17AA /* iVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A5951F91C1D5214009C17AA /* iVersion.m */; }; 9A5951FD1C1D592D009C17AA /* iVersion.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9A5951FC1C1D592D009C17AA /* iVersion.bundle */; }; @@ -53,7 +56,6 @@ 9A87DACA1C358FA800A8CF3B /* DTTimePeriodGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A87DAC11C358FA800A8CF3B /* DTTimePeriodGroup.m */; }; 9A87DACB1C358FA800A8CF3B /* NSDate+DateTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A87DAC31C358FA800A8CF3B /* NSDate+DateTools.m */; }; 9A9E63861C2C673E009A299B /* CLAppFeedbackWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A9E63841C2C673E009A299B /* CLAppFeedbackWindowController.m */; }; - 9A9E63871C2C673E009A299B /* CLAppFeedbackWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A9E63851C2C673E009A299B /* CLAppFeedbackWindow.xib */; }; 9A9E875A1C1FED1A00A7A2DF /* Parse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A9E87581C1FED1A00A7A2DF /* Parse.framework */; }; 9A9E875F1C1FED7500A7A2DF /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A9E87571C1FED1A00A7A2DF /* Bolts.framework */; }; 9A9E87621C1FEDB500A7A2DF /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A9E87611C1FEDB500A7A2DF /* CFNetwork.framework */; }; @@ -114,6 +116,16 @@ 9A13BAD11CA879E8007C6CBE /* ja */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ja; path = ja.lproj/CLAppearanceView.xib; sourceTree = ""; }; 9A13BAD31CA87DF4007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/CLOnboardingWindow.xib; sourceTree = ""; }; 9A13BAD51CA87DF5007C6CBE /* ja */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ja; path = ja.lproj/CLOnboardingWindow.xib; sourceTree = ""; }; + 9A13BAD71CA87F08007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/Panel.xib; sourceTree = ""; }; + 9A13BAD91CA87F09007C6CBE /* ja */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ja; path = ja.lproj/Panel.xib; sourceTree = ""; }; + 9A13BADB1CA87F3F007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/CLOneWindow.xib; sourceTree = ""; }; + 9A13BADD1CA87F40007C6CBE /* ja */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ja; path = ja.lproj/CLOneWindow.xib; sourceTree = ""; }; + 9A13BAE11CA882FA007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 9A13BAE31CA882FC007C6CBE /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/InfoPlist.strings; sourceTree = ""; }; + 9A13BAE71CA889BB007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/CLAppFeedbackWindow.xib; sourceTree = ""; }; + 9A13BAE91CA889BD007C6CBE /* ja */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ja; path = ja.lproj/CLAppFeedbackWindow.xib; sourceTree = ""; }; + 9A13BAEB1CA88A76007C6CBE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 9A13BAED1CA88AD3007C6CBE /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; 9A20A04A1C4DEED200FB45AB /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 9A20A0691C4E801500FB45AB /* Clocker-Helper.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "Clocker-Helper.xcodeproj"; path = "Clocker-Helper/Clocker-Helper.xcodeproj"; sourceTree = ""; }; 9A20A06F1C4E804D00FB45AB /* ServiceManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ServiceManagement.framework; path = System/Library/Frameworks/ServiceManagement.framework; sourceTree = SDKROOT; }; @@ -138,13 +150,11 @@ 9A43792B1BEC231100F4E27F /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 9A43792D1BEC256200F4E27F /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = ""; }; 9A56DB7D1C1CFB73004CE6AF /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MainMenu.xib; path = Clocker/MainMenu.xib; sourceTree = ""; }; - 9A56DB7E1C1CFB73004CE6AF /* Panel.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = Panel.xib; path = Clocker/Panel.xib; sourceTree = ""; }; 9A5951B91C1D0A22009C17AA /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Crashlytics.framework; path = Frameworks/Crashlytics.framework; sourceTree = ""; }; 9A5951BB1C1D0A8D009C17AA /* CommonStrings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CommonStrings.m; path = Clocker/Utilities/CommonStrings.m; sourceTree = ""; }; 9A5951BC1C1D0A8D009C17AA /* CommonStrings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommonStrings.h; path = Clocker/Utilities/CommonStrings.h; sourceTree = ""; }; 9A5951BE1C1D0AA0009C17AA /* CLOneWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLOneWindowController.m; path = Clocker/CLOneWindow/CLOneWindowController.m; sourceTree = ""; }; 9A5951BF1C1D0AA0009C17AA /* CLOneWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLOneWindowController.h; path = Clocker/CLOneWindow/CLOneWindowController.h; sourceTree = ""; }; - 9A5951C11C1D0AAD009C17AA /* CLOneWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CLOneWindow.xib; path = Clocker/CLOneWindow/CLOneWindow.xib; sourceTree = ""; }; 9A5951D11C1D1D94009C17AA /* ApptentiveConnect.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApptentiveConnect.framework; path = Clocker/ApptentiveConnect/ApptentiveConnect.framework; sourceTree = ""; }; 9A5951F31C1D3D81009C17AA /* CLTimezoneCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLTimezoneCellView.h; path = "Clocker/Custom Table Cell Views/CLTimezoneCellView.h"; sourceTree = ""; }; 9A5951F41C1D3D81009C17AA /* CLTimezoneCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLTimezoneCellView.m; path = "Clocker/Custom Table Cell Views/CLTimezoneCellView.m"; sourceTree = ""; }; @@ -187,7 +197,6 @@ 9A87DAC31C358FA800A8CF3B /* NSDate+DateTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDate+DateTools.m"; path = "Clocker/Date Tools/DateTools-master/DateTools/NSDate+DateTools.m"; sourceTree = ""; }; 9A9E63831C2C673E009A299B /* CLAppFeedbackWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLAppFeedbackWindowController.h; path = "Clocker/App Feedback/CLAppFeedbackWindowController.h"; sourceTree = ""; }; 9A9E63841C2C673E009A299B /* CLAppFeedbackWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLAppFeedbackWindowController.m; path = "Clocker/App Feedback/CLAppFeedbackWindowController.m"; sourceTree = ""; }; - 9A9E63851C2C673E009A299B /* CLAppFeedbackWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CLAppFeedbackWindow.xib; path = "Clocker/App Feedback/CLAppFeedbackWindow.xib"; sourceTree = ""; }; 9A9E87571C1FED1A00A7A2DF /* Bolts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Bolts.framework; path = Clocker/Parse/Bolts.framework; sourceTree = ""; }; 9A9E87581C1FED1A00A7A2DF /* Parse.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Parse.framework; path = Clocker/Parse/Parse.framework; sourceTree = ""; }; 9A9E87611C1FEDB500A7A2DF /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; @@ -245,6 +254,8 @@ 9A5951BC1C1D0A8D009C17AA /* CommonStrings.h */, 9A6362081C432F68004AD010 /* CLAPI.h */, 9A6362091C432F68004AD010 /* CLAPI.m */, + 9A13BAE21CA882FA007C6CBE /* InfoPlist.strings */, + 9A13BAEC1CA88A76007C6CBE /* Localizable.strings */, ); name = Utilties; sourceTree = ""; @@ -304,13 +315,13 @@ 9A8605E01BEC15F400A810A4 /* XIB */ = { isa = PBXGroup; children = ( - 9A5951C11C1D0AAD009C17AA /* CLOneWindow.xib */, + 9A13BADC1CA87F3F007C6CBE /* CLOneWindow.xib */, 9A56DB7D1C1CFB73004CE6AF /* MainMenu.xib */, - 9A56DB7E1C1CFB73004CE6AF /* Panel.xib */, + 9A13BAD81CA87F08007C6CBE /* Panel.xib */, 9A13BAC81CA86A88007C6CBE /* CLAboutUsView.xib */, 9A13BACC1CA877A6007C6CBE /* CLPreferencesView.xib */, 9A13BAD01CA879E5007C6CBE /* CLAppearanceView.xib */, - 9A9E63851C2C673E009A299B /* CLAppFeedbackWindow.xib */, + 9A13BAE81CA889BB007C6CBE /* CLAppFeedbackWindow.xib */, 9A13BAD41CA87DF4007C6CBE /* CLOnboardingWindow.xib */, ); name = XIB; @@ -514,6 +525,9 @@ DD4F7C0313C30F9F00825C6E = { DevelopmentTeam = AJS5SNW8EY; SystemCapabilities = { + com.apple.ApplicationGroups.Mac = { + enabled = 0; + }; com.apple.Sandbox = { enabled = 1; }; @@ -561,15 +575,17 @@ buildActionMask = 2147483647; files = ( 9A13BAD21CA87DF4007C6CBE /* CLOnboardingWindow.xib in Resources */, - 9A9E63871C2C673E009A299B /* CLAppFeedbackWindow.xib in Resources */, + 9A13BAE61CA889BB007C6CBE /* CLAppFeedbackWindow.xib in Resources */, 9A5951FD1C1D592D009C17AA /* iVersion.bundle in Resources */, + 9A13BAEA1CA88A76007C6CBE /* Localizable.strings in Resources */, + 9A13BAE01CA882FA007C6CBE /* InfoPlist.strings in Resources */, 9A13BACA1CA877A6007C6CBE /* CLPreferencesView.xib in Resources */, 9A20A07F1C4EAAEB00FB45AB /* CLIntroView.xib in Resources */, - 9A56DB811C1CFB73004CE6AF /* Panel.xib in Resources */, + 9A13BAD61CA87F08007C6CBE /* Panel.xib in Resources */, 9A43792E1BEC256200F4E27F /* Media.xcassets in Resources */, 9A13BAC61CA86A88007C6CBE /* CLAboutUsView.xib in Resources */, 9A13BACE1CA879E5007C6CBE /* CLAppearanceView.xib in Resources */, - 9A5951C21C1D0AAD009C17AA /* CLOneWindow.xib in Resources */, + 9A13BADA1CA87F3F007C6CBE /* CLOneWindow.xib in Resources */, 9A56DB801C1CFB73004CE6AF /* MainMenu.xib in Resources */, 9A87DAC41C358FA800A8CF3B /* DateTools.bundle in Resources */, ); @@ -676,6 +692,56 @@ path = Clocker/Onboarding; sourceTree = ""; }; + 9A13BAD81CA87F08007C6CBE /* Panel.xib */ = { + isa = PBXVariantGroup; + children = ( + 9A13BAD71CA87F08007C6CBE /* en */, + 9A13BAD91CA87F09007C6CBE /* ja */, + ); + name = Panel.xib; + path = Clocker; + sourceTree = ""; + }; + 9A13BADC1CA87F3F007C6CBE /* CLOneWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 9A13BADB1CA87F3F007C6CBE /* en */, + 9A13BADD1CA87F40007C6CBE /* ja */, + ); + name = CLOneWindow.xib; + path = Clocker/CLOneWindow; + sourceTree = ""; + }; + 9A13BAE21CA882FA007C6CBE /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 9A13BAE11CA882FA007C6CBE /* en */, + 9A13BAE31CA882FC007C6CBE /* ja */, + ); + name = InfoPlist.strings; + path = Clocker; + sourceTree = ""; + }; + 9A13BAE81CA889BB007C6CBE /* CLAppFeedbackWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 9A13BAE71CA889BB007C6CBE /* en */, + 9A13BAE91CA889BD007C6CBE /* ja */, + ); + name = CLAppFeedbackWindow.xib; + path = "Clocker/App Feedback"; + sourceTree = ""; + }; + 9A13BAEC1CA88A76007C6CBE /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 9A13BAEB1CA88A76007C6CBE /* en */, + 9A13BAED1CA88AD3007C6CBE /* ja */, + ); + name = Localizable.strings; + path = Clocker; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -690,7 +756,7 @@ CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer: Abhishek Banthia (75WFZYE9LW)"; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -717,7 +783,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = Clocker/Clocker.entitlements; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -750,7 +816,7 @@ CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer: Abhishek Banthia (75WFZYE9LW)"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -790,7 +856,7 @@ CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer: Abhishek Banthia (75WFZYE9LW)"; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -817,7 +883,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = Clocker/Clocker.entitlements; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -847,7 +913,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = Clocker/Clocker.entitlements; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate index a214809..19a9f17 100644 Binary files a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate and b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme index 2c93da6..f12852b 100644 --- a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme +++ b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme @@ -52,8 +52,7 @@ debugServiceExtension = "internal" allowLocationSimulation = "YES" showNonLocalizedStrings = "YES" - language = "ja" - region = "JP"> + language = "ja"> - + diff --git a/Clocker/App Feedback/ja.lproj/CLAppFeedbackWindow.xib b/Clocker/App Feedback/ja.lproj/CLAppFeedbackWindow.xib new file mode 100644 index 0000000..83bcdf7 --- /dev/null +++ b/Clocker/App Feedback/ja.lproj/CLAppFeedbackWindow.xib @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clocker/Appearance Tab/en.lproj/CLAppearanceView.xib b/Clocker/Appearance Tab/en.lproj/CLAppearanceView.xib index 24c6ca0..ce253ad 100644 --- a/Clocker/Appearance Tab/en.lproj/CLAppearanceView.xib +++ b/Clocker/Appearance Tab/en.lproj/CLAppearanceView.xib @@ -56,7 +56,7 @@ - + diff --git a/Clocker/Appearance Tab/ja.lproj/CLAppearanceView.xib b/Clocker/Appearance Tab/ja.lproj/CLAppearanceView.xib index 91a3953..3f4b4ed 100644 --- a/Clocker/Appearance Tab/ja.lproj/CLAppearanceView.xib +++ b/Clocker/Appearance Tab/ja.lproj/CLAppearanceView.xib @@ -56,7 +56,7 @@ - + diff --git a/Clocker/ApplicationDelegate.m b/Clocker/ApplicationDelegate.m index e555c86..5de775c 100755 --- a/Clocker/ApplicationDelegate.m +++ b/Clocker/ApplicationDelegate.m @@ -68,9 +68,9 @@ void *kContextActivePanel = &kContextActivePanel; + (void)initialize { //Configure iRate - [iRate sharedInstance].useAllAvailableLanguages = NO; - [iVersion sharedInstance].useAllAvailableLanguages = NO; - [[iRate sharedInstance] setVerboseLogging:NO]; + [iRate sharedInstance].useAllAvailableLanguages = YES; + [iVersion sharedInstance].useAllAvailableLanguages = YES; + [[iRate sharedInstance] setVerboseLogging:YES]; [[iVersion sharedInstance] setVerboseLogging:NO]; } @@ -78,25 +78,10 @@ void *kContextActivePanel = &kContextActivePanel; - (void)applicationDidFinishLaunching:(NSNotification *)notification { - - - __block BOOL startedAtLogin = NO; - - [[NSWorkspace sharedWorkspace].runningApplications enumerateObjectsUsingBlock:^(NSRunningApplication * _Nonnull app, NSUInteger idx, BOOL * _Nonnull stop) { - if ([app.bundleIdentifier isEqualToString:helperAppBundleIdentifier]) startedAtLogin = YES; - - }]; - - if (startedAtLogin) { - [[NSDistributedNotificationCenter defaultCenter] - postNotificationName:terminateNotification - object:[[NSBundle mainBundle] bundleIdentifier]]; - } - - + NSString *defaultTheme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; if (defaultTheme == nil) { - [[NSUserDefaults standardUserDefaults] setObject:@"Default" forKey:CLThemeKey]; + [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:CLThemeKey]; } NSNumber *displayFutureSlider = [[NSUserDefaults standardUserDefaults] objectForKey:CLDisplayFutureSliderKey]; diff --git a/Clocker/BackgroundView.m b/Clocker/BackgroundView.m index 37b0a4d..53a8c43 100755 --- a/Clocker/BackgroundView.m +++ b/Clocker/BackgroundView.m @@ -81,8 +81,8 @@ [path lineToPoint:NSMakePoint(_arrowX - ARROW_WIDTH / 2, NSMaxY(contentRect) - ARROW_HEIGHT)]; [path closePath]; - NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; - [theme isEqualToString:@"Default"] ? + NSNumber *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; + (theme.integerValue == 0) ? [[NSColor colorWithDeviceRed:255.0f green:255.0f blue:255.0f alpha:FILL_OPACITY] setFill]: [[NSColor colorWithDeviceRed:0.0f green:0.0f blue:0.0f alpha:FILL_OPACITY] setFill]; diff --git a/Clocker/CLOneWindow/CLOneWindow.xib b/Clocker/CLOneWindow/en.lproj/CLOneWindow.xib similarity index 98% rename from Clocker/CLOneWindow/CLOneWindow.xib rename to Clocker/CLOneWindow/en.lproj/CLOneWindow.xib index eebaf4c..e1afc36 100644 --- a/Clocker/CLOneWindow/CLOneWindow.xib +++ b/Clocker/CLOneWindow/en.lproj/CLOneWindow.xib @@ -1,5 +1,5 @@ - + diff --git a/Clocker/CLOneWindow/ja.lproj/CLOneWindow.xib b/Clocker/CLOneWindow/ja.lproj/CLOneWindow.xib new file mode 100644 index 0000000..8c5c2e9 --- /dev/null +++ b/Clocker/CLOneWindow/ja.lproj/CLOneWindow.xib @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clocker/Clocker.entitlements b/Clocker/Clocker.entitlements index ee95ab7..4da9e8f 100644 --- a/Clocker/Clocker.entitlements +++ b/Clocker/Clocker.entitlements @@ -4,6 +4,8 @@ com.apple.security.app-sandbox + com.apple.security.application-groups + com.apple.security.network.client diff --git a/Clocker/Custom Slider/CLCustomSliderCell.m b/Clocker/Custom Slider/CLCustomSliderCell.m index 3dba16d..efa6853 100644 --- a/Clocker/Custom Slider/CLCustomSliderCell.m +++ b/Clocker/Custom Slider/CLCustomSliderCell.m @@ -29,14 +29,14 @@ leftRect.size.width = finalWidth; NSBezierPath* bg = [NSBezierPath bezierPathWithRoundedRect: rect xRadius: barRadius yRadius: barRadius]; - NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; - [theme isEqualToString:@"Black"] ? [NSColor.whiteColor setFill] : [[NSColor colorWithCalibratedRed:67.0/255.0 green:138.0/255.0 blue:250.0/255.0 alpha:1.0] setFill]; + NSNumber *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; + (theme.integerValue == 1) ? [NSColor.whiteColor setFill] : [[NSColor colorWithCalibratedRed:67.0/255.0 green:138.0/255.0 blue:250.0/255.0 alpha:1.0] setFill]; [bg fill]; // Draw Right Part NSBezierPath* active = [NSBezierPath bezierPathWithRoundedRect: leftRect xRadius: barRadius yRadius: barRadius]; [[NSColor colorWithCalibratedRed:67.0/255.0 green:138.0/255.0 blue:250.0/255.0 alpha:1.0] setFill]; - [theme isEqualToString:@"Black"] ? [[NSColor colorWithCalibratedRed:67.0/255.0 green:138.0/255.0 blue:250.0/255.0 alpha:1.0] setFill] : [NSColor.grayColor setFill]; + (theme.integerValue == 1) ? [[NSColor colorWithCalibratedRed:67.0/255.0 green:138.0/255.0 blue:250.0/255.0 alpha:1.0] setFill] : [NSColor.grayColor setFill]; [active fill]; } diff --git a/Clocker/PanelController.h b/Clocker/PanelController.h index 30ee6c3..1783887 100755 --- a/Clocker/PanelController.h +++ b/Clocker/PanelController.h @@ -66,7 +66,6 @@ @property (weak) IBOutlet NSButton *shutdownButton; @property (weak) IBOutlet NSButton *preferencesButton; @property (weak) IBOutlet NSSlider *futureSlider; -@property (weak) IBOutlet NSTextField *sliderLabel; @property (strong, nonatomic) PanelController *panelWindow; @property (strong, nonatomic) NSTimer *floatingWindowTimer; diff --git a/Clocker/PanelController.m b/Clocker/PanelController.m index 6056dc6..1a7f9ca 100755 --- a/Clocker/PanelController.m +++ b/Clocker/PanelController.m @@ -90,7 +90,14 @@ static PanelController *sharedPanel = nil; self.dateFormatter = [NSDateFormatter new]; } - if ([[[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey] isEqualToString:@"Black"]) { + if ([[[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey] isKindOfClass:[NSString class]]) { + [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:CLThemeKey]; + } + + NSNumber *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; + + if (theme.integerValue == 1) + { self.shutdownButton.image = [NSImage imageNamed:@"PowerIcon-White"]; self.preferencesButton.image = [NSImage imageNamed:@"Settings-White"]; } @@ -182,22 +189,13 @@ static PanelController *sharedPanel = nil; self.scrollViewHeight.constant = self.showReviewCell ? (self.defaultPreferences.count+1)*55+40 : self.defaultPreferences.count*55 + 30; - if (self.defaultPreferences.count == 0) { + if (self.defaultPreferences.count == 1) { self.futureSlider.hidden = YES; - self.sliderLabel.hidden = YES; } else { self.futureSlider.hidden = NO; - self.sliderLabel.hidden = NO; - } - - //hide the label when show review cell is shown so that the Main Panel looks cleaner - - if (self.showReviewCell) { - self.sliderLabel.hidden = YES; } - } #pragma mark - Public accessors @@ -372,8 +370,8 @@ static PanelController *sharedPanel = nil; fieldEditor:YES forObject:cell.relativeDate]; - NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; - if (theme.length > 0 && ![theme isEqualToString:@"Default"]) + NSNumber *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; + if (theme.integerValue == 1) { [cell updateTextColorWithColor:[NSColor whiteColor] andCell:cell]; [self.mainTableview setBackgroundColor:[NSColor blackColor]]; @@ -401,15 +399,13 @@ static PanelController *sharedPanel = nil; cell.customName.stringValue = [dataObject formatStringShouldContainCity:YES]; NSNumber *displayFutureSlider = [[NSUserDefaults standardUserDefaults] objectForKey:CLDisplayFutureSliderKey]; - if ([displayFutureSlider isEqualToNumber:[NSNumber numberWithInteger:0]]) + if ([displayFutureSlider isEqualToNumber:[NSNumber numberWithInteger:1]]) { - self.futureSlider.hidden = NO; - self.sliderLabel.hidden = NO; + self.futureSlider.hidden = YES; } else { - self.sliderLabel.hidden = YES; - self.futureSlider.hidden = YES; + self.futureSlider.hidden = NO; } [cell setUpAutoLayoutWithCell:cell]; @@ -500,25 +496,10 @@ static PanelController *sharedPanel = nil; - (void)showOptions:(BOOL)value { - if (self.showReviewCell) { - self.sliderLabel.hidden = YES; - return; - } - - - if (!self.futureSlider.isHidden) { - self.sliderLabel.hidden = !value; - } - if (self.defaultPreferences.count == 0) { value = YES; - - if (!self.futureSlider.isHidden) - { - self.sliderLabel.hidden = YES; - } } dispatch_async(dispatch_get_main_queue(), ^{ @@ -583,8 +564,8 @@ static PanelController *sharedPanel = nil; - (void)updatePanelColor { - NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; - if (theme.length > 0 && ![theme isEqualToString:@"Default"]) + NSNumber *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; + if (theme.integerValue) { [self.mainTableview setBackgroundColor:[NSColor blackColor]]; self.window.alphaValue = 0.90; diff --git a/Clocker/en.lproj/InfoPlist.strings b/Clocker/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..79d4436 --- /dev/null +++ b/Clocker/en.lproj/InfoPlist.strings @@ -0,0 +1,10 @@ +/* + InfoPlist.strings + Clocker + + Created by Abhishek Banthia on 3/27/16. + +*/ + +"CFBundleDisplayName" = "Clocker"; +"CFBundleName" = "Clocker"; \ No newline at end of file diff --git a/Clocker/en.lproj/Localizable.strings b/Clocker/en.lproj/Localizable.strings new file mode 100644 index 0000000..08481a6 --- /dev/null +++ b/Clocker/en.lproj/Localizable.strings @@ -0,0 +1,9 @@ +/* + Localizable.strings + Clocker + + Created by Abhishek Banthia on 3/27/16. + +*/ + +"Thank you for helping make Clocker even better!" = "Thank you for helping make Clocker even better!"; \ No newline at end of file diff --git a/Clocker/Panel.xib b/Clocker/en.lproj/Panel.xib similarity index 94% rename from Clocker/Panel.xib rename to Clocker/en.lproj/Panel.xib index e8a0a41..c2e17e2 100755 --- a/Clocker/Panel.xib +++ b/Clocker/en.lproj/Panel.xib @@ -12,7 +12,6 @@ - @@ -201,18 +200,6 @@ - - - - - - - - - - - - @@ -255,13 +242,11 @@ - - diff --git a/Clocker/ja.lproj/InfoPlist.strings b/Clocker/ja.lproj/InfoPlist.strings new file mode 100644 index 0000000..2a59f59 --- /dev/null +++ b/Clocker/ja.lproj/InfoPlist.strings @@ -0,0 +1,10 @@ +/* + InfoPlist.strings + Clocker + + Created by Abhishek Banthia on 3/27/16. + +*/ + +"CFBundleDisplayName" = "タイムキーパー"; +"CFBundleName" = "タイムキーパー"; \ No newline at end of file diff --git a/Clocker/ja.lproj/Localizable.strings b/Clocker/ja.lproj/Localizable.strings new file mode 100644 index 0000000..14e94d8 --- /dev/null +++ b/Clocker/ja.lproj/Localizable.strings @@ -0,0 +1,9 @@ +/* + Localizable.strings + Clocker + + Created by Abhishek Banthia on 3/27/16. + +*/ + +"Thank you for helping make Clocker even better!" = "ありがとうございました"; \ No newline at end of file diff --git a/Clocker/ja.lproj/Panel.xib b/Clocker/ja.lproj/Panel.xib new file mode 100755 index 0000000..5b1e2e3 --- /dev/null +++ b/Clocker/ja.lproj/Panel.xib @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Screenshots/Screenshot1 2.png b/Screenshots/Screenshot1 2.png new file mode 100644 index 0000000..62dc67f Binary files /dev/null and b/Screenshots/Screenshot1 2.png differ diff --git a/Screenshots/Screenshot2.png b/Screenshots/Screenshot2.png index 0ed6f19..ddd2a47 100644 Binary files a/Screenshots/Screenshot2.png and b/Screenshots/Screenshot2.png differ diff --git a/Screenshots/Screenshot3 2.png b/Screenshots/Screenshot3 2.png new file mode 100644 index 0000000..a213674 Binary files /dev/null and b/Screenshots/Screenshot3 2.png differ