diff --git a/Clocker-Helper/Clocker-Helper/AppDelegate.m b/Clocker-Helper/Clocker-Helper/AppDelegate.m index c64f756..373df90 100644 --- a/Clocker-Helper/Clocker-Helper/AppDelegate.m +++ b/Clocker-Helper/Clocker-Helper/AppDelegate.m @@ -26,17 +26,15 @@ object:mainAppBundleIdentifier]; - BOOL alreadyRunning = NO; - BOOL isActive = NO; + __block BOOL alreadyRunning = NO; + __block BOOL isActive = NO; - NSArray *running = [[NSWorkspace sharedWorkspace] runningApplications]; - for (NSRunningApplication *app in running) { + [[NSWorkspace sharedWorkspace].runningApplications enumerateObjectsUsingBlock:^(NSRunningApplication * _Nonnull app, NSUInteger idx, BOOL * _Nonnull stop) { if ([[app bundleIdentifier] isEqualToString:@"com.abhishek.Clocker"]) { alreadyRunning = YES; - isActive = [app isActive]; - break; + isActive = [app isActive]; } - } + }]; if (!alreadyRunning || !isActive) { NSString *path = [[[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent]; diff --git a/Clocker.xcodeproj/project.pbxproj b/Clocker.xcodeproj/project.pbxproj index 5659ece..3b05874 100755 --- a/Clocker.xcodeproj/project.pbxproj +++ b/Clocker.xcodeproj/project.pbxproj @@ -38,7 +38,6 @@ 9A5951FD1C1D592D009C17AA /* iVersion.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9A5951FC1C1D592D009C17AA /* iVersion.bundle */; }; 9A63620A1C432F68004AD010 /* CLAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A6362091C432F68004AD010 /* CLAPI.m */; }; 9A8605AE1BEC148400A810A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8605AD1BEC148400A810A4 /* main.m */; }; - 9A8605B31BEC14A600A810A4 /* ColoredButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8605B21BEC14A600A810A4 /* ColoredButton.m */; }; 9A8605B61BEC14BE00A810A4 /* MenubarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8605B41BEC14BE00A810A4 /* MenubarController.m */; }; 9A8605B71BEC14BE00A810A4 /* ApplicationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8605B51BEC14BE00A810A4 /* ApplicationDelegate.m */; }; 9A8605BA1BEC14DC00A810A4 /* StatusItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8605B81BEC14DC00A810A4 /* StatusItemView.m */; }; @@ -64,6 +63,7 @@ 9A9E876E1C1FEE1800A7A2DF /* Bolts.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9A9E87571C1FED1A00A7A2DF /* Bolts.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 9A9E876F1C1FEE1A00A7A2DF /* Parse.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9A9E87581C1FED1A00A7A2DF /* Parse.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 9AB9357B1C1AD8F7001285A0 /* CLRatingCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AB9357A1C1AD8F7001285A0 /* CLRatingCellView.m */; }; + 9ABA2B031C671D49009DC0EF /* CLMainWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9ABA2B021C671D49009DC0EF /* CLMainWindowController.m */; }; 9ABF58721C29A80600BD0187 /* CLTimezoneData.m in Sources */ = {isa = PBXBuildFile; fileRef = 9ABF58711C29A80600BD0187 /* CLTimezoneData.m */; }; 9AC678E41C1ABAB9003B4F6B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9AC678E31C1ABAB9003B4F6B /* QuartzCore.framework */; }; 9AF9A16B1C250AB300EE7C2A /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AF9A16A1C250AB300EE7C2A /* Reachability.m */; }; @@ -150,7 +150,6 @@ 9A6362081C432F68004AD010 /* CLAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLAPI.h; path = Clocker/API/CLAPI.h; sourceTree = ""; }; 9A6362091C432F68004AD010 /* CLAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLAPI.m; path = Clocker/API/CLAPI.m; sourceTree = ""; }; 9A8605AD1BEC148400A810A4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Clocker/main.m; sourceTree = ""; }; - 9A8605B21BEC14A600A810A4 /* ColoredButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ColoredButton.m; path = Clocker/ColoredButton.m; sourceTree = ""; }; 9A8605B41BEC14BE00A810A4 /* MenubarController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MenubarController.m; path = Clocker/MenubarController.m; sourceTree = ""; }; 9A8605B51BEC14BE00A810A4 /* ApplicationDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ApplicationDelegate.m; path = Clocker/ApplicationDelegate.m; sourceTree = ""; }; 9A8605B81BEC14DC00A810A4 /* StatusItemView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = StatusItemView.m; path = Clocker/StatusItemView.m; sourceTree = ""; }; @@ -164,7 +163,6 @@ 9A8605C81BEC155B00A810A4 /* PanelController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PanelController.h; path = Clocker/PanelController.h; sourceTree = ""; }; 9A8605C91BEC155B00A810A4 /* MenubarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MenubarController.h; path = Clocker/MenubarController.h; sourceTree = ""; }; 9A8605CA1BEC155B00A810A4 /* ApplicationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ApplicationDelegate.h; path = Clocker/ApplicationDelegate.h; sourceTree = ""; }; - 9A8605CB1BEC155B00A810A4 /* ColoredButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ColoredButton.h; path = Clocker/ColoredButton.h; sourceTree = ""; }; 9A8605CC1BEC155B00A810A4 /* Clocker-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Clocker-Prefix.pch"; path = "Clocker/Clocker-Prefix.pch"; sourceTree = ""; }; 9A87DAB41C358FA800A8CF3B /* DateTools.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = DateTools.bundle; path = "Clocker/Date Tools/DateTools-master/DateTools/DateTools.bundle"; sourceTree = ""; }; 9A87DAB51C358FA800A8CF3B /* DateTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DateTools.h; path = "Clocker/Date Tools/DateTools-master/DateTools/DateTools.h"; sourceTree = ""; }; @@ -195,6 +193,8 @@ 9A9E876B1C1FEDE700A7A2DF /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; 9AB935791C1AD8F7001285A0 /* CLRatingCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLRatingCellView.h; path = Clocker/CLRatingCellView.h; sourceTree = ""; }; 9AB9357A1C1AD8F7001285A0 /* CLRatingCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLRatingCellView.m; path = Clocker/CLRatingCellView.m; sourceTree = ""; }; + 9ABA2B011C671D49009DC0EF /* CLMainWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLMainWindowController.h; path = Clocker/CLMainWindowController.h; sourceTree = ""; }; + 9ABA2B021C671D49009DC0EF /* CLMainWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLMainWindowController.m; path = Clocker/CLMainWindowController.m; sourceTree = ""; }; 9ABF58701C29A80600BD0187 /* CLTimezoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLTimezoneData.h; path = Clocker/Model/CLTimezoneData.h; sourceTree = ""; }; 9ABF58711C29A80600BD0187 /* CLTimezoneData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLTimezoneData.m; path = Clocker/Model/CLTimezoneData.m; sourceTree = ""; }; 9AC678E31C1ABAB9003B4F6B /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; @@ -314,10 +314,10 @@ children = ( 9A8605C61BEC155B00A810A4 /* Panel.h */, 9A8605BD1BEC14F600A810A4 /* Panel.m */, - 9A8605CB1BEC155B00A810A4 /* ColoredButton.h */, - 9A8605B21BEC14A600A810A4 /* ColoredButton.m */, 9A3247301C25FD3A00CF6B6E /* CLCustomSliderCell.h */, 9A3247311C25FD3A00CF6B6E /* CLCustomSliderCell.m */, + 9ABA2B011C671D49009DC0EF /* CLMainWindowController.h */, + 9ABA2B021C671D49009DC0EF /* CLMainWindowController.m */, ); name = Superclass; sourceTree = ""; @@ -608,6 +608,7 @@ 9A8605BA1BEC14DC00A810A4 /* StatusItemView.m in Sources */, 9A87DAC91C358FA800A8CF3B /* DTTimePeriodCollection.m in Sources */, 9A3247391C263F4F00CF6B6E /* CLAppearanceViewController.m in Sources */, + 9ABA2B031C671D49009DC0EF /* CLMainWindowController.m in Sources */, 9A9E63861C2C673E009A299B /* CLAppFeedbackWindowController.m in Sources */, 9A8605BB1BEC14DC00A810A4 /* PanelController.m in Sources */, 9A8605B61BEC14BE00A810A4 /* MenubarController.m in Sources */, @@ -616,7 +617,6 @@ 9A8605B71BEC14BE00A810A4 /* ApplicationDelegate.m in Sources */, 9A5951F51C1D3D81009C17AA /* CLTimezoneCellView.m in Sources */, 9ABF58721C29A80600BD0187 /* CLTimezoneData.m in Sources */, - 9A8605B31BEC14A600A810A4 /* ColoredButton.m in Sources */, 9A8605AE1BEC148400A810A4 /* main.m in Sources */, 9A392EE81C1CDD530072C10A /* CLAboutUsViewController.m in Sources */, 9A87DACB1C358FA800A8CF3B /* NSDate+DateTools.m in Sources */, diff --git a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate index 595a97e..9d1a4d4 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/xcdebugger/Breakpoints_v2.xcbkptlist b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index bf78821..e675ea6 100644 --- a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -51,13 +51,13 @@ shouldBeEnabled = "Yes" ignoreCount = "0" continueAfterRunningActions = "No" - filePath = "Clocker/Model/CLTimezoneData.m" - timestampString = "474941219.735933" + filePath = "Clocker/ColoredButton.m" + timestampString = "475337911.265892" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "229" - endingLineNumber = "229" - landmarkName = "-compareSystemDate:toTimezoneDate:" + startingLineNumber = "53" + endingLineNumber = "53" + landmarkName = "-awakeFromNib" landmarkType = "5"> diff --git a/Clocker/AboutUsWindow/CLAboutUsViewController.h b/Clocker/AboutUsWindow/CLAboutUsViewController.h index 5f53100..1306491 100644 --- a/Clocker/AboutUsWindow/CLAboutUsViewController.h +++ b/Clocker/AboutUsWindow/CLAboutUsViewController.h @@ -11,7 +11,6 @@ @interface CLAboutUsViewController : NSViewController -@property (strong, nonatomic) CLAppFeedbackWindowController *feedbackWindow; -@property (weak) IBOutlet NSTextField *versionField; + @end diff --git a/Clocker/AboutUsWindow/CLAboutUsViewController.m b/Clocker/AboutUsWindow/CLAboutUsViewController.m index 046f6c0..b710c33 100644 --- a/Clocker/AboutUsWindow/CLAboutUsViewController.m +++ b/Clocker/AboutUsWindow/CLAboutUsViewController.m @@ -11,6 +11,9 @@ @interface CLAboutUsViewController () +@property (strong, nonatomic) CLAppFeedbackWindowController *feedbackWindow; +@property (weak) IBOutlet NSTextField *versionField; + @end static CLAboutUsViewController *sharedAboutUs = nil; diff --git a/Clocker/App Feedback/CLAppFeedbackWindowController.h b/Clocker/App Feedback/CLAppFeedbackWindowController.h index dcd0975..c1a279c 100644 --- a/Clocker/App Feedback/CLAppFeedbackWindowController.h +++ b/Clocker/App Feedback/CLAppFeedbackWindowController.h @@ -7,8 +7,9 @@ // #import +#import "CLMainWindowController.h" -@interface CLAppFeedbackWindowController : NSWindowController +@interface CLAppFeedbackWindowController : CLMainWindowController + (instancetype)sharedWindow; diff --git a/Clocker/App Feedback/CLAppFeedbackWindowController.m b/Clocker/App Feedback/CLAppFeedbackWindowController.m index c2ffaff..bd441e1 100644 --- a/Clocker/App Feedback/CLAppFeedbackWindowController.m +++ b/Clocker/App Feedback/CLAppFeedbackWindowController.m @@ -24,7 +24,7 @@ NSString *const CLFeedbackNotEnteredErrorMessage = @"Please enter some feedback. static CLAppFeedbackWindowController *sharedFeedbackWindow = nil; -@interface CLAppFeedbackWindowController () +@interface CLAppFeedbackWindowController () @property (weak) IBOutlet NSTextField *nameField; @property (weak) IBOutlet NSTextField *emailField; @property (unsafe_unretained) IBOutlet NSTextView *feedbackTextView; @@ -38,12 +38,6 @@ static CLAppFeedbackWindowController *sharedFeedbackWindow = nil; - (void)windowDidLoad { [super windowDidLoad]; - CALayer *viewLayer = [CALayer layer]; - [viewLayer setBackgroundColor:CGColorCreateGenericRGB(255.0, 255.0, 255.0, 0.8)]; //RGB plus Alpha Channel - [self.window.contentView setWantsLayer:YES]; // view's backing store is using a Core Animation Layer - [self.window.contentView setLayer:viewLayer]; - self.window.titlebarAppearsTransparent = YES; - self.window.backgroundColor = [NSColor whiteColor]; self.window.titleVisibility = NSWindowTitleHidden; @@ -85,9 +79,9 @@ static CLAppFeedbackWindowController *sharedFeedbackWindow = nil; PFObject *feedbackObject = [PFObject objectWithClassName:CLParseAppFeedbackClassIdentifier]; feedbackObject[CLParseAppFeedbackNameProperty] = (self.nameField.stringValue.length > 0) ? - self.nameField.stringValue : CLParseAppFeedbackNoResponseString; + self.nameField.stringValue : CLParseAppFeedbackNoResponseString; feedbackObject[CLParseAppFeedbackEmailProperty] = (self.emailField.stringValue.length > 0) ? - self.emailField.stringValue : CLParseAppFeedbackNoResponseString; + self.emailField.stringValue : CLParseAppFeedbackNoResponseString; feedbackObject[CLParseAppFeedbackFeedbackProperty] = self.feedbackTextView.string; [feedbackObject saveInBackgroundWithBlock:^(BOOL succeeded, NSError * _Nullable error) { self.activityInProgress = NO; @@ -102,19 +96,19 @@ static CLAppFeedbackWindowController *sharedFeedbackWindow = nil; } else { - NSAlert *alert = [[NSAlert alloc] init]; + NSAlert *alert = [NSAlert new]; alert.messageText = CLFeedbackAlertTitle; alert.informativeText = CLFeedbackAlertInformativeText; [alert addButtonWithTitle:CLFeedbackAlertButtonTitle]; [alert beginSheetModalForWindow:self.window - completionHandler:^(NSModalResponse returnCode) { - [self.window close]; - }]; + completionHandler:^(NSModalResponse returnCode) { + [self.window close]; + }]; } }]; - + } - (void)cleanUp @@ -134,14 +128,14 @@ static CLAppFeedbackWindowController *sharedFeedbackWindow = nil; self.emailField.stringValue = CLEmptyString; self.feedbackTextView.string = CLEmptyString; self.activityInProgress = NO; - for (NSWindow *window in [NSApplication sharedApplication].windows) - { + + [[NSApplication sharedApplication].windows enumerateObjectsUsingBlock:^(NSWindow * _Nonnull window, NSUInteger idx, BOOL * _Nonnull stop) { if ([window.windowController isMemberOfClass:[CLOneWindowController class]]) { [window makeKeyAndOrderFront:self]; [NSApp activateIgnoringOtherApps:YES]; } - } - + }]; + } @end diff --git a/Clocker/Appearance Tab/CLAppearanceView.xib b/Clocker/Appearance Tab/CLAppearanceView.xib index ecfb65d..78d6e98 100644 --- a/Clocker/Appearance Tab/CLAppearanceView.xib +++ b/Clocker/Appearance Tab/CLAppearanceView.xib @@ -227,8 +227,8 @@ + - diff --git a/Clocker/Appearance Tab/CLAppearanceViewController.h b/Clocker/Appearance Tab/CLAppearanceViewController.h index cdca795..e74a0bd 100644 --- a/Clocker/Appearance Tab/CLAppearanceViewController.h +++ b/Clocker/Appearance Tab/CLAppearanceViewController.h @@ -11,6 +11,4 @@ @interface CLAppearanceViewController : NSViewController -@property (assign, nonatomic) BOOL enableOptions; - @end diff --git a/Clocker/Appearance Tab/CLAppearanceViewController.m b/Clocker/Appearance Tab/CLAppearanceViewController.m index de92a76..4ec87fe 100644 --- a/Clocker/Appearance Tab/CLAppearanceViewController.m +++ b/Clocker/Appearance Tab/CLAppearanceViewController.m @@ -15,8 +15,8 @@ @interface CLAppearanceViewController () @property (weak) IBOutlet NSSegmentedControl *timeFormat; @property (weak) IBOutlet NSSegmentedControl *theme; -@property (weak) IBOutlet NSSegmentedControl *menuOptions; @property (weak) IBOutlet NSTextField *informationLabel; +@property (assign, nonatomic) BOOL enableOptions; @end diff --git a/Clocker/ApplicationDelegate.m b/Clocker/ApplicationDelegate.m index 78c0328..e0ea36a 100755 --- a/Clocker/ApplicationDelegate.m +++ b/Clocker/ApplicationDelegate.m @@ -68,8 +68,6 @@ void *kContextActivePanel = &kContextActivePanel; + (void)initialize { //Configure iRate - [iRate sharedInstance].appStoreID = 1056643111; - [iVersion sharedInstance].appStoreID = 1056643111; [iRate sharedInstance].useAllAvailableLanguages = NO; [iVersion sharedInstance].useAllAvailableLanguages = NO; [[iRate sharedInstance] setVerboseLogging:YES]; @@ -81,17 +79,18 @@ void *kContextActivePanel = &kContextActivePanel; - (void)applicationDidFinishLaunching:(NSNotification *)notification { - - BOOL startedAtLogin = NO; - NSArray *apps = [[NSWorkspace sharedWorkspace] runningApplications]; - for (NSRunningApplication *app in apps) { + + __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]]; + object:[[NSBundle mainBundle] bundleIdentifier]]; } @@ -125,20 +124,20 @@ void *kContextActivePanel = &kContextActivePanel; [[NSUserDefaults standardUserDefaults] setObject:@1 forKey:CLShowDateInMenu]; } - NSNumber *showCityInMenu = [[NSUserDefaults standardUserDefaults] objectForKey:CLShowCityInMenu]; + NSNumber *showCityInMenu = [[NSUserDefaults standardUserDefaults] objectForKey:CLShowPlaceInMenu]; if (showCityInMenu == nil) { - [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:CLShowCityInMenu]; + [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:CLShowPlaceInMenu]; } - - NSNumber *startClockerAtLogin = [[NSUserDefaults standardUserDefaults] objectForKey:@"startAtLogin"]; + + NSNumber *startClockerAtLogin = [[NSUserDefaults standardUserDefaults] objectForKey:CLStartAtLogin]; if (startClockerAtLogin == nil) { - [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"startAtLogin"]; + [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:CLStartAtLogin]; } NSString *onboarding = [[NSUserDefaults standardUserDefaults] objectForKey:@"initialLaunch"]; // Install icon into the menu bar - self.menubarController = [[MenubarController alloc] init]; + self.menubarController = [MenubarController new]; if (onboarding == nil) { @@ -164,6 +163,8 @@ void *kContextActivePanel = &kContextActivePanel; } + + - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { // Explicitly remove the icon from the menu bar diff --git a/Clocker/CLMainWindowController.h b/Clocker/CLMainWindowController.h new file mode 100644 index 0000000..3a8a4a6 --- /dev/null +++ b/Clocker/CLMainWindowController.h @@ -0,0 +1,13 @@ +// +// CLMainWindowController.h +// Clocker +// +// Created by Abhishek Banthia on 2/7/16. +// +// + +#import + +@interface CLMainWindowController : NSWindowController + +@end diff --git a/Clocker/CLMainWindowController.m b/Clocker/CLMainWindowController.m new file mode 100644 index 0000000..5d9cb70 --- /dev/null +++ b/Clocker/CLMainWindowController.m @@ -0,0 +1,30 @@ +// +// CLMainWindowController.m +// Clocker +// +// Created by Abhishek Banthia on 2/7/16. +// +// + +#import "CLMainWindowController.h" + +@interface CLMainWindowController () + +@end + +@implementation CLMainWindowController + +- (void)windowDidLoad { + [super windowDidLoad]; + + CALayer *viewLayer = [CALayer layer]; + [viewLayer setBackgroundColor:CGColorCreateGenericRGB(255.0, 255.0, 255.0, 0.8)]; //RGB plus Alpha Channel + [self.window.contentView setWantsLayer:YES]; // view's backing store is using a Core Animation Layer + [self.window.contentView setLayer:viewLayer]; + self.window.titlebarAppearsTransparent = YES; + + + // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. +} + +@end diff --git a/Clocker/CLOneWindow/CLOneWindowController.h b/Clocker/CLOneWindow/CLOneWindowController.h index 420c973..555ce74 100644 --- a/Clocker/CLOneWindow/CLOneWindowController.h +++ b/Clocker/CLOneWindow/CLOneWindowController.h @@ -12,11 +12,7 @@ #import "CLAppearanceViewController.h" @interface CLOneWindowController : NSWindowController - @property (strong, nonatomic) CLPreferencesViewController *preferencesView; -@property (strong, nonatomic) CLAboutUsViewController *aboutUsView; -@property (strong, nonatomic) CLAppearanceViewController *appearanceView; - + (instancetype)sharedWindow; @end diff --git a/Clocker/CLOneWindow/CLOneWindowController.m b/Clocker/CLOneWindow/CLOneWindowController.m index 101b04b..627eae2 100644 --- a/Clocker/CLOneWindow/CLOneWindowController.m +++ b/Clocker/CLOneWindow/CLOneWindowController.m @@ -16,6 +16,10 @@ NSString *const CLAppearenceViewNibIdentifier = @"CLAppearanceView"; @interface CLOneWindowController () + +@property (strong, nonatomic) CLAboutUsViewController *aboutUsView; +@property (strong, nonatomic) CLAppearanceViewController *appearanceView; + @end @implementation CLOneWindowController diff --git a/Clocker/Clocker-Info.plist b/Clocker/Clocker-Info.plist index d10d23e..28676e2 100755 --- a/Clocker/Clocker-Info.plist +++ b/Clocker/Clocker-Info.plist @@ -13,11 +13,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.2.2 + 1.2.3 CFBundleSignature ???? CFBundleVersion - 19 + 20 Fabric APIKey diff --git a/Clocker/Custom Table Cell Views/CLTimezoneCellView.h b/Clocker/Custom Table Cell Views/CLTimezoneCellView.h index 052ed16..71255a9 100644 --- a/Clocker/Custom Table Cell Views/CLTimezoneCellView.h +++ b/Clocker/Custom Table Cell Views/CLTimezoneCellView.h @@ -13,7 +13,7 @@ @property (weak) IBOutlet NSTextField *customName; @property (weak) IBOutlet NSTextField *relativeDate; @property (weak) IBOutlet NSTextField *time; -@property (nonatomic) NSInteger rowNumber; +@property (nonatomic, assign) NSInteger rowNumber; - (void)updateTextColorWithColor:(NSColor *)color andCell:(CLTimezoneCellView*)cell; - (void)setUpAutoLayoutWithCell:(CLTimezoneCellView *)cell; diff --git a/Clocker/Custom Table Cell Views/CLTimezoneCellView.m b/Clocker/Custom Table Cell Views/CLTimezoneCellView.m index a76edda..98a0c02 100644 --- a/Clocker/Custom Table Cell Views/CLTimezoneCellView.m +++ b/Clocker/Custom Table Cell Views/CLTimezoneCellView.m @@ -22,15 +22,14 @@ - (IBAction)labelDidChange:(id)sender { NSTextField *customLabelCell = (NSTextField*) sender; - PanelController *panelController; + __block PanelController *panelController; - for (NSWindow *window in [[NSApplication sharedApplication] windows]) - { + [[[NSApplication sharedApplication] windows] enumerateObjectsUsingBlock:^(NSWindow * _Nonnull window, NSUInteger idx, BOOL * _Nonnull stop) { if ([window.windowController isMemberOfClass:[PanelController class]]) { panelController = window.windowController; } - } + }]; NSString *originalValue = customLabelCell.stringValue; NSString *customLabelValue = [originalValue stringByTrimmingCharactersInSet: @@ -41,14 +40,16 @@ CLTimezoneCellView *cellView = (CLTimezoneCellView *)[sender superview]; NSData *dataObject = panelController.defaultPreferences[cellView.rowNumber]; CLTimezoneData *timezoneObject = [CLTimezoneData getCustomObject:dataObject]; - - for (NSData *object in panelController.defaultPreferences) - { + + [panelController.defaultPreferences enumerateObjectsUsingBlock:^(id _Nonnull object, NSUInteger idx, BOOL * _Nonnull stop) { + CLTimezoneData *timeObject = [CLTimezoneData getCustomObject:object]; if ([timeObject.formattedAddress isEqualToString:customLabelValue]) { timeObject.customLabel = CLEmptyString; } - } + + + }]; timezoneObject.customLabel = (customLabelValue.length > 0) ? customLabelValue : CLEmptyString; NSData *newObject = [NSKeyedArchiver archivedDataWithRootObject:timezoneObject]; @@ -77,13 +78,15 @@ CGFloat width = [cell.relativeDate.stringValue sizeWithAttributes: @{NSFontAttributeName:cell.relativeDate.font}].width; - for (NSLayoutConstraint *constraint in cell.relativeDate.constraints) - { + + [cell.relativeDate.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint * _Nonnull constraint, NSUInteger idx, BOOL * _Nonnull stop) { if (constraint.constant > 20) { constraint.constant = width+8; } - } + + + }]; } @end diff --git a/Clocker/Model/CLTimezoneData.m b/Clocker/Model/CLTimezoneData.m index 6a24ecd..db26174 100644 --- a/Clocker/Model/CLTimezoneData.m +++ b/Clocker/Model/CLTimezoneData.m @@ -19,7 +19,9 @@ -(instancetype)initWithDictionary:(NSDictionary *)dictionary { - if (self == [super init]) + self = [super init]; + + if (self) { self.customLabel = dictionary[CLCustomLabel]; self.timezoneID = dictionary[CLTimezoneID]; @@ -35,7 +37,7 @@ + (void)setInitialTimezoneData { - CLTimezoneData *newData = [[self alloc] init]; + CLTimezoneData *newData = [self new]; newData.timezoneID = [[NSTimeZone systemTimeZone] name]; newData.formattedAddress = newData.timezoneID; @@ -78,7 +80,9 @@ - (instancetype)initWithCoder:(NSCoder *)coder { - if (self == [super init]) + self = [super init]; + + if (self) { self.place_id = [coder decodeObjectForKey:@"place_id"]; self.formattedAddress = [coder decodeObjectForKey:@"formattedAddress"]; @@ -179,7 +183,7 @@ value:futureSliderValue toDate:[NSDate date] options:kNilOptions]; - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + NSDateFormatter *dateFormatter = [NSDateFormatter new]; dateFormatter.dateStyle = kCFDateFormatterNoStyle; NSNumber *is24HourFormatSelected = [[NSUserDefaults standardUserDefaults] objectForKey:CL24hourFormatSelectedKey]; @@ -194,7 +198,7 @@ - (NSString *)getLocalCurrentDate { - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + NSDateFormatter *dateFormatter = [NSDateFormatter new]; dateFormatter.dateStyle = kCFDateFormatterShortStyle; dateFormatter.timeStyle = kCFDateFormatterNoStyle; dateFormatter.timeZone = [NSTimeZone systemTimeZone]; @@ -207,7 +211,7 @@ - (NSString *)compareSystemDate:(NSString *)systemDate toTimezoneDate:(NSString *)date { - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; + NSDateFormatter *formatter = [NSDateFormatter new]; formatter.dateFormat = [NSDateFormatter dateFormatFromTemplate:@"MM/dd/yyyy" options:0 locale:[NSLocale currentLocale]]; @@ -231,7 +235,7 @@ comps.day = comps.day + 1; NSDate *tomorrowMidnight = [[NSCalendar currentCalendar] dateFromComponents:comps]; - CLTimezoneData *newDataObject = [[CLTimezoneData alloc] init]; + CLTimezoneData *newDataObject = [CLTimezoneData new]; newDataObject.timezoneID = self.timezoneID; newDataObject.formattedAddress = self.formattedAddress; newDataObject.latitude = self.latitude; @@ -241,15 +245,14 @@ newDataObject.nextUpdate = tomorrowMidnight; newDataObject.isFavourite = [NSNumber numberWithInt:NSOffState]; - PanelController *panelController; + __block PanelController *panelController; - for (NSWindow *window in [[NSApplication sharedApplication] windows]) - { + [[NSApplication sharedApplication].windows enumerateObjectsUsingBlock:^(NSWindow * _Nonnull window, NSUInteger idx, BOOL * _Nonnull stop) { if ([window.windowController isMemberOfClass:[PanelController class]]) { panelController = window.windowController; } - } + }]; [panelController.defaultPreferences replaceObjectAtIndex:[panelController.defaultPreferences indexOfObject:self] withObject:newDataObject]; [[NSUserDefaults standardUserDefaults] setObject:panelController.defaultPreferences forKey:CLDefaultPreferenceKey]; @@ -281,7 +284,7 @@ value:futureSliderValue toDate:[NSDate date] options:kNilOptions]; - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + NSDateFormatter *dateFormatter = [NSDateFormatter new]; dateFormatter.dateStyle = kCFDateFormatterShortStyle; dateFormatter.timeStyle = kCFDateFormatterNoStyle; @@ -294,7 +297,7 @@ } else { - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; + NSDateFormatter *formatter = [NSDateFormatter new]; formatter.dateFormat = [NSDateFormatter dateFormatFromTemplate:@"MM/dd/yyyy" options:0 locale:[NSLocale currentLocale]]; NSDate *convertedDate = [formatter dateFromString:[dateFormatter stringFromDate:newDate]]; @@ -350,7 +353,7 @@ { NSMutableString *menuTitle = [NSMutableString new]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; - NSNumber *shouldCityBeShown = [userDefaults objectForKey:CLShowCityInMenu]; + NSNumber *shouldCityBeShown = [userDefaults objectForKey:CLShowPlaceInMenu]; NSNumber *shouldDayBeShown = [userDefaults objectForKey:CLShowDayInMenu]; NSNumber *shouldDateBeShown = [userDefaults objectForKey:CLShowDateInMenu]; diff --git a/Clocker/Onboarding/CLOnboardingWindow.xib b/Clocker/Onboarding/CLOnboardingWindow.xib index d9f5664..025fe91 100644 --- a/Clocker/Onboarding/CLOnboardingWindow.xib +++ b/Clocker/Onboarding/CLOnboardingWindow.xib @@ -6,6 +6,7 @@ + diff --git a/Clocker/Onboarding/CLOnboardingWindowController.h b/Clocker/Onboarding/CLOnboardingWindowController.h index c20b237..a6f42c0 100644 --- a/Clocker/Onboarding/CLOnboardingWindowController.h +++ b/Clocker/Onboarding/CLOnboardingWindowController.h @@ -8,10 +8,9 @@ #import #import "CLIntroViewController.h" +#import "CLMainWindowController.h" -@interface CLOnboardingWindowController : NSWindowController - -@property (strong, nonatomic) CLIntroViewController *introViewController; +@interface CLOnboardingWindowController : CLMainWindowController + (instancetype)sharedWindow; diff --git a/Clocker/Onboarding/CLOnboardingWindowController.m b/Clocker/Onboarding/CLOnboardingWindowController.m index 2118e7e..8e90263 100644 --- a/Clocker/Onboarding/CLOnboardingWindowController.m +++ b/Clocker/Onboarding/CLOnboardingWindowController.m @@ -11,6 +11,8 @@ @interface CLOnboardingWindowController () +@property (strong, nonatomic) CLIntroViewController *introViewController; + @end static CLOnboardingWindowController *sharedOnboardingWindow; @@ -19,12 +21,7 @@ static CLOnboardingWindowController *sharedOnboardingWindow; - (void)windowDidLoad { [super windowDidLoad]; - - CALayer *viewLayer = [CALayer layer]; - [viewLayer setBackgroundColor:CGColorCreateGenericRGB(255.0, 255.0, 255.0, 0.8)]; //RGB plus Alpha Channel - [self.window.contentView setWantsLayer:YES]; // view's backing store is using a Core Animation Layer - [self.window.contentView setLayer:viewLayer]; - self.window.titlebarAppearsTransparent = YES; + self.window.backgroundColor = [NSColor whiteColor]; diff --git a/Clocker/Panel.xib b/Clocker/Panel.xib index 4bd5385..c3829d6 100755 --- a/Clocker/Panel.xib +++ b/Clocker/Panel.xib @@ -1,7 +1,6 @@ - diff --git a/Clocker/PanelController.m b/Clocker/PanelController.m index 80a6406..46c778e 100755 --- a/Clocker/PanelController.m +++ b/Clocker/PanelController.m @@ -82,7 +82,7 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell"; if (!self.dateFormatter) { - self.dateFormatter = [[NSDateFormatter alloc] init]; + self.dateFormatter = [NSDateFormatter new]; } if ([[[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey] isEqualToString:@"Black"]) { @@ -400,12 +400,14 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell"; [[NSUserDefaults standardUserDefaults] setObject:self.defaultPreferences forKey:CLDefaultPreferenceKey]; - for (NSWindow *window in [NSApplication sharedApplication].windows) { + + [[NSApplication sharedApplication].windows enumerateObjectsUsingBlock:^(NSWindow * _Nonnull window, NSUInteger idx, BOOL * _Nonnull stop) { if ([window.windowController isMemberOfClass:[CLOneWindowController class]]) { CLOneWindowController *ref = (CLOneWindowController *) window.windowController; [ref.preferencesView refereshTimezoneTableView]; } - } + + }]; [self.mainTableview reloadData]; diff --git a/Clocker/Preferences/CLPreferencesViewController.h b/Clocker/Preferences/CLPreferencesViewController.h index b08a902..773e2ca 100644 --- a/Clocker/Preferences/CLPreferencesViewController.h +++ b/Clocker/Preferences/CLPreferencesViewController.h @@ -15,15 +15,7 @@ typedef enum : NSUInteger { @interface CLPreferencesViewController : NSViewController -@property (strong, nonatomic) NSMutableArray *selectedTimeZones; -@property (strong, nonatomic) NSMutableArray *filteredArray; -@property (atomic, assign) BOOL launchOnLogin; -@property (nonatomic, strong) NSMutableArray *timeZoneArray; -@property (nonatomic, strong) NSMutableArray *timeZoneFilteredArray; -@property (nonatomic, strong) NSString *columnName; -@property (atomic, strong) NSArray *themes; -@property (nonatomic, strong) NSURLSessionDataTask *dataTask; - (void)refereshTimezoneTableView; diff --git a/Clocker/Preferences/CLPreferencesViewController.m b/Clocker/Preferences/CLPreferencesViewController.m index cecb963..77cdfa0 100644 --- a/Clocker/Preferences/CLPreferencesViewController.m +++ b/Clocker/Preferences/CLPreferencesViewController.m @@ -38,6 +38,14 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; @interface CLPreferencesViewController () @property (weak) IBOutlet NSTextField *placeholderLabel; @property (assign) BOOL activityInProgress; +@property (strong, nonatomic) NSMutableArray *selectedTimeZones; +@property (strong, nonatomic) NSMutableArray *filteredArray; +@property (atomic, assign) BOOL launchOnLogin; +@property (nonatomic, strong) NSMutableArray *timeZoneArray; +@property (nonatomic, strong) NSMutableArray *timeZoneFilteredArray; +@property (nonatomic, copy) NSString *columnName; +@property (atomic, copy) NSArray *themes; +@property (nonatomic, strong) NSURLSessionDataTask *dataTask; @property (weak) IBOutlet NSTableView *timezoneTableView; @property (strong) IBOutlet Panel *timezonePanel; @@ -220,13 +228,14 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; { NSMutableArray *newArray = [NSMutableArray new]; - for (NSData *object in self.selectedTimeZones) + [self.selectedTimeZones enumerateObjectsUsingBlock:^(NSData * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { CLTimezoneData *timezone = [CLTimezoneData getCustomObject:object]; timezone.isFavourite = [NSNumber numberWithInt:0]; - NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:timezone]; + NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:timezone]; [newArray addObject:encodedObject]; - } + + }]; CLTimezoneData *dataObject = [CLTimezoneData getCustomObject:newArray[row]]; dataObject.isFavourite = object; @@ -290,8 +299,8 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; { CLTimezoneData *dataObject = self.filteredArray[self.availableTimezoneTableView.selectedRow]; - for (NSData *encodedData in self.selectedTimeZones) - { + + [self.selectedTimeZones enumerateObjectsUsingBlock:^(NSData * _Nonnull encodedData, NSUInteger idx, BOOL * _Nonnull stop) { CLTimezoneData *timezoneObject = [CLTimezoneData getCustomObject:encodedData]; NSString *name = timezoneObject.place_id; @@ -310,7 +319,9 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; return; } } - } + + + }]; self.searchField.stringValue = CLEmptyString; @@ -338,7 +349,7 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; if (defaultPreference == nil) { - defaultPreference = [[NSMutableArray alloc] init]; + defaultPreference = [NSMutableArray new]; } NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:data]; @@ -559,6 +570,10 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; [self.dataTask cancel]; } + NSString *preferredLanguage = [[[NSBundle mainBundle]preferredLocalizations][0] substringToIndex:2]; + + NSLog(@"Preferred Language:%@", preferredLanguage); + dispatch_async(dispatch_get_main_queue(), ^{ if (self.availableTimezoneTableView.isHidden) @@ -609,8 +624,8 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; return; } - for (NSDictionary *dictionary in json[@"results"]) - { + + [json[@"results"] enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull dictionary, NSUInteger idx, BOOL * _Nonnull stop) { NSDictionary *latLang = [[dictionary objectForKey:@"geometry"] objectForKey:@"location"]; NSString *latitude = latLang[@"lat"]; NSString *longitude = latLang[@"lng"]; @@ -626,8 +641,8 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; CLTimezoneData *newObject = [[CLTimezoneData alloc] initWithDictionary:totalPackage]; [self.filteredArray addObject:newObject]; - - } + }]; + self.activityInProgress = NO; [self.availableTimezoneTableView reloadData]; @@ -655,7 +670,6 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; return; } - self.searchField.placeholderString = @"Fetching data might take some time!"; self.placeholderLabel.placeholderString = @"Retrieving timezone data"; @@ -718,17 +732,13 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?"; [newTimezone setObject:CLEmptyString forKey:@"nextUpdate"]; [newTimezone setObject:CLEmptyString forKey:CLCustomLabel]; - - CLTimezoneData *timezoneObject = [[CLTimezoneData alloc] initWithDictionary:newTimezone]; - - NSArray *defaultPreference = [[NSUserDefaults standardUserDefaults] objectForKey:CLDefaultPreferenceKey]; if (defaultPreference == nil) { - defaultPreference = [[NSMutableArray alloc] init]; + defaultPreference = [NSMutableArray new]; } NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:timezoneObject]; diff --git a/Clocker/Rate App/iRate.m b/Clocker/Rate App/iRate.m index 72db625..e95834c 100755 --- a/Clocker/Rate App/iRate.m +++ b/Clocker/Rate App/iRate.m @@ -937,10 +937,20 @@ static NSString *const iRateMacAppStoreURLFormat = @"macappstore://itunes.apple. #endif { - PanelController *panelRef = (PanelController *)[[[NSApplication sharedApplication] - mainWindow] windowController]; - panelRef.showReviewCell = YES; - [panelRef updateDefaultPreferences]; + NSArray *currentWindows = [NSApplication sharedApplication].windows; + + for (NSWindow *window in currentWindows) + { + if ([window.windowController isKindOfClass:[PanelController class]]) + { + PanelController *panelRef = (PanelController *)[[[NSApplication sharedApplication] + mainWindow] windowController]; + panelRef.showReviewCell = YES; + [panelRef updateDefaultPreferences]; + } + } + + } #endif diff --git a/Clocker/StatusItemView.m b/Clocker/StatusItemView.m index a64c201..13b5955 100755 --- a/Clocker/StatusItemView.m +++ b/Clocker/StatusItemView.m @@ -65,9 +65,7 @@ [super drawRect:dirtyRect]; NSTextField *textField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, self.frame.size.width, 18)]; - textField.bordered = NO; - textField.alignment = NSTextAlignmentCenter; NSData *dataObject = [[NSUserDefaults standardUserDefaults] objectForKey:@"favouriteTimezone"]; diff --git a/Clocker/Utilities/CommonStrings.h b/Clocker/Utilities/CommonStrings.h index 90a407e..fa04bf9 100644 --- a/Clocker/Utilities/CommonStrings.h +++ b/Clocker/Utilities/CommonStrings.h @@ -23,7 +23,8 @@ extern NSString *const CLRelativeDateKey; extern NSString *const CLThemeKey; extern NSString *const CLShowDayInMenu; extern NSString *const CLShowDateInMenu; -extern NSString *const CLShowCityInMenu; +extern NSString *const CLShowPlaceInMenu; extern NSString *const CLDisplayFutureSliderKey; +extern NSString *const CLStartAtLogin; @end diff --git a/Clocker/Utilities/CommonStrings.m b/Clocker/Utilities/CommonStrings.m index fc16083..9ec57b7 100644 --- a/Clocker/Utilities/CommonStrings.m +++ b/Clocker/Utilities/CommonStrings.m @@ -24,6 +24,8 @@ NSString *const CLThemeKey = @"defaultTheme"; NSString *const CLDisplayFutureSliderKey = @"displayFutureSlider"; NSString *const CLShowDayInMenu = @"showDay"; NSString *const CLShowDateInMenu = @"showDate"; -NSString *const CLShowCityInMenu = @"showCityName"; +NSString *const CLShowPlaceInMenu = @"showPlaceName"; +NSString *const CLStartAtLogin = @"startAtLogin"; + @end