Browse Source

Analytics

v1.2.1
Abhishek Banthia 9 years ago
parent
commit
692b09b946
  1. 17
      Clocker.xcodeproj/project.pbxproj
  2. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  3. 6
      Clocker/AboutUsWindow/CLAboutUsView.xib
  4. 3
      Clocker/AboutUsWindow/CLAboutUsViewController.h
  5. 6
      Clocker/AboutUsWindow/CLAboutUsViewController.m
  6. 211
      Clocker/App Feedback/CLAppFeedbackWindow.xib
  7. 15
      Clocker/App Feedback/CLAppFeedbackWindowController.h
  8. 137
      Clocker/App Feedback/CLAppFeedbackWindowController.m
  9. 3
      Clocker/ApplicationDelegate.m
  10. 4
      Clocker/Panel.xib
  11. 12
      Clocker/Preferences/CLPreferencesView.xib
  12. 27
      Clocker/Preferences/CLPreferencesViewController.m

17
Clocker.xcodeproj/project.pbxproj

@ -37,6 +37,8 @@
9A8605BB1BEC14DC00A810A4 /* PanelController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8605B91BEC14DC00A810A4 /* PanelController.m */; };
9A8605BF1BEC14F600A810A4 /* BackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8605BC1BEC14F600A810A4 /* BackgroundView.m */; };
9A8605C01BEC14F600A810A4 /* Panel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8605BD1BEC14F600A810A4 /* Panel.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 */; };
@ -117,6 +119,9 @@
9A8605CA1BEC155B00A810A4 /* ApplicationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ApplicationDelegate.h; path = Clocker/ApplicationDelegate.h; sourceTree = "<group>"; };
9A8605CB1BEC155B00A810A4 /* ColoredButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ColoredButton.h; path = Clocker/ColoredButton.h; sourceTree = "<group>"; };
9A8605CC1BEC155B00A810A4 /* Clocker-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Clocker-Prefix.pch"; path = "Clocker/Clocker-Prefix.pch"; sourceTree = "<group>"; };
9A9E63831C2C673E009A299B /* CLAppFeedbackWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLAppFeedbackWindowController.h; path = "Clocker/App Feedback/CLAppFeedbackWindowController.h"; sourceTree = "<group>"; };
9A9E63841C2C673E009A299B /* CLAppFeedbackWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLAppFeedbackWindowController.m; path = "Clocker/App Feedback/CLAppFeedbackWindowController.m"; sourceTree = "<group>"; };
9A9E63851C2C673E009A299B /* CLAppFeedbackWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CLAppFeedbackWindow.xib; path = "Clocker/App Feedback/CLAppFeedbackWindow.xib"; sourceTree = "<group>"; };
9A9E87571C1FED1A00A7A2DF /* Bolts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Bolts.framework; path = Clocker/Parse/Bolts.framework; sourceTree = "<group>"; };
9A9E87581C1FED1A00A7A2DF /* Parse.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Parse.framework; path = Clocker/Parse/Parse.framework; sourceTree = "<group>"; };
9A9E87611C1FEDB500A7A2DF /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
@ -182,6 +187,8 @@
9A5951C31C1D0DE3009C17AA /* View Controllers */ = {
isa = PBXGroup;
children = (
9A3247361C263F4F00CF6B6E /* CLAppearanceViewController.h */,
9A3247371C263F4F00CF6B6E /* CLAppearanceViewController.m */,
9A392EE51C1CDD530072C10A /* CLAboutUsViewController.h */,
9A392EE61C1CDD530072C10A /* CLAboutUsViewController.m */,
9A392EEA1C1CE9950072C10A /* CLPreferencesViewController.h */,
@ -217,9 +224,10 @@
9A56DB7E1C1CFB73004CE6AF /* Panel.xib */,
9A392EE71C1CDD530072C10A /* CLAboutUsView.xib */,
9A392EEC1C1CE9950072C10A /* CLPreferencesView.xib */,
9A3247361C263F4F00CF6B6E /* CLAppearanceViewController.h */,
9A3247371C263F4F00CF6B6E /* CLAppearanceViewController.m */,
9A3247381C263F4F00CF6B6E /* CLAppearanceView.xib */,
9A9E63831C2C673E009A299B /* CLAppFeedbackWindowController.h */,
9A9E63841C2C673E009A299B /* CLAppFeedbackWindowController.m */,
9A9E63851C2C673E009A299B /* CLAppFeedbackWindow.xib */,
);
name = XIB;
sourceTree = "<group>";
@ -418,6 +426,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9A9E63871C2C673E009A299B /* CLAppFeedbackWindow.xib in Resources */,
9A5951FD1C1D592D009C17AA /* iVersion.bundle in Resources */,
9A392EEE1C1CE9950072C10A /* CLPreferencesView.xib in Resources */,
9A56DB811C1CFB73004CE6AF /* Panel.xib in Resources */,
@ -463,6 +472,7 @@
9A8605C01BEC14F600A810A4 /* Panel.m in Sources */,
9A8605BA1BEC14DC00A810A4 /* StatusItemView.m in Sources */,
9A3247391C263F4F00CF6B6E /* CLAppearanceViewController.m in Sources */,
9A9E63861C2C673E009A299B /* CLAppFeedbackWindowController.m in Sources */,
9A8605BB1BEC14DC00A810A4 /* PanelController.m in Sources */,
9A8605B61BEC14BE00A810A4 /* MenubarController.m in Sources */,
9A5951C01C1D0AA0009C17AA /* CLOneWindowController.m in Sources */,
@ -523,7 +533,6 @@
"$(inherited)",
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/Frameworks",
"$(PROJECT_DIR)/Clocker/ApptentiveConnect",
"$(PROJECT_DIR)/Clocker/Parse",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@ -624,7 +633,6 @@
"$(inherited)",
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/Frameworks",
"$(PROJECT_DIR)/Clocker/ApptentiveConnect",
"$(PROJECT_DIR)/Clocker/Parse",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@ -653,7 +661,6 @@
"$(inherited)",
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/Frameworks",
"$(PROJECT_DIR)/Clocker/ApptentiveConnect",
"$(PROJECT_DIR)/Clocker/Parse",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;

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

Binary file not shown.

6
Clocker/AboutUsWindow/CLAboutUsView.xib

@ -86,7 +86,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q67-QZ-7g3">
<rect key="frame" x="249" y="13" width="107" height="32"/>
<rect key="frame" x="247" y="13" width="107" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="Fw5-r2-JCs"/>
<constraint firstAttribute="width" constant="95" id="zmg-WE-hsM"/>
@ -144,13 +144,13 @@
<constraint firstItem="IhK-El-tOe" firstAttribute="top" secondItem="Rzs-xE-sfs" secondAttribute="bottom" constant="2" id="GhF-Ml-o0d"/>
<constraint firstAttribute="bottom" secondItem="fgO-N3-3oh" secondAttribute="bottom" constant="20" id="Ka3-lR-aW1"/>
<constraint firstItem="Rzs-xE-sfs" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="Mru-Qk-R35"/>
<constraint firstItem="P3u-Um-Nby" firstAttribute="leading" secondItem="q67-QZ-7g3" secondAttribute="trailing" constant="6" id="NtI-jY-BNB"/>
<constraint firstItem="P3u-Um-Nby" firstAttribute="leading" secondItem="q67-QZ-7g3" secondAttribute="trailing" constant="8" id="NtI-jY-BNB"/>
<constraint firstItem="6Cx-BF-XMU" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="PxC-Pa-PfL"/>
<constraint firstItem="XlC-Xd-67t" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="ReB-0P-Ppj"/>
<constraint firstItem="IhK-El-tOe" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="YNf-3g-MSO"/>
<constraint firstItem="5Eo-aJ-L8H" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="a9Y-c0-NKB"/>
<constraint firstAttribute="bottom" secondItem="P3u-Um-Nby" secondAttribute="bottom" constant="20" id="csw-Zl-TRQ"/>
<constraint firstItem="q67-QZ-7g3" firstAttribute="leading" secondItem="fgO-N3-3oh" secondAttribute="trailing" constant="10" id="fA5-O5-kY8"/>
<constraint firstItem="q67-QZ-7g3" firstAttribute="leading" secondItem="fgO-N3-3oh" secondAttribute="trailing" constant="8" id="fA5-O5-kY8"/>
<constraint firstItem="FG9-E5-o8y" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="kyh-fi-23P"/>
<constraint firstItem="5Eo-aJ-L8H" firstAttribute="top" secondItem="FG9-E5-o8y" secondAttribute="bottom" constant="2" id="pVM-TS-Wvl"/>
<constraint firstItem="XlC-Xd-67t" firstAttribute="top" secondItem="FS5-f2-b1Z" secondAttribute="top" constant="13" id="slR-Qu-uJh"/>

3
Clocker/AboutUsWindow/CLAboutUsViewController.h

@ -7,7 +7,10 @@
//
#import <Cocoa/Cocoa.h>
#import "CLAppFeedbackWindowController.h"
@interface CLAboutUsViewController : NSViewController
@property (strong, nonatomic) CLAppFeedbackWindowController *feedbackWindow;
@end

6
Clocker/AboutUsWindow/CLAboutUsViewController.m

@ -37,8 +37,10 @@ NSString *const CLFacebookPageURL = @"https://www.facebook.com/ClockerMenubarClo
}
- (IBAction)reportIssue:(id)sender
{
//
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:CLIssueURL]];
self.feedbackWindow = [CLAppFeedbackWindowController sharedWindow];
[self.feedbackWindow showWindow:nil];
[NSApp activateIgnoringOtherApps:YES];
[self.view.window orderOut:self];
}
- (IBAction)openFacebookPage:(id)sender

