Browse Source

More customization options!

v1.2.1
Abhishek Banthia 9 years ago
parent
commit
51f531e4ce
  1. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  2. 100
      Clocker/AboutUsWindow/CLAboutUsView.xib
  3. 76
      Clocker/Appearance Tab/CLAppearanceView.xib
  4. 12
      Clocker/Appearance Tab/CLAppearanceViewController.m
  5. 16
      Clocker/PanelController.m

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

Binary file not shown.

100
Clocker/AboutUsWindow/CLAboutUsView.xib

@ -12,11 +12,11 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<view id="FS5-f2-b1Z">
<rect key="frame" x="0.0" y="0.0" width="504" height="207"/>
<rect key="frame" x="0.0" y="0.0" width="487" height="242"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="p2G-hA-MSX">
<rect key="frame" x="20" y="56" width="125" height="117"/>
<rect key="frame" x="20" y="63" width="125" height="117"/>
<constraints>
<constraint firstAttribute="width" constant="125" id="6Kp-RK-dT4"/>
<constraint firstAttribute="height" constant="117" id="znw-VN-bXv"/>
@ -24,7 +24,7 @@
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ClockerIcon-256" id="pfa-88-uAu"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XlC-Xd-67t">
<rect key="frame" x="161" y="152" width="97" height="35"/>
<rect key="frame" x="153" y="187" width="97" height="35"/>
<constraints>
<constraint firstAttribute="width" constant="93" id="NgB-aR-GfY"/>
<constraint firstAttribute="height" constant="35" id="dqF-vG-wml"/>
@ -36,7 +36,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FG9-E5-o8y">
<rect key="frame" x="164" y="133" width="79" height="23"/>
<rect key="frame" x="153" y="168" width="79" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="APM-BF-sIg"/>
<constraint firstAttribute="width" constant="75" id="W3D-bf-G5h"/>
@ -48,7 +48,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5Eo-aJ-L8H">
<rect key="frame" x="164" y="111" width="199" height="20"/>
<rect key="frame" x="153" y="146" width="199" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="6fy-MI-uin"/>
<constraint firstAttribute="width" constant="195" id="kzy-kb-gYL"/>
@ -60,22 +60,22 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6Cx-BF-XMU">
<rect key="frame" x="164" y="83" width="334" height="20"/>
<rect key="frame" x="153" y="123" width="265" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="Oob-bz-4Vp"/>
<constraint firstAttribute="width" constant="330" id="RyU-Mg-Xun"/>
<constraint firstAttribute="height" constant="15" id="Oob-bz-4Vp"/>
<constraint firstAttribute="width" constant="261" id="RyU-Mg-Xun"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Clocker is completely open-source and is available for reuse under" id="oId-kW-4fE">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Clocker is completely open-source and is available for reuse" id="oId-kW-4fE">
<font key="font" size="10" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fgO-N3-3oh">
<rect key="frame" x="153" y="13" width="116" height="32"/>
<rect key="frame" x="149" y="13" width="102" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="HOR-7s-O7V"/>
<constraint firstAttribute="width" constant="104" id="fjr-FG-Jlq"/>
<constraint firstAttribute="width" constant="90" id="fjr-FG-Jlq"/>
</constraints>
<buttonCell key="cell" type="push" title="View Source" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="yEt-bN-Jci">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -86,10 +86,10 @@
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q67-QZ-7g3">
<rect key="frame" x="260" y="13" width="117" height="32"/>
<rect key="frame" x="249" y="13" width="107" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="Fw5-r2-JCs"/>
<constraint firstAttribute="width" constant="105" id="zmg-WE-hsM"/>
<constraint firstAttribute="width" constant="95" id="zmg-WE-hsM"/>
</constraints>
<buttonCell key="cell" type="push" title="Report Issue" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="HO1-pf-GNd">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -100,7 +100,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="P3u-Um-Nby">
<rect key="frame" x="367" y="13" width="123" height="32"/>
<rect key="frame" x="350" y="13" width="123" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="111" id="5Yt-bH-NGf"/>
<constraint firstAttribute="height" constant="21" id="8Jh-fm-8up"/>
@ -113,13 +113,49 @@
<action selector="openFacebookPage:" target="-2" id="gnQ-cM-gbO"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="L56-3L-BMp">
<rect key="frame" x="153" y="93" width="265" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="261" id="Few-KD-LZF"/>
<constraint firstAttribute="height" constant="15" id="QDi-xT-arg"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Timezone search is powered by GEONAMES." id="9ET-zo-WiK">
<font key="font" size="10" name="HelveticaNeue-Light"/>
<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="0Vx-Jp-YMZ">
<rect key="frame" x="153" y="78" width="265" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="261" id="7xb-Sa-cCd"/>
<constraint firstAttribute="height" constant="15" id="qMb-Ob-kVe"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="City data provided by Google Geocode API." id="VMf-Px-dpm">
<font key="font" size="10" name="HelveticaNeue-Light"/>
<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="IhK-El-tOe">
<rect key="frame" x="153" y="63" width="283" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="7kh-Ha-LHP"/>
<constraint firstAttribute="width" constant="279" id="KbL-WX-dqu"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="You can support Clocker by starring the source on GitHub! :)" id="apa-Nu-NtC">
<font key="font" size="10" name="HelveticaNeue-Medium"/>
<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="Rzs-xE-sfs">
<rect key="frame" x="165" y="68" width="334" height="20"/>
<rect key="frame" x="153" y="108" width="265" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="2sg-Q1-h9h"/>
<constraint firstAttribute="width" constant="330" id="MHq-fu-8k6"/>
<constraint firstAttribute="height" constant="15" id="2sg-Q1-h9h"/>
<constraint firstAttribute="width" constant="261" id="MHq-fu-8k6"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="the MIT License. Timezone search powered by GEONAMES." id="JAy-Yp-MXm">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="under the MIT license. Inspired by Shpavoski's popup project!" id="JAy-Yp-MXm">
<font key="font" size="10" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
@ -127,26 +163,32 @@
</textField>
</subviews>
<constraints>
<constraint firstItem="fgO-N3-3oh" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="14" id="4rX-vc-Me4"/>
<constraint firstItem="0Vx-Jp-YMZ" firstAttribute="top" secondItem="L56-3L-BMp" secondAttribute="bottom" id="7If-0u-F8e"/>
<constraint firstItem="p2G-hA-MSX" firstAttribute="leading" secondItem="FS5-f2-b1Z" secondAttribute="leading" constant="20" id="8LW-4H-HKD"/>
<constraint firstAttribute="bottom" secondItem="q67-QZ-7g3" secondAttribute="bottom" constant="20" id="Cl5-lU-Hlw"/>
<constraint firstAttribute="bottom" secondItem="fgO-N3-3oh" secondAttribute="bottom" constant="20" id="Ka3-lR-aW1"/>
<constraint firstItem="p2G-hA-MSX" firstAttribute="top" secondItem="FS5-f2-b1Z" secondAttribute="top" constant="34" id="LFJ-eg-NOC"/>
<constraint firstItem="Rzs-xE-sfs" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="22" id="Mru-Qk-R35"/>
<constraint firstItem="P3u-Um-Nby" firstAttribute="leading" secondItem="q67-QZ-7g3" secondAttribute="trailing" constant="2" id="NtI-jY-BNB"/>
<constraint firstItem="6Cx-BF-XMU" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="21" id="PxC-Pa-PfL"/>
<constraint firstItem="XlC-Xd-67t" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="18" id="ReB-0P-Ppj"/>
<constraint firstItem="5Eo-aJ-L8H" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="21" id="a9Y-c0-NKB"/>
<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="L56-3L-BMp" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="O8Q-EX-Phy"/>
<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="3" id="fA5-O5-kY8"/>
<constraint firstItem="FG9-E5-o8y" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="21" id="kyh-fi-23P"/>
<constraint firstItem="IhK-El-tOe" firstAttribute="top" secondItem="0Vx-Jp-YMZ" secondAttribute="bottom" id="eSM-mI-IIG"/>
<constraint firstItem="q67-QZ-7g3" firstAttribute="leading" secondItem="fgO-N3-3oh" secondAttribute="trailing" constant="10" id="fA5-O5-kY8"/>
<constraint firstItem="L56-3L-BMp" firstAttribute="top" secondItem="Rzs-xE-sfs" secondAttribute="bottom" id="gKd-32-zpg"/>
<constraint firstItem="FG9-E5-o8y" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="kyh-fi-23P"/>
<constraint firstItem="0Vx-Jp-YMZ" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="p3M-xc-poa"/>
<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="20" id="slR-Qu-uJh"/>
<constraint firstItem="p2G-hA-MSX" firstAttribute="top" secondItem="FS5-f2-b1Z" secondAttribute="top" constant="62" id="tO4-p0-Wfk"/>
<constraint firstItem="fgO-N3-3oh" firstAttribute="leading" secondItem="FS5-f2-b1Z" secondAttribute="leading" constant="155" id="wOA-HL-UjC"/>
<constraint firstItem="FG9-E5-o8y" firstAttribute="top" secondItem="XlC-Xd-67t" secondAttribute="bottom" constant="-4" id="yHu-dm-LPw"/>
<constraint firstItem="Rzs-xE-sfs" firstAttribute="top" secondItem="6Cx-BF-XMU" secondAttribute="bottom" constant="-5" id="ydK-a7-uQy"/>
<constraint firstItem="Rzs-xE-sfs" firstAttribute="top" secondItem="6Cx-BF-XMU" secondAttribute="bottom" id="ydK-a7-uQy"/>
<constraint firstItem="6Cx-BF-XMU" firstAttribute="top" secondItem="5Eo-aJ-L8H" secondAttribute="bottom" constant="8" id="zki-ag-D4H"/>
</constraints>
<point key="canvasLocation" x="578" y="300.5"/>
<point key="canvasLocation" x="601.5" y="254"/>
</view>
</objects>
<resources>

