Browse Source

Final tweaks.

v1.2.1
Abhishek Banthia 9 years ago
parent
commit
99fb71bc99
  1. 4
      Clocker.xcodeproj/project.pbxproj
  2. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  3. 3
      Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme
  4. 4
      Clocker/Appearance Tab/CLAppearanceView.xib
  5. 5
      Clocker/Appearance Tab/CLAppearanceViewController.m
  6. 5
      Clocker/ApplicationDelegate.m
  7. 2
      Clocker/CLOneWindow/CLOneWindow.xib
  8. 12
      Clocker/Clocker-Info.plist
  9. 5
      Clocker/Custom Table Cell Views/CLTimezoneCellView.m
  10. 4
      Clocker/Panel.xib
  11. 1
      Clocker/PanelController.h
  12. 37
      Clocker/PanelController.m
  13. 2
      Clocker/Preferences/CLPreferencesView.xib
  14. 21
      Media.xcassets/Black Theme.imageset/Contents.json
  15. BIN
      Media.xcassets/Black Theme.imageset/Screen Shot 2015-12-13 at 3.26.58 AM.png
  16. 21
      Media.xcassets/White Theme.imageset/Contents.json
  17. BIN
      Media.xcassets/White Theme.imageset/Screen Shot 2015-12-13 at 3.27.22 AM.png
  18. 21
      Media.xcassets/WhiteButton.imageset/Contents.json
  19. BIN
      Media.xcassets/WhiteButton.imageset/WhiteButton.png
  20. 21
      Media.xcassets/aboutTemplate.imageset/Contents.json
  21. BIN
      Media.xcassets/aboutTemplate.imageset/aboutTemplate.png

4
Clocker.xcodeproj/project.pbxproj

@ -249,8 +249,6 @@
9A392EE71C1CDD530072C10A /* CLAboutUsView.xib */,
9A392EEC1C1CE9950072C10A /* CLPreferencesView.xib */,
9A3247381C263F4F00CF6B6E /* CLAppearanceView.xib */,
9A9E63831C2C673E009A299B /* CLAppFeedbackWindowController.h */,
9A9E63841C2C673E009A299B /* CLAppFeedbackWindowController.m */,
9A9E63851C2C673E009A299B /* CLAppFeedbackWindow.xib */,
);
name = XIB;
@ -295,6 +293,8 @@
9A8605E51BEC165400A810A4 /* Controllers */ = {
isa = PBXGroup;
children = (
9A9E63831C2C673E009A299B /* CLAppFeedbackWindowController.h */,
9A9E63841C2C673E009A299B /* CLAppFeedbackWindowController.m */,
9A5951BE1C1D0AA0009C17AA /* CLOneWindowController.m */,
9A5951BF1C1D0AA0009C17AA /* CLOneWindowController.h */,
9A8605CA1BEC155B00A810A4 /* ApplicationDelegate.h */,

BIN
Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

3
Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme

@ -52,7 +52,8 @@
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
showNonLocalizedStrings = "YES"
language = "en">
language = "en"
region = "DE">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference

4
Clocker/Appearance Tab/CLAppearanceView.xib

@ -33,7 +33,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5tI-fU-0lZ">
<segmentedControl toolTip="Choose a theme for the main panel!" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5tI-fU-0lZ">
<rect key="frame" x="158" y="204" width="124" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="dW5-vG-EwD"/>
@ -75,7 +75,7 @@
<binding destination="WGI-5h-l6M" name="selectedIndex" keyPath="values.relativeDate" id="eKo-sG-1eE"/>
</connections>
</segmentedControl>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OrL-Ix-fmY">
<segmentedControl toolTip="Select a time-format!" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OrL-Ix-fmY">
<rect key="frame" x="102" y="266" width="236" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="232" id="uOJ-Mi-Fin"/>

5
Clocker/Appearance Tab/CLAppearanceViewController.m

@ -55,6 +55,11 @@
panelController.preferencesButton.image = [NSImage imageNamed:NSImageNameActionTemplate];
}
if (panelController.defaultPreferences.count == 0)
{
[panelController updatePanelColor];
}
[panelController.mainTableview reloadData];
}

5
Clocker/ApplicationDelegate.m

@ -108,6 +108,11 @@ void *kContextActivePanel = &kContextActivePanel;
[[NSUserDefaults standardUserDefaults] setObject:@1 forKey:CL24hourFormatSelectedKey];
}
NSNumber *relativeDate = [[NSUserDefaults standardUserDefaults] objectForKey:CLRelativeDateKey];
if (relativeDate == nil) {
[[NSUserDefaults standardUserDefaults] setObject:@0 forKey:CLRelativeDateKey];
}
// Install icon into the menu bar
self.menubarController = [[MenubarController alloc] init];

2
Clocker/CLOneWindow/CLOneWindow.xib

@ -31,7 +31,7 @@
<action selector="openAppearanceView:" target="-2" id="y38-Hb-icv"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="A66E9082-B4AF-4B6F-B2E8-CC3D70124C0B" label="Appearance" paletteLabel="About Us" tag="-1" image="NSInfo" autovalidates="NO" id="ti4-MJ-8Xu">
<toolbarItem implicitItemIdentifier="A66E9082-B4AF-4B6F-B2E8-CC3D70124C0B" label="About Clocker" paletteLabel="About Clocker" tag="-1" image="NSInfo" autovalidates="NO" id="ti4-MJ-8Xu">
<connections>
<action selector="openAboutUsView:" target="-2" id="Aec-lN-CqR"/>
</connections>

12
Clocker/Clocker-Info.plist