211
Clocker/App Feedback/CLAppFeedbackWindow.xib

@ -0,0 +1,211 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/>
<capability name="box content view" minToolsVersion="7.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="CLAppFeedbackWindowController">
<connections>
<outlet property="emailField" destination="zlM-Cf-OxV" id="uRw-dZ-JGR"/>
<outlet property="feedbackTextView" destination="sCg-gV-TTr" id="Evh-WS-epn"/>
<outlet property="informativeText" destination="W3a-Hi-ryk" id="qhv-iC-svS"/>
<outlet property="nameField" destination="Qzm-kE-Igl" id="miJ-7A-VPC"/>
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Clocker Feedback" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<rect key="contentRect" x="437" y="172" width="319" height="382"/>
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="319" height="382"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oNX-kV-RGt">
<rect key="frame" x="12" y="208" width="295" height="135"/>
<clipView key="contentView" id="NNn-eZ-8Je">
<rect key="frame" x="1" y="1" width="293" height="133"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView importsGraphics="NO" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" usesFontPanel="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="sCg-gV-TTr">
<rect key="frame" x="0.0" y="0.0" width="293" height="133"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<size key="minSize" width="293" height="133"/>
<size key="maxSize" width="463" height="10000000"/>
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="293" height="133"/>
<size key="maxSize" width="463" height="10000000"/>
</textView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="9Ed-AQ-o4N">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="Ls5-gY-fnI">
<rect key="frame" x="-100" y="-100" width="15" height="133"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<box title="Contact Information (Optional)" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="JzF-Oq-qhW">
<rect key="frame" x="9" y="66" width="291" height="129"/>
<view key="contentView" id="moX-Vc-vMc">
<rect key="frame" x="1" y="1" width="289" height="110"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="269" translatesAutoresizingMaskIntoConstraints="NO" id="Qzm-kE-Igl">
<rect key="frame" x="10" y="77" width="269" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="6DY-uj-pMG"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" placeholderString="Name" drawsBackground="YES" id="9OU-9S-Apl">
<font key="font" size="12" name="SFUIDisplay-Light"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="269" translatesAutoresizingMaskIntoConstraints="NO" id="zlM-Cf-OxV">
<rect key="frame" x="10" y="45" width="269" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="b3M-Sc-y8S"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" placeholderString="Email" drawsBackground="YES" id="Z0A-qe-nbc">
<font key="font" size="12" name="SFUIDisplay-Light"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="269" translatesAutoresizingMaskIntoConstraints="NO" id="LVY-Qw-MYC">
<rect key="frame" x="8" y="-3" width="273" height="45"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="dRi-pM-pWX"/>
<constraint firstAttribute="width" constant="269" id="xTs-u1-oid"/>
</constraints>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Your contact information will let us contact you in case we need more information or can help!" placeholderString="" id="yEq-6I-HBq">
<font key="font" size="12" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="zlM-Cf-OxV" firstAttribute="top" secondItem="Qzm-kE-Igl" secondAttribute="bottom" constant="10" id="9Gc-9K-fJF"/>
<constraint firstItem="Qzm-kE-Igl" firstAttribute="top" secondItem="moX-Vc-vMc" secondAttribute="top" constant="11" id="Dpz-4F-hN7"/>
<constraint firstItem="Qzm-kE-Igl" firstAttribute="leading" secondItem="moX-Vc-vMc" secondAttribute="leading" constant="10" id="GKZ-24-t7t"/>
<constraint firstItem="LVY-Qw-MYC" firstAttribute="top" secondItem="zlM-Cf-OxV" secondAttribute="bottom" constant="3" id="Xck-iy-cZk"/>
<constraint firstItem="LVY-Qw-MYC" firstAttribute="centerX" secondItem="moX-Vc-vMc" secondAttribute="centerX" id="k3n-00-eiV"/>
<constraint firstItem="zlM-Cf-OxV" firstAttribute="leading" secondItem="moX-Vc-vMc" secondAttribute="leading" constant="10" id="u3y-gI-YeL"/>
</constraints>
</view>
<constraints>
<constraint firstAttribute="height" constant="125" id="lwa-Yt-uxh"/>
</constraints>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<font key="titleFont" size="11" name="SFUIDisplay-Regular"/>
</box>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="szs-8j-SMN">
<rect key="frame" x="93" y="13" width="82" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="3Et-2P-JlO"/>
<constraint firstAttribute="width" constant="70" id="CFb-9Q-Mbd"/>
</constraints>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" allowsMixedState="YES" imageScaling="proportionallyDown" inset="2" id="BNp-eQ-I1S">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
</buttonCell>
<connections>
<action selector="cancel:" target="-2" id="ZzH-nF-Pd0"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sJq-1o-Bft">
<rect key="frame" x="171" y="13" width="134" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="122" id="IU8-yi-rFV"/>
<constraint firstAttribute="height" constant="21" id="M7a-oP-ZqD"/>
</constraints>
<buttonCell key="cell" type="push" title="Send Feedback" bezelStyle="rounded" alignment="center" borderStyle="border" allowsMixedState="YES" imageScaling="proportionallyDown" inset="2" id="vrZ-QX-vjo">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
DQ
</string>
</buttonCell>
<connections>
<action selector="sendFeedback:" target="-2" id="lrL-0l-Jbd"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gej-YH-9dt">
<rect key="frame" x="10" y="351" width="139" height="17"/>
<constraints>
<constraint firstAttribute="width" constant="135" id="1Ix-I9-ymS"/>
<constraint firstAttribute="height" constant="17" id="a7O-DC-irX"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Tell us what you think!" id="oHe-hu-bQn">
<font key="font" size="13" name="SFUIDisplay-Regular"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="W3a-Hi-ryk">
<rect key="frame" x="10" y="47" width="289" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="vCO-Z3-Dfd"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="sSH-y9-tFH">
<font key="font" size="13" name="SFUIDisplay-Light"/>
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<progressIndicator wantsLayer="YES" maxValue="100" indeterminate="YES" style="bar" translatesAutoresizingMaskIntoConstraints="NO" id="h17-og-9PU">
<rect key="frame" x="12" y="19" width="79" height="20"/>
<connections>
<binding destination="-2" name="animate" keyPath="self.activityInProgress" id="XTs-pT-uOV"/>
<binding destination="-2" name="hidden" keyPath="self.activityInProgress" id="d8g-HB-pPg">
<dictionary key="options">
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
</connections>
</progressIndicator>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="Qzm-kE-Igl" secondAttribute="trailing" constant="30" id="5UG-sC-szG"/>
<constraint firstItem="W3a-Hi-ryk" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="8UN-bn-s8Y"/>
<constraint firstAttribute="trailing" secondItem="zlM-Cf-OxV" secondAttribute="trailing" constant="30" id="Arj-b2-oje"/>
<constraint firstAttribute="trailing" secondItem="oNX-kV-RGt" secondAttribute="trailing" constant="12" id="IqR-EG-ga3"/>
<constraint firstItem="sJq-1o-Bft" firstAttribute="leading" secondItem="szs-8j-SMN" secondAttribute="trailing" constant="8" id="JSB-K6-cbX"/>
<constraint firstAttribute="trailing" secondItem="sJq-1o-Bft" secondAttribute="trailing" constant="20" id="KuW-ez-Od9"/>
<constraint firstItem="JzF-Oq-qhW" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="NCF-RW-EvZ"/>
<constraint firstAttribute="bottom" secondItem="h17-og-9PU" secondAttribute="bottom" constant="20" id="OLS-kL-muQ"/>
<constraint firstItem="oNX-kV-RGt" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="P0X-Hb-ZtS"/>
<constraint firstItem="szs-8j-SMN" firstAttribute="leading" secondItem="h17-og-9PU" secondAttribute="trailing" constant="8" id="S7a-To-K83"/>
<constraint firstItem="W3a-Hi-ryk" firstAttribute="top" secondItem="moX-Vc-vMc" secondAttribute="bottom" constant="3" id="U6n-Ij-4TB"/>
<constraint firstAttribute="bottom" secondItem="sJq-1o-Bft" secondAttribute="bottom" constant="20" id="cft-qs-VMz"/>
<constraint firstItem="szs-8j-SMN" firstAttribute="top" secondItem="JzF-Oq-qhW" secondAttribute="bottom" constant="29" id="hxq-hm-F4K"/>
<constraint firstItem="h17-og-9PU" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="iIH-oN-lBO"/>
<constraint firstAttribute="trailing" secondItem="W3a-Hi-ryk" secondAttribute="trailing" constant="22" id="j6H-0M-Cux"/>
<constraint firstAttribute="trailing" secondItem="JzF-Oq-qhW" secondAttribute="trailing" constant="22" id="leu-ZX-18k"/>
<constraint firstItem="gej-YH-9dt" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="12" id="tlA-wq-Gts"/>
<constraint firstItem="JzF-Oq-qhW" firstAttribute="top" secondItem="oNX-kV-RGt" secondAttribute="bottom" constant="13" id="w7P-k5-O59"/>
<constraint firstAttribute="bottom" secondItem="szs-8j-SMN" secondAttribute="bottom" constant="20" id="xos-N8-d1k"/>
<constraint firstItem="gej-YH-9dt" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="14" id="yZE-PY-8EZ"/>
<constraint firstItem="oNX-kV-RGt" firstAttribute="top" secondItem="gej-YH-9dt" secondAttribute="bottom" constant="8" id="yec-Eo-Jb9"/>
</constraints>
</view>
<connections>
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
</connections>
<point key="canvasLocation" x="148.5" y="268"/>
</window>
</objects>
</document>