76
Clocker/Appearance Tab/CLAppearanceView.xib

@ -15,11 +15,11 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView id="Hz6-mo-xeY">
<rect key="frame" x="0.0" y="0.0" width="272" height="180"/>
<rect key="frame" x="0.0" y="0.0" width="439" height="335"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6mg-pt-RHb">
<rect key="frame" x="47" y="17" width="179" height="26"/>
<rect key="frame" x="131" y="164" width="179" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="174" id="jc9-tN-3oB"/>
</constraints>
@ -41,7 +41,7 @@
</connections>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Qi6-T2-p3b">
<rect key="frame" x="103" y="45" width="67" height="19"/>
<rect key="frame" x="186" y="192" width="67" height="19"/>
<constraints>
<constraint firstAttribute="width" constant="63" id="4T0-z6-dAq"/>
</constraints>
@ -52,7 +52,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iVw-cq-zLz">
<rect key="frame" x="116" y="93" width="40" height="19"/>
<rect key="frame" x="200" y="244" width="40" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Theme" id="hCb-NM-To8">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -60,7 +60,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5TC-RQ-gzI">
<rect key="frame" x="101" y="141" width="70" height="19"/>
<rect key="frame" x="185" y="296" width="70" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Time Format" id="Hza-PB-FEf">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -68,7 +68,7 @@
</textFieldCell>
</textField>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5tI-fU-0lZ">
<rect key="frame" x="74" y="66" width="124" height="24"/>
<rect key="frame" x="158" y="217" width="124" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="dW5-vG-EwD"/>
</constraints>
@ -84,8 +84,50 @@
<binding destination="WGI-5h-l6M" name="selectedLabel" keyPath="values.defaultTheme" id="vyq-YM-las"/>
</connections>
</segmentedControl>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yuq-9i-SR0">
<rect key="frame" x="180" y="113" width="82" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="78" id="F56-RS-TkQ"/>
</constraints>
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="wtp-4R-FaO">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<segments>
<segment label="Yes"/>
<segment label="No" toolTip="Customize the timezone panel by selecting a theme!" selected="YES" tag="1"/>
</segments>
</segmentedCell>
<connections>
<action selector="toggleSunriseAndSunset:" target="-2" id="7yw-7E-Oiy"/>
<binding destination="WGI-5h-l6M" name="selectedIndex" keyPath="values.displaySunTimings" id="CFq-VY-oBb"/>
</connections>
</segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YQi-x8-6f8">
<rect key="frame" x="177" y="88" width="85" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Display Options" id="KTv-74-itf">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1eh-BT-2fK">
<rect key="frame" x="101" y="61" width="240" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="236" id="uU1-9Q-cqa"/>
</constraints>
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="ZV9-ih-faz">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<segments>
<segment label="Show Relative Dates"/>
<segment label="Show actual day" toolTip="Customize the timezone panel by selecting a theme!" selected="YES" tag="1"/>
</segments>
</segmentedCell>
<connections>
<action selector="changeRelativeDayDisplay:" target="-2" id="7Af-BH-qFq"/>
<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">
<rect key="frame" x="18" y="114" width="236" height="24"/>
<rect key="frame" x="102" y="269" width="236" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="232" id="uOJ-Mi-Fin"/>
</constraints>
@ -101,20 +143,36 @@
<binding destination="WGI-5h-l6M" name="selectedIndex" keyPath="values.is24HourFormatSelected" id="UsS-ER-9M9"/>
</connections>
</segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="o8j-B8-IEv">
<rect key="frame" x="146" y="140" width="147" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Show Sunrise, Sunset Time" id="gv1-YC-fw7">
<font key="font" size="12" name="HelveticaNeue-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="o8j-B8-IEv" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="0j0-b3-5B3"/>
<constraint firstItem="YQi-x8-6f8" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="6LU-d8-lKX"/>
<constraint firstItem="Yuq-9i-SR0" firstAttribute="top" secondItem="o8j-B8-IEv" secondAttribute="bottom" constant="4" id="B4y-AK-Eod"/>
<constraint firstItem="OrL-Ix-fmY" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="JtZ-ra-RaC"/>
<constraint firstItem="6mg-pt-RHb" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="Oh4-4K-mPE"/>
<constraint firstItem="6mg-pt-RHb" firstAttribute="top" secondItem="Qi6-T2-p3b" secondAttribute="bottom" constant="4" id="P8v-4d-79D"/>
<constraint firstItem="o8j-B8-IEv" firstAttribute="top" secondItem="6mg-pt-RHb" secondAttribute="bottom" constant="8" id="PGn-UJ-nsm"/>
<constraint firstItem="1eh-BT-2fK" firstAttribute="top" secondItem="YQi-x8-6f8" secondAttribute="bottom" constant="4" id="POa-Gi-Prk"/>
<constraint firstItem="Yuq-9i-SR0" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" constant="1.5" id="Tc9-yI-eIf"/>
<constraint firstItem="5tI-fU-0lZ" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="Vkb-QV-unN"/>
<constraint firstItem="iVw-cq-zLz" firstAttribute="top" secondItem="OrL-Ix-fmY" secondAttribute="bottom" constant="4" id="XgM-Wl-Xap"/>
<constraint firstItem="iVw-cq-zLz" firstAttribute="top" secondItem="OrL-Ix-fmY" secondAttribute="bottom" constant="8" id="XgM-Wl-Xap"/>
<constraint firstItem="Qi6-T2-p3b" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="ZKu-5n-Qwo"/>
<constraint firstItem="iVw-cq-zLz" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="Zh8-Vn-VxM"/>
<constraint firstItem="5tI-fU-0lZ" firstAttribute="top" secondItem="iVw-cq-zLz" secondAttribute="bottom" constant="4" id="bo6-s2-Vfj"/>
<constraint firstItem="1eh-BT-2fK" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" constant="1.5" id="fvI-By-5Ef"/>
<constraint firstItem="5TC-RQ-gzI" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="lc0-ud-Mnw"/>
<constraint firstItem="5TC-RQ-gzI" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" id="oI8-4L-ppf"/>
<constraint firstItem="Qi6-T2-p3b" firstAttribute="top" secondItem="5tI-fU-0lZ" secondAttribute="bottom" constant="4" id="rAe-QL-e4G"/>
<constraint firstItem="Qi6-T2-p3b" firstAttribute="top" secondItem="5tI-fU-0lZ" secondAttribute="bottom" constant="8" id="rAe-QL-e4G"/>
<constraint firstItem="OrL-Ix-fmY" firstAttribute="top" secondItem="5TC-RQ-gzI" secondAttribute="bottom" constant="4" id="rpk-WN-DT9"/>
<constraint firstItem="YQi-x8-6f8" firstAttribute="top" secondItem="Yuq-9i-SR0" secondAttribute="bottom" constant="8" id="vQl-up-u15"/>
</constraints>
<point key="canvasLocation" x="187" y="251"/>
</customView>