@ -17,7 +17,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>17</string>
<string>18</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
@ -38,6 +38,11 @@
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>LSUIElement</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015, Abhishek Banthia</string>
<key>NSMainNibFile</key>
@ -46,10 +51,5 @@
<string>NSApplication</string>
<key>RequestsOpenAccess</key>
<string>YES</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>

5
Clocker/Custom Table Cell Views/CLTimezoneCellView.m

@ -41,6 +41,11 @@
NSMutableDictionary *timezoneDictionary = panelController.defaultPreferences[cellView.rowNumber];
NSMutableDictionary *mutableTimeZoneDict = [timezoneDictionary mutableCopy];
for (NSDictionary *dictionary in panelController.defaultPreferences) {
if ([dictionary[CLTimezoneName] isEqualToString:customLabelValue]) {
return;
}
}
(customLabelValue.length > 0) ? [mutableTimeZoneDict setValue:customLabelValue forKey:CLCustomLabel] : [mutableTimeZoneDict setValue:CLEmptyString forKey:CLCustomLabel] ;
[panelController.defaultPreferences replaceObjectAtIndex:cellView.rowNumber withObject:mutableTimeZoneDict];
[[NSUserDefaults standardUserDefaults] setObject:panelController.defaultPreferences forKey:CLDefaultPreferenceKey];

4
Clocker/Panel.xib

@ -250,7 +250,7 @@
<binding destination="-2" name="value" keyPath="self.futureSliderValue" id="Fbv-WN-01b"/>
</connections>
</slider>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OFy-u1-TnH">
<button toolTip="Open Preferences" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OFy-u1-TnH">
<rect key="frame" x="246" y="1" width="29" height="19"/>
<constraints>
<constraint firstAttribute="width" constant="29" id="MIQ-4K-E5A"/>
@ -264,7 +264,7 @@
<action selector="openPreferences:" target="-2" id="0Yc-Eq-obQ"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nTt-pf-Hw2">
<button toolTip="Close Clocker" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nTt-pf-Hw2">
<rect key="frame" x="0.0" y="1" width="29" height="19"/>
<constraints>
<constraint firstAttribute="width" constant="29" id="8kZ-Pj-VK6"/>

1
Clocker/PanelController.h

@ -73,5 +73,6 @@
- (void)updateDefaultPreferences;
- (void)showOptions:(BOOL)value;
- (void)removeContextHelpForSlider;
- (void)updatePanelColor;
@end

37
Clocker/PanelController.m

@ -398,7 +398,8 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
}
- (NSString *)getFormattedSunriseOrSunsetTime:(NSMutableDictionary *)originalTime andSunImage:(CLTimezoneCellView *)cell
- (NSString *)getFormattedSunriseOrSunsetTime:(NSMutableDictionary *)originalTime
andSunImage:(CLTimezoneCellView *)cell
{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"yyyy-MM-dd HH:mm";
@ -609,15 +610,15 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
[[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];
if ([window.windowController isMemberOfClass:[CLOneWindowController class]]) {
CLOneWindowController *ref = (CLOneWindowController *) window.windowController;
[ref.preferencesView refereshTimezoneTableView];
}
}
[self.mainTableview reloadData];
return YES;
}
@ -833,7 +834,12 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
}
NSMutableArray *newArray = [[NSMutableArray alloc] initWithArray:defaultPreference];
[newArray replaceObjectAtIndex:[self.defaultPreferences indexOfObject:dictionary] withObject:newDictionary];
for (NSMutableDictionary *timeDictionary in self.defaultPreferences) {
if ([dictionary[CLPlaceIdentifier] isEqualToString:timeDictionary[CLPlaceIdentifier]]) {
[newArray replaceObjectAtIndex:[self.defaultPreferences indexOfObject:timeDictionary] withObject:newDictionary];
}
}
[[NSUserDefaults standardUserDefaults] setObject:newArray forKey:CLDefaultPreferenceKey];
@ -854,4 +860,21 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
}
}
- (void)updatePanelColor
{
NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey];
if (theme.length > 0 && ![theme isEqualToString:@"Default"])
{
[self.mainTableview setBackgroundColor:[NSColor blackColor]];
self.window.alphaValue = 0.90;
}
else
{
[self.mainTableview setBackgroundColor:[NSColor whiteColor]];
self.window.alphaValue = 1;
}
}
@end

2
Clocker/Preferences/CLPreferencesView.xib

@ -247,7 +247,7 @@ CA
<binding destination="-2" name="animate" keyPath="self.activityInProgress" id="S3o-gJ-W9p"/>
</connections>
</progressIndicator>
<button toolTip="Add a timezone" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cyZ-cL-S7a">
<button toolTip="Close Panel" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cyZ-cL-S7a">
<rect key="frame" x="50" y="4" width="50" height="19"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="lku-Qx-nX5"/>

21
Media.xcassets/Black Theme.imageset/Contents.json vendored

@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Screen Shot 2015-12-13 at 3.26.58 AM.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
Media.xcassets/Black Theme.imageset/Screen Shot 2015-12-13 at 3.26.58 AM.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

21
Media.xcassets/White Theme.imageset/Contents.json vendored

@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Screen Shot 2015-12-13 at 3.27.22 AM.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
Media.xcassets/White Theme.imageset/Screen Shot 2015-12-13 at 3.27.22 AM.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

21
Media.xcassets/WhiteButton.imageset/Contents.json vendored

@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "WhiteButton.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
Media.xcassets/WhiteButton.imageset/WhiteButton.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

21
Media.xcassets/aboutTemplate.imageset/Contents.json vendored

@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "aboutTemplate.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
Media.xcassets/aboutTemplate.imageset/aboutTemplate.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

Loading…
Cancel
Save