15
Clocker/App Feedback/CLAppFeedbackWindowController.h

@ -0,0 +1,15 @@
//
// CLAppFeedbackWindowController.h
// Clocker
//
// Created by Abhishek Banthia on 12/24/15.
//
//
#import <Cocoa/Cocoa.h>
@interface CLAppFeedbackWindowController : NSWindowController<NSWindowDelegate>
+ (instancetype)sharedWindow;
@end

137
Clocker/App Feedback/CLAppFeedbackWindowController.m

@ -0,0 +1,137 @@
//
// CLAppFeedbackWindowController.m
// Clocker
//
// Created by Abhishek Banthia on 12/24/15.
//
//
#import "CLAppFeedbackWindowController.h"
#import <Parse/Parse.h>
#import "CLOneWindowController.h"
#import "CommonStrings.h"
NSString *const CLAppFeedbackNibIdentifier = @"CLAppFeedbackWindow";
static CLAppFeedbackWindowController *sharedFeedbackWindow = nil;
@interface CLAppFeedbackWindowController ()
@property (weak) IBOutlet NSTextField *nameField;
@property (weak) IBOutlet NSTextField *emailField;
@property (unsafe_unretained) IBOutlet NSTextView *feedbackTextView;
@property (weak) IBOutlet NSTextField *informativeText;
@property (assign) BOOL activityInProgress;
@end
@implementation CLAppFeedbackWindowController
- (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;
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
}
+ (instancetype)sharedWindow
{
if (sharedFeedbackWindow == nil)
{
/*Using a thread safe pattern*/
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedFeedbackWindow = [[self alloc] initWithWindowNibName:CLAppFeedbackNibIdentifier];
});
}
return sharedFeedbackWindow;
}
- (IBAction)sendFeedback:(id)sender
{
[self cleanUp];
self.activityInProgress = YES;
if (self.feedbackTextView.string.length == 0)
{
self.informativeText.stringValue = @"Yo, enter some feedback!";
[NSTimer scheduledTimerWithTimeInterval:5.0
target:self
selector:@selector(cleanUp)
userInfo:nil
repeats:NO];
self.activityInProgress = NO;
return;
}
PFObject *feedbackObject = [PFObject objectWithClassName:@"CLAppFeedback"];
feedbackObject[@"name"] = (self.nameField.stringValue.length > 0) ?
self.nameField.stringValue : @"Not Provided";
feedbackObject[@"email"] = (self.emailField.stringValue.length > 0) ?
self.emailField.stringValue : @"Not Provided";
feedbackObject[@"feedback"] = self.feedbackTextView.string;
[feedbackObject saveInBackgroundWithBlock:^(BOOL succeeded, NSError * _Nullable error) {
self.activityInProgress = NO;
if (!succeeded) {
self.informativeText.stringValue = error.localizedDescription;
[NSTimer scheduledTimerWithTimeInterval:10.0
target:self
selector:@selector(cleanUp)
userInfo:nil
repeats:NO];
}
else
{
NSAlert *alert = [[NSAlert alloc] init];
alert.messageText = @"Thank you for helping make Clocker even better!";
alert.informativeText = @"We owe you a candy. 😇";
[alert addButtonWithTitle:@"Close"];
[alert beginSheetModalForWindow:self.window
completionHandler:^(NSModalResponse returnCode) {
[self.window close];
}];
}
}];
}
- (void)cleanUp
{
self.informativeText.stringValue = CLEmptyString;
}
- (IBAction)cancel:(id)sender
{
[self.window close];
}
-(void)windowWillClose:(NSNotification *)notification
{
[self cleanUp];
self.nameField.stringValue = CLEmptyString;
self.emailField.stringValue = CLEmptyString;
self.feedbackTextView.string = CLEmptyString;
self.activityInProgress = NO;
for (NSWindow *window in [NSApplication sharedApplication].windows) {
if ([window.windowController isMemberOfClass:[CLOneWindowController class]]) {
[window makeKeyAndOrderFront:self];
[NSApp activateIgnoringOtherApps:YES];
}
}
}
@end

