diff --git a/Clocker/AboutUsWindow/CLAboutUsViewController.m b/Clocker/AboutUsWindow/CLAboutUsViewController.m index 5c0f76a..4d7337c 100644 --- a/Clocker/AboutUsWindow/CLAboutUsViewController.m +++ b/Clocker/AboutUsWindow/CLAboutUsViewController.m @@ -10,6 +10,7 @@ #import "CommonStrings.h" #import "CLAppFeedbackWindowController.h" #import "CLUnderlinedButton.h" +#import @interface CLAboutUsViewController () @@ -80,11 +81,13 @@ NSString *const CLPersonalWebsite = @"http://abhishekbanthia.com"; - (IBAction)openMyTwitter:(id)sender { [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:CLTwitterLink]]; + [Answers logCustomEventWithName:@"openedTwitterProfile" customAttributes:@{}]; } - (IBAction)viewSource:(id)sender { [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:CLGitHubURL]]; + [Answers logCustomEventWithName:@"openedGitHub" customAttributes:@{}]; } - (IBAction)reportIssue:(id)sender { @@ -92,15 +95,18 @@ NSString *const CLPersonalWebsite = @"http://abhishekbanthia.com"; [self.feedbackWindow showWindow:nil]; [NSApp activateIgnoringOtherApps:YES]; [self.view.window orderOut:self]; + [Answers logCustomEventWithName:@"reportIssueOpened" customAttributes:@{}]; } - (IBAction)openFacebookPage:(id)sender { [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:CLFacebookPageURL]]; + [Answers logCustomEventWithName:@"openedFacebookPage" customAttributes:@{}]; } - (IBAction)openWebsite:(id)sender { [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:CLPersonalWebsite]]; + [Answers logCustomEventWithName:@"openedPersonalWebsite" customAttributes:@{}]; } @end diff --git a/Clocker/Appearance Tab/CLAppearanceViewController.m b/Clocker/Appearance Tab/CLAppearanceViewController.m index ff66edc..e21f888 100644 --- a/Clocker/Appearance Tab/CLAppearanceViewController.m +++ b/Clocker/Appearance Tab/CLAppearanceViewController.m @@ -12,6 +12,7 @@ #import "CommonStrings.h" #import "CLTimezoneData.h" #import "CLFloatingWindowController.h" +#import typedef NS_ENUM(NSUInteger, CLClockerMode) { CLMenubarMode = 0, @@ -44,6 +45,8 @@ typedef NS_ENUM(NSUInteger, CLClockerMode) { [[NSUserDefaults standardUserDefaults] setObject:@(timeFormat.selectedSegment) forKey:CL24hourFormatSelectedKey]; + [Answers logCustomEventWithName:@"Time Format Selected" customAttributes:@{@"Time Format" : timeFormat.selectedSegment == 0 ? @"12 Hour Format" : @"24 Hour Format"}]; + [self refreshMainTableview:YES andUpdateFloatingWindow:YES]; } @@ -74,6 +77,8 @@ typedef NS_ENUM(NSUInteger, CLClockerMode) { } [panelController updateTableContent]; + + [Answers logCustomEventWithName:@"Theme" customAttributes:@{@"themeSelected" : themeSegment.selectedSegment == CLBlackTheme ? @"Black" : @"White"}]; } @@ -95,13 +100,18 @@ typedef NS_ENUM(NSUInteger, CLClockerMode) { [sharedDelegate.floatingWindow.window close]; [sharedDelegate.panelController updateDefaultPreferences]; } + + [Answers logCustomEventWithName:@"RelativeDate" customAttributes:@{@"displayMode" : modeSegment.selectedSegment == CLFloatingMode ? @"Floating Mode" : @"Menubar Mode"}]; } - (IBAction)changeRelativeDayDisplay:(NSSegmentedControl *)relativeDayControl { + NSNumber *selectedIndex = @(relativeDayControl.selectedSegment); + [Answers logCustomEventWithName:@"RelativeDate" customAttributes:@{@"dayPreference" : selectedIndex.integerValue == 0 ? @"Relative Day" : @"Actual Day"}]; + [[NSUserDefaults standardUserDefaults] setObject:selectedIndex forKey:CLRelativeDateKey]; [self refreshMainTableview:YES andUpdateFloatingWindow:YES]; @@ -157,4 +167,14 @@ typedef NS_ENUM(NSUInteger, CLClockerMode) { [self refreshMainTableview:NO andUpdateFloatingWindow:YES]; } +- (IBAction)showSunriseSunset:(NSSegmentedControl *)sender { + + [Answers logCustomEventWithName:@"Sunrise Sunset" customAttributes:@{@"Is It Displayed" : sender.selectedSegment == 0 ? @"YES" : @"NO"}]; + +} +- (IBAction)displayTimeWithSeconds:(NSSegmentedControl *)sender { + + [Answers logCustomEventWithName:@"Display Time With Seconds" customAttributes:@{@"Displayed" : sender.selectedSegment == 0 ? @"YES" : @"NO"}]; +} + @end diff --git a/Clocker/Appearance Tab/en.lproj/CLAppearanceView.xib b/Clocker/Appearance Tab/en.lproj/CLAppearanceView.xib index ce219b7..0640e90 100644 --- a/Clocker/Appearance Tab/en.lproj/CLAppearanceView.xib +++ b/Clocker/Appearance Tab/en.lproj/CLAppearanceView.xib @@ -168,6 +168,7 @@ + @@ -281,6 +282,7 @@ + diff --git a/Clocker/ApplicationDelegate.m b/Clocker/ApplicationDelegate.m index c84ea63..cff85d5 100755 --- a/Clocker/ApplicationDelegate.m +++ b/Clocker/ApplicationDelegate.m @@ -103,8 +103,8 @@ void *kContextActivePanel = &kContextActivePanel; [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions": @YES }]; -// [[Crashlytics sharedInstance] setDebugMode:NO]; -// [Fabric with:@[[Crashlytics class]]]; + [[Crashlytics sharedInstance] setDebugMode:NO]; + [Fabric with:@[[Crashlytics class]]]; } diff --git a/Clocker/CLParentPanelController.m b/Clocker/CLParentPanelController.m index 2c27c87..c4f1b2d 100644 --- a/Clocker/CLParentPanelController.m +++ b/Clocker/CLParentPanelController.m @@ -13,6 +13,7 @@ #import #import "iRate.h" #import "CLTableViewDataSource.h" +#import NSString *const CLNotReallyButtonTitle = @"Not Really"; NSString *const CLFeedbackString = @"Mind giving feedback?"; @@ -66,10 +67,12 @@ NSString *const CLYesWithExclamation = @"Yes!"; { if ([keyPath isEqualToString:CLDisplayFutureSliderKey]) { self.futureSlider.hidden = [change[@"new"] isEqualToNumber:@(1)] ? YES : NO; + [Answers logCustomEventWithName:@"Is Future Slider Displayed" customAttributes:@{@"Display Value" : self.futureSlider.isHidden ? @"NO" : @"YES"}]; } else if([keyPath isEqualToString:CLUserFontSizePreference]) { NSNumber *userFontSize = [[NSUserDefaults standardUserDefaults] objectForKey:CLUserFontSizePreference]; + [Answers logCustomEventWithName:@"User Font Size Preference" customAttributes:@{@"Font Size" : userFontSize}]; self.scrollViewHeight.constant = self.defaultPreferences.count * (self.mainTableview.rowHeight + userFontSize.integerValue*1.5); [self.mainTableview reloadData]; @@ -112,10 +115,12 @@ NSString *const CLYesWithExclamation = @"Yes!"; if (!self.timezoneDataSource) { self.timezoneDataSource = [[CLTableViewDataSource alloc] initWithItems:self.defaultPreferences]; - self.timezoneDataSource.futureSliderValue = self.futureSliderValue; self.mainTableview.dataSource = self.timezoneDataSource; self.mainTableview.delegate = self.timezoneDataSource; } + + self.timezoneDataSource.timezoneObjects = self.defaultPreferences; + self.timezoneDataSource.futureSliderValue = self.futureSliderValue; } - (void)dealloc