diff --git a/Clocker-Preview.gif b/Clocker-Preview.gif deleted file mode 100644 index 51cbee8..0000000 Binary files a/Clocker-Preview.gif and /dev/null differ diff --git a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate index 998e7b1..a99a7aa 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/AboutUsWindow/CLAboutUsView.xib b/Clocker/AboutUsWindow/CLAboutUsView.xib index afde7bd..3709d46 100644 --- a/Clocker/AboutUsWindow/CLAboutUsView.xib +++ b/Clocker/AboutUsWindow/CLAboutUsView.xib @@ -13,11 +13,11 @@ - + - + @@ -25,7 +25,7 @@ - + @@ -37,7 +37,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -72,12 +72,12 @@ - + @@ -126,7 +126,7 @@ - + @@ -155,13 +155,13 @@ - - + + - + diff --git a/Clocker/Appearance Tab/CLAppearanceView.xib b/Clocker/Appearance Tab/CLAppearanceView.xib index 1d2bbaa..4770256 100644 --- a/Clocker/Appearance Tab/CLAppearanceView.xib +++ b/Clocker/Appearance Tab/CLAppearanceView.xib @@ -93,8 +93,8 @@ - - + + @@ -148,8 +148,8 @@ + - diff --git a/Clocker/ApplicationDelegate.m b/Clocker/ApplicationDelegate.m index 8e0c32e..5195093 100755 --- a/Clocker/ApplicationDelegate.m +++ b/Clocker/ApplicationDelegate.m @@ -76,22 +76,16 @@ void *kContextActivePanel = &kContextActivePanel; #pragma mark - NSApplicationDelegate - (void)applicationDidFinishLaunching:(NSNotification *)notification -{ - NSArray *defaultPreference = [[NSUserDefaults standardUserDefaults] objectForKey:CLDefaultPreferenceKey]; - - NSMutableArray *newDefaults = [[NSMutableArray alloc] init]; - - [defaultPreference enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { - - if ([obj isKindOfClass:[NSString class]]) { - NSDictionary *defaultDictionary = @{CLTimezoneName : obj, CLCustomLabel : CLEmptyString}; - [newDefaults addObject:defaultDictionary]; - } - }]; - - if (newDefaults.count > 0) +{ + NSNumber *opened = [[NSUserDefaults standardUserDefaults] objectForKey:@"noOfTimes"]; + if (opened == nil) { - [[NSUserDefaults standardUserDefaults] setObject:newDefaults forKey:CLDefaultPreferenceKey]; + [[NSUserDefaults standardUserDefaults] setObject:[NSMutableArray array] + forKey:CLDefaultPreferenceKey]; + NSInteger noOfTimes = opened.integerValue + 1; + NSNumber *noOfTime = [NSNumber numberWithInteger:noOfTimes]; + [[NSUserDefaults standardUserDefaults] setObject:noOfTime forKey:@"noOfTimes"];; + } NSString *defaultTheme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; @@ -101,7 +95,7 @@ void *kContextActivePanel = &kContextActivePanel; NSNumber *displaySuntimings = [[NSUserDefaults standardUserDefaults] objectForKey:CLDisplaySunTimingKey]; if (displaySuntimings == nil) { - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:0] forKey:CLDisplaySunTimingKey]; + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:1] forKey:CLDisplaySunTimingKey]; } NSNumber *displayFutureSlider = [[NSUserDefaults standardUserDefaults] objectForKey:CLDisplayFutureSliderKey]; diff --git a/Clocker/PanelController.m b/Clocker/PanelController.m index 0f6e41c..51da80b 100755 --- a/Clocker/PanelController.m +++ b/Clocker/PanelController.m @@ -302,6 +302,9 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell"; CLTimezoneCellView *cell = [tableView makeViewWithIdentifier:CLTimezoneCellViewIdentifier owner:self]; + NSTextView *customLabel = (NSTextView*)[cell.relativeDate.window fieldEditor:YES + forObject:cell.relativeDate]; + NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey]; if (theme.length > 0 && ![theme isEqualToString:@"Default"]) { @@ -310,13 +313,16 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell"; self.window.alphaValue = 0.90; [cell.customName setDrawsBackground:YES]; [cell.customName setBackgroundColor:[NSColor blackColor]]; + customLabel.insertionPointColor = [NSColor whiteColor]; } else { + [cell updateTextColorWithColor:[NSColor blackColor] andCell:cell]; [cell.customName setDrawsBackground:NO]; [self.mainTableview setBackgroundColor:[NSColor whiteColor]]; self.window.alphaValue = 1; + customLabel.insertionPointColor = [NSColor blackColor]; } cell.relativeDate.stringValue = [self getDateForTimeZone:self.defaultPreferences[row]]; @@ -574,6 +580,12 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell"; if ([object isKindOfClass:[NSString class]]) { NSMutableDictionary *timezoneDictionary = self.defaultPreferences[row]; + + if ([self.defaultPreferences[row][CLTimezoneName] isEqualToString:object]) + { + return; + } + NSMutableDictionary *mutableTimeZoneDict = [timezoneDictionary mutableCopy]; [mutableTimeZoneDict setValue:object forKey:CLCustomLabel]; [self.defaultPreferences replaceObjectAtIndex:row withObject:mutableTimeZoneDict]; @@ -591,12 +603,21 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell"; NSIndexSet *rowIndexes = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - [self.defaultPreferences exchangeObjectAtIndex:rowIndexes.firstIndex withObjectAtIndex:row]; + [self.defaultPreferences exchangeObjectAtIndex:rowIndexes.firstIndex + withObjectAtIndex:row]; - [[NSUserDefaults standardUserDefaults] setObject:self.defaultPreferences forKey:CLDefaultPreferenceKey]; + [[NSUserDefaults standardUserDefaults] setObject:self.defaultPreferences + forKey:CLDefaultPreferenceKey]; [self.mainTableview reloadData]; + for (NSWindow *window in [NSApplication sharedApplication].windows) { + if ([window.windowController isMemberOfClass:[CLPreferencesViewController class]]) { + CLPreferencesViewController *ref = (CLPreferencesViewController *) window.windowController; + [ref refereshTimezoneTableView]; + } + } + return YES; } diff --git a/Clocker/Preferences/CLPreferencesViewController.h b/Clocker/Preferences/CLPreferencesViewController.h index f0ba5f1..36b6264 100644 --- a/Clocker/Preferences/CLPreferencesViewController.h +++ b/Clocker/Preferences/CLPreferencesViewController.h @@ -22,4 +22,6 @@ typedef enum : NSUInteger { @property (atomic, strong) NSArray *themes; @property (nonatomic, strong) NSURLSessionDataTask *dataTask; +- (void)refereshTimezoneTableView; + @end diff --git a/Icons/NewIcon-1024.png b/Icons/NewIcon-1024.png new file mode 100644 index 0000000..406e39d Binary files /dev/null and b/Icons/NewIcon-1024.png differ diff --git a/Icons/NewIcon-128.png b/Icons/NewIcon-128.png new file mode 100644 index 0000000..debdf01 Binary files /dev/null and b/Icons/NewIcon-128.png differ diff --git a/Icons/NewIcon-16.png b/Icons/NewIcon-16.png new file mode 100644 index 0000000..7f8bef6 Binary files /dev/null and b/Icons/NewIcon-16.png differ diff --git a/Icons/NewIcon-256.png b/Icons/NewIcon-256.png new file mode 100644 index 0000000..5e10b7b Binary files /dev/null and b/Icons/NewIcon-256.png differ diff --git a/Icons/NewIcon-32.png b/Icons/NewIcon-32.png new file mode 100644 index 0000000..e72f78f Binary files /dev/null and b/Icons/NewIcon-32.png differ diff --git a/Icons/NewIcon-512.png b/Icons/NewIcon-512.png new file mode 100644 index 0000000..28ababb Binary files /dev/null and b/Icons/NewIcon-512.png differ diff --git a/Icons/NewIcon-64.png b/Icons/NewIcon-64.png new file mode 100644 index 0000000..ce8368c Binary files /dev/null and b/Icons/NewIcon-64.png differ diff --git a/Icons/NewIcon.png b/Icons/NewIcon.png new file mode 100644 index 0000000..7208d44 Binary files /dev/null and b/Icons/NewIcon.png differ diff --git a/Icons/NewIcon.xcf b/Icons/NewIcon.xcf new file mode 100644 index 0000000..732c800 Binary files /dev/null and b/Icons/NewIcon.xcf differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon-1024.png b/Media.xcassets/AppIcon.appiconset/ClockerIcon-1024.png deleted file mode 100644 index 00ae7bd..0000000 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon-1024.png and /dev/null differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon-256.png b/Media.xcassets/AppIcon.appiconset/ClockerIcon-256.png deleted file mode 100644 index 348233a..0000000 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon-256.png and /dev/null differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon-258.png b/Media.xcassets/AppIcon.appiconset/ClockerIcon-258.png deleted file mode 100644 index 348233a..0000000 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon-258.png and /dev/null differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon-32.png b/Media.xcassets/AppIcon.appiconset/ClockerIcon-32.png deleted file mode 100644 index 1dcdcbd..0000000 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon-32.png and /dev/null differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon-33.png b/Media.xcassets/AppIcon.appiconset/ClockerIcon-33.png deleted file mode 100644 index 1dcdcbd..0000000 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon-33.png and /dev/null differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon-512.png b/Media.xcassets/AppIcon.appiconset/ClockerIcon-512.png deleted file mode 100644 index b5b9f07..0000000 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon-512.png and /dev/null differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon-514.png b/Media.xcassets/AppIcon.appiconset/ClockerIcon-514.png deleted file mode 100644 index b5b9f07..0000000 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon-514.png and /dev/null differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon-64.png b/Media.xcassets/AppIcon.appiconset/ClockerIcon-64.png deleted file mode 100644 index 5089b1a..0000000 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon-64.png and /dev/null differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon.png b/Media.xcassets/AppIcon.appiconset/ClockerIcon.png deleted file mode 100644 index 376e349..0000000 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon.png and /dev/null differ diff --git a/Media.xcassets/AppIcon.appiconset/Contents.json b/Media.xcassets/AppIcon.appiconset/Contents.json index dc0ad85..95bebce 100644 --- a/Media.xcassets/AppIcon.appiconset/Contents.json +++ b/Media.xcassets/AppIcon.appiconset/Contents.json @@ -3,61 +3,61 @@ { "size" : "16x16", "idiom" : "mac", - "filename" : "ClockerIcon-16.png", + "filename" : "NewIcon-16.png", "scale" : "1x" }, { "size" : "16x16", "idiom" : "mac", - "filename" : "ClockerIcon-33.png", + "filename" : "NewIcon-32.png", "scale" : "2x" }, { "size" : "32x32", "idiom" : "mac", - "filename" : "ClockerIcon-32.png", + "filename" : "NewIcon-33.png", "scale" : "1x" }, { "size" : "32x32", "idiom" : "mac", - "filename" : "ClockerIcon-64.png", + "filename" : "NewIcon-64.png", "scale" : "2x" }, { "size" : "128x128", "idiom" : "mac", - "filename" : "ClockerIcon.png", + "filename" : "NewIcon-128.png", "scale" : "1x" }, { "size" : "128x128", "idiom" : "mac", - "filename" : "ClockerIcon-258.png", + "filename" : "NewIcon-256.png", "scale" : "2x" }, { "size" : "256x256", "idiom" : "mac", - "filename" : "ClockerIcon-256.png", + "filename" : "NewIcon-257.png", "scale" : "1x" }, { "size" : "256x256", "idiom" : "mac", - "filename" : "ClockerIcon-514.png", + "filename" : "NewIcon-512.png", "scale" : "2x" }, { "size" : "512x512", "idiom" : "mac", - "filename" : "ClockerIcon-512.png", + "filename" : "NewIcon-513.png", "scale" : "1x" }, { "size" : "512x512", "idiom" : "mac", - "filename" : "ClockerIcon-1024.png", + "filename" : "NewIcon-1024.png", "scale" : "2x" } ], diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-1024.png b/Media.xcassets/AppIcon.appiconset/NewIcon-1024.png new file mode 100644 index 0000000..406e39d Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-1024.png differ diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-128.png b/Media.xcassets/AppIcon.appiconset/NewIcon-128.png new file mode 100644 index 0000000..debdf01 Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-128.png differ diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-16.png b/Media.xcassets/AppIcon.appiconset/NewIcon-16.png new file mode 100644 index 0000000..7f8bef6 Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-16.png differ diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-256.png b/Media.xcassets/AppIcon.appiconset/NewIcon-256.png new file mode 100644 index 0000000..5e10b7b Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-256.png differ diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-257.png b/Media.xcassets/AppIcon.appiconset/NewIcon-257.png new file mode 100644 index 0000000..5e10b7b Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-257.png differ diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-32.png b/Media.xcassets/AppIcon.appiconset/NewIcon-32.png new file mode 100644 index 0000000..e72f78f Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-32.png differ diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-33.png b/Media.xcassets/AppIcon.appiconset/NewIcon-33.png new file mode 100644 index 0000000..e72f78f Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-33.png differ diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-512.png b/Media.xcassets/AppIcon.appiconset/NewIcon-512.png new file mode 100644 index 0000000..28ababb Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-512.png differ diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-513.png b/Media.xcassets/AppIcon.appiconset/NewIcon-513.png new file mode 100644 index 0000000..28ababb Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-513.png differ diff --git a/Media.xcassets/AppIcon.appiconset/NewIcon-64.png b/Media.xcassets/AppIcon.appiconset/NewIcon-64.png new file mode 100644 index 0000000..ce8368c Binary files /dev/null and b/Media.xcassets/AppIcon.appiconset/NewIcon-64.png differ diff --git a/Media.xcassets/ClockerIcon-16.imageset/ClockerIcon-16.png b/Media.xcassets/ClockerIcon-16.imageset/ClockerIcon-16.png deleted file mode 100644 index 5b3f2c7..0000000 Binary files a/Media.xcassets/ClockerIcon-16.imageset/ClockerIcon-16.png and /dev/null differ diff --git a/Media.xcassets/ClockerIcon-16.imageset/Contents.json b/Media.xcassets/ClockerIcon-16.imageset/Contents.json index df19541..af1c231 100644 --- a/Media.xcassets/ClockerIcon-16.imageset/Contents.json +++ b/Media.xcassets/ClockerIcon-16.imageset/Contents.json @@ -2,7 +2,7 @@ "images" : [ { "idiom" : "universal", - "filename" : "ClockerIcon-16.png", + "filename" : "NewIcon-16.png", "scale" : "1x" }, { diff --git a/Media.xcassets/ClockerIcon-16.imageset/NewIcon-16.png b/Media.xcassets/ClockerIcon-16.imageset/NewIcon-16.png new file mode 100644 index 0000000..7f8bef6 Binary files /dev/null and b/Media.xcassets/ClockerIcon-16.imageset/NewIcon-16.png differ diff --git a/Media.xcassets/ClockerIcon-256.imageset/ClockerIcon-256.png b/Media.xcassets/ClockerIcon-256.imageset/ClockerIcon-256.png deleted file mode 100644 index 348233a..0000000 Binary files a/Media.xcassets/ClockerIcon-256.imageset/ClockerIcon-256.png and /dev/null differ diff --git a/Media.xcassets/ClockerIcon-256.imageset/Contents.json b/Media.xcassets/ClockerIcon-256.imageset/Contents.json index be0c07c..338b8cb 100644 --- a/Media.xcassets/ClockerIcon-256.imageset/Contents.json +++ b/Media.xcassets/ClockerIcon-256.imageset/Contents.json @@ -2,7 +2,7 @@ "images" : [ { "idiom" : "universal", - "filename" : "ClockerIcon-256.png", + "filename" : "NewIcon-256.png", "scale" : "1x" }, { diff --git a/Media.xcassets/ClockerIcon-256.imageset/NewIcon-256.png b/Media.xcassets/ClockerIcon-256.imageset/NewIcon-256.png new file mode 100644 index 0000000..5e10b7b Binary files /dev/null and b/Media.xcassets/ClockerIcon-256.imageset/NewIcon-256.png differ diff --git a/Media.xcassets/AppIcon.appiconset/ClockerIcon-16.png b/Media.xcassets/Settings-Black.imageset/Settings-Black.png similarity index 77% rename from Media.xcassets/AppIcon.appiconset/ClockerIcon-16.png rename to Media.xcassets/Settings-Black.imageset/Settings-Black.png index 5b3f2c7..e33c5d2 100644 Binary files a/Media.xcassets/AppIcon.appiconset/ClockerIcon-16.png and b/Media.xcassets/Settings-Black.imageset/Settings-Black.png differ diff --git a/Media.xcassets/Settings-White.imageset/Settings-White.png b/Media.xcassets/Settings-White.imageset/Settings-White.png index ebc07b1..dfe55c0 100644 Binary files a/Media.xcassets/Settings-White.imageset/Settings-White.png and b/Media.xcassets/Settings-White.imageset/Settings-White.png differ diff --git a/Screenshots/Screenshot1.png b/Screenshots/Screenshot1.png index 34d031b..9fdb841 100644 Binary files a/Screenshots/Screenshot1.png and b/Screenshots/Screenshot1.png differ diff --git a/Screenshots/Screenshot2.png b/Screenshots/Screenshot2.png index ac433f1..0ed6f19 100644 Binary files a/Screenshots/Screenshot2.png and b/Screenshots/Screenshot2.png differ diff --git a/Screenshots/Screenshot3.png b/Screenshots/Screenshot3.png index 038a3d5..5fd2565 100644 Binary files a/Screenshots/Screenshot3.png and b/Screenshots/Screenshot3.png differ