3
Clocker/ApplicationDelegate.m

@ -117,9 +117,6 @@ void *kContextActivePanel = &kContextActivePanel;
// [Optional] Track statistics around application opens.
[PFAnalytics trackAppOpenedWithLaunchOptions:nil];
PFObject *testObject = [PFObject objectWithClassName:@"TestObject"];
testObject[@"sucks"] = @"cock";
[testObject saveInBackground];
}

4
Clocker/Panel.xib

@ -121,7 +121,7 @@
<rect key="frame" x="62" y="30" width="16" height="16"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ClockerIcon-16" id="8gl-Vi-0VF"/>
</imageView>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JNw-ld-oz9">
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsExpansionToolTips="YES" preferredMaxLayoutWidth="110" translatesAutoresizingMaskIntoConstraints="NO" id="JNw-ld-oz9">
<rect key="frame" x="83" y="28" width="114" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="kOH-Lb-7sB"/>
@ -200,7 +200,7 @@
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rGL-w7-iSa">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="75" translatesAutoresizingMaskIntoConstraints="NO" id="rGL-w7-iSa">
<rect key="frame" x="100" y="28" width="79" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="75" id="XLu-0I-ACL"/>

12
Clocker/Preferences/CLPreferencesView.xib

@ -215,9 +215,9 @@ CA
</connections>
</searchField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KFC-NV-5A3">
<rect key="frame" x="102" y="9" width="230" height="15"/>
<rect key="frame" x="102" y="4" width="230" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="rr3-gU-VUn"/>
<constraint firstAttribute="height" constant="20" id="rr3-gU-VUn"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="COF-wH-VLX">
<font key="font" size="13" name="SFUIDisplay-Light"/>
@ -226,10 +226,9 @@ CA
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Wb6-yr-Pw4">
<rect key="frame" x="98" y="135" width="259" height="20"/>
<rect key="frame" x="123" y="135" width="209" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="QQQ-at-c1H"/>
<constraint firstAttribute="width" constant="255" id="ezl-af-c93"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" placeholderString="Please enter a timezone name" id="l4k-Vi-z4I">
<font key="font" size="13" name="SFUIDisplay-Light"/>
@ -238,7 +237,7 @@ CA
</textFieldCell>
</textField>
<progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="ifx-PO-gfq">
<rect key="frame" x="75" y="137" width="16" height="16"/>
<rect key="frame" x="100" y="137" width="16" height="16"/>
<connections>
<binding destination="-2" name="hidden" keyPath="self.activityInProgress" id="9pA-XX-dhd">
<dictionary key="options">
@ -288,7 +287,8 @@ CA
<constraint firstItem="Wb6-yr-Pw4" firstAttribute="leading" secondItem="ifx-PO-gfq" secondAttribute="trailing" constant="9" id="9cg-iz-7Dq"/>
<constraint firstAttribute="trailing" secondItem="KFC-NV-5A3" secondAttribute="trailing" constant="15" id="B6V-vn-THO"/>
<constraint firstItem="LM9-75-vkc" firstAttribute="top" secondItem="biT-6m-ElR" secondAttribute="bottom" constant="3" id="DZR-XO-6sm"/>
<constraint firstAttribute="bottom" secondItem="KFC-NV-5A3" secondAttribute="bottom" constant="9" id="FWx-F1-VK8"/>
<constraint firstAttribute="bottom" secondItem="KFC-NV-5A3" secondAttribute="bottom" constant="4" id="FWx-F1-VK8"/>
<constraint firstAttribute="trailing" secondItem="Wb6-yr-Pw4" secondAttribute="trailing" constant="15" id="MGS-8P-guQ"/>
<constraint firstItem="hp6-CH-WJs" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="Oir-hL-Og8"/>
<constraint firstAttribute="bottom" secondItem="cyZ-cL-S7a" secondAttribute="bottom" constant="5" id="QQ1-JS-knf"/>
<constraint firstItem="biT-6m-ElR" firstAttribute="top" secondItem="kXo-nl-oxR" secondAttribute="top" constant="8" id="Y7N-oR-3KY"/>