12
Clocker/Appearance Tab/CLAppearanceViewController.m

@ -94,9 +94,19 @@
}
- (IBAction)toggleSunriseAndSunset:(id)sender {
- (IBAction)toggleSunriseAndSunset:(id)sender
{
}
- (IBAction)changeRelativeDayDisplay:(id)sender
{
NSSegmentedControl *relativeDayControl = (NSSegmentedControl*) sender;
NSNumber *selectedIndex = [NSNumber numberWithInteger:relativeDayControl.selectedSegment];
[[NSUserDefaults standardUserDefaults] setObject:selectedIndex forKey:@"relativeDate"];
[self refreshMainTableview];
}
- (void)refreshMainTableview
{
dispatch_async(dispatch_get_main_queue(), ^{

16
Clocker/PanelController.m

@ -458,7 +458,21 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
dateFormatter.timeZone = [NSTimeZone timeZoneWithName:timezoneID];
return [self compareSystemDate:[self getLocalCurrentDate] toTimezoneDate:[dateFormatter stringFromDate:newDate]];;
NSNumber *relativeDayPreference = [[NSUserDefaults standardUserDefaults] objectForKey:@"relativeDate"];
if (relativeDayPreference.integerValue == 0) {
return [self compareSystemDate:[self getLocalCurrentDate] toTimezoneDate:[dateFormatter stringFromDate:newDate]];;
}
else
{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = [NSDateFormatter dateFormatFromTemplate:@"MM/dd/yyyy" options:0 locale:[NSLocale currentLocale]];
NSDate *convertedDate = [formatter dateFromString:[dateFormatter stringFromDate:newDate]];
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];
NSInteger weekday = [calendar component:NSCalendarUnitWeekday fromDate:convertedDate];
return [self getWeekdayFromInteger:weekday];
}
}
#pragma mark -

Loading…
Cancel
Save