27
Clocker/Preferences/CLPreferencesViewController.m

@ -13,7 +13,7 @@
#import <QuartzCore/QuartzCore.h>
#import "CommonStrings.h"
#import "Reachability.h"
#import <Parse/Parse.h>
NSString *const CLSearchPredicateKey = @"SELF CONTAINS[cd]%@";
NSString *const CLPreferencesViewNibIdentifier = @"PreferencesWindow";
@ -190,7 +190,14 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
self.searchField.stringValue = CLEmptyString;
[self getTimeZoneForLatitude:[self.filteredArray[self.availableTimezoneTableView.selectedRow] objectForKey:@"latitude"] andLongitude:[self.filteredArray[self.availableTimezoneTableView.selectedRow] objectForKey:@"longitude"]];
[self getTimeZoneForLatitude:[self.filteredArray[self.availableTimezoneTableView
.selectedRow] objectForKey:@"latitude"]andLongitude:[self.filteredArray[self.availableTimezoneTableView.selectedRow] objectForKey:@"longitude"]];
PFObject *feedbackObject = [PFObject objectWithClassName:@"CLTimezoneSelection"];
feedbackObject[@"areaName"] = [self.filteredArray[self.availableTimezoneTableView.selectedRow] objectForKey:@"formattedAddress"];
[feedbackObject saveEventually];
}
- (IBAction)closePanel:(id)sender {
@ -252,8 +259,22 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
- (IBAction)filterArray:(id)sender
{
[self clearLabel];
self.filteredArray = [NSMutableArray array];
if (self.searchField.stringValue.length > 50)
{
self.activityInProgress = NO;
self.messageLabel.stringValue = @"Only 50 characters allowed!";
[NSTimer scheduledTimerWithTimeInterval:10
target:self
selector:@selector(clearLabel)
userInfo:nil
repeats:NO];
return;
}
if (self.searchField.stringValue.length > 0)
{
[self callGoogleAPiWithSearchString:self.searchField.stringValue];
@ -458,7 +479,7 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
return;
}
self.searchField.placeholderString = [NSString stringWithFormat:@"Adding %@", [self.filteredArray[self.availableTimezoneTableView.selectedRow] objectForKey:CLTimezoneName]];
self.searchField.placeholderString = @"Fetching data!";
self.placeholderLabel.placeholderString = @"Retrieving timezone data";

Loading…
Cancel
Save