Browse Source

New Abbreviation Column.

v1.2.2
Abhishek Banthia 9 years ago
parent
commit
35099e4114
  1. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  2. 216
      Clocker/Preferences/CLPreferencesView.xib
  3. 1
      Clocker/Preferences/CLPreferencesViewController.h
  4. 13
      Clocker/Preferences/CLPreferencesViewController.m

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

Binary file not shown.

216
Clocker/Preferences/CLPreferencesView.xib

@ -7,9 +7,11 @@
<objects> <objects>
<customObject id="-2" userLabel="File's Owner" customClass="CLPreferencesViewController"> <customObject id="-2" userLabel="File's Owner" customClass="CLPreferencesViewController">
<connections> <connections>
<outlet property="abbreviation" destination="V1c-xe-G2h" id="KPR-LT-bK2"/>
<outlet property="availableTimezoneTableView" destination="Q0t-hQ-orw" id="vQv-rd-Wkv"/> <outlet property="availableTimezoneTableView" destination="Q0t-hQ-orw" id="vQv-rd-Wkv"/>
<outlet property="messageLabel" destination="KFC-NV-5A3" id="NKB-JY-Udb"/> <outlet property="messageLabel" destination="KFC-NV-5A3" id="NKB-JY-Udb"/>
<outlet property="placeholderLabel" destination="Wb6-yr-Pw4" id="ilx-y4-XEw"/> <outlet property="placeholderLabel" destination="Wb6-yr-Pw4" id="ilx-y4-XEw"/>
<outlet property="searchCriteria" destination="MiN-SF-nnU" id="Osf-q8-wwG"/>
<outlet property="searchField" destination="biT-6m-ElR" id="Di3-QU-LGY"/> <outlet property="searchField" destination="biT-6m-ElR" id="Di3-QU-LGY"/>
<outlet property="timezonePanel" destination="6FL-fp-Ke1" id="SDq-Q4-hMb"/> <outlet property="timezonePanel" destination="6FL-fp-Ke1" id="SDq-Q4-hMb"/>
<outlet property="timezoneTableView" destination="LbJ-dW-ITm" id="tRO-Ch-Was"/> <outlet property="timezoneTableView" destination="LbJ-dW-ITm" id="tRO-Ch-Was"/>
@ -62,7 +64,19 @@ CA
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/> <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns> <tableColumns>
<tableColumn identifier="formattedAddress" editable="NO" width="252.75" minWidth="80" maxWidth="1000" id="YaU-AD-fOu"> <tableColumn identifier="favouriteTimezone" width="54.0546875" minWidth="50" maxWidth="55" id="AeF-Ol-OlY">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Favourite">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tableHeaderCell>
<buttonCell key="dataCell" type="check" bezelStyle="regularSquare" imagePosition="only" inset="2" id="B9V-8q-d3P">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
<tableColumn identifier="formattedAddress" editable="NO" width="250" minWidth="80" maxWidth="1000" id="YaU-AD-fOu">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Selected Timezone(s)"> <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Selected Timezone(s)">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -75,7 +89,7 @@ CA
</textFieldCell> </textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn> </tableColumn>
<tableColumn identifier="label" width="150" minWidth="80" maxWidth="150" id="wmL-jC-Tny"> <tableColumn identifier="label" width="106" minWidth="80" maxWidth="120" id="wmL-jC-Tny">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Label"> <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Label">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -98,7 +112,7 @@ CA
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView> </clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="QrG-bP-Ras"> <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="QrG-bP-Ras">
<rect key="frame" x="0.0" y="229" width="419" height="16"/> <rect key="frame" x="0.0" y="266" width="419" height="15"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
</scroller> </scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="dvf-BY-cGu"> <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="dvf-BY-cGu">
@ -137,68 +151,22 @@ CA
<rect key="frame" x="0.0" y="0.0" width="345" height="320"/> <rect key="frame" x="0.0" y="0.0" width="345" height="320"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<scrollView focusRingType="none" misplaced="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="22" horizontalPageScroll="10" verticalLineScroll="22" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LM9-75-vkc"> <searchField toolTip="Search a timezone" wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="biT-6m-ElR">
<rect key="frame" x="8" y="28" width="329" height="230"/> <rect key="frame" x="8" y="288" width="329" height="24"/>
<clipView key="contentView" id="Z7L-Ef-90Z"> <searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" focusRingType="none" placeholderString="Enter a city, state, country name" drawsBackground="YES" usesSingleLineMode="YES" id="ijc-z6-99E">
<rect key="frame" x="0.0" y="0.0" width="329" height="230"/> <font key="font" size="13" name="SFUIDisplay-Light"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<subviews> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="20" headerView="85y-4a-860" id="Q0t-hQ-orw"> </searchFieldCell>
<rect key="frame" x="0.0" y="0.0" width="329" height="207"/> <connections>
<autoresizingMask key="autoresizingMask"/> <action selector="filterArray:" target="-2" id="MWr-sX-24E"/>
<size key="intercellSpacing" width="3" height="2"/> <binding destination="-2" name="editable" keyPath="self.activityInProgress" id="qG8-46-bev">
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <dictionary key="options">
<tableViewGridLines key="gridStyleMask" vertical="YES"/> <string key="NSValueTransformerName">NSNegateBoolean</string>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/> </dictionary>
<tableColumns> </binding>
<tableColumn identifier="availableTimezones" editable="NO" width="326" minWidth="40" maxWidth="1000" id="48H-5i-utq"> </connections>
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Places"> </searchField>
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="QRU-bQ-qf9">
<font key="font" size="13" name="SFUIDisplay-Light"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
</tableColumns>
<connections>
<binding destination="-2" name="doubleClickTarget" keyPath="self" id="nBJ-qr-qEf">
<dictionary key="options">
<string key="NSSelectorName">addToFavorites:</string>
</dictionary>
</binding>
<binding destination="-2" name="enabled" keyPath="self.activityInProgress" id="Xk8-FS-aWk">
<dictionary key="options">
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
<outlet property="dataSource" destination="-2" id="86g-xx-hg5"/>
<outlet property="delegate" destination="-2" id="i7A-WW-A7a"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<constraints>
<constraint firstAttribute="height" constant="257" id="SrA-bR-iMr"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="Ge2-Rs-CZ1">
<rect key="frame" x="0.0" y="241" width="329" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="fHR-IX-Phl">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="85y-4a-860">
<rect key="frame" x="0.0" y="0.0" width="329" height="23"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
</scrollView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KFC-NV-5A3"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KFC-NV-5A3">
<rect key="frame" x="102" y="4" width="230" height="20"/> <rect key="frame" x="102" y="4" width="230" height="20"/>
<constraints> <constraints>
@ -210,8 +178,8 @@ CA
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Wb6-yr-Pw4"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Wb6-yr-Pw4">
<rect key="frame" x="11" y="124" width="321" height="20"/> <rect key="frame" x="11" y="118" width="321" height="20"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="20" id="QQQ-at-c1H"/> <constraint firstAttribute="height" constant="20" id="QQQ-at-c1H"/>
</constraints> </constraints>
@ -221,8 +189,8 @@ CA
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" misplaced="YES" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="ifx-PO-gfq"> <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="164" y="149" width="16" height="16"/> <rect key="frame" x="164" y="143" width="16" height="16"/>
<connections> <connections>
<binding destination="-2" name="hidden" keyPath="self.activityInProgress" id="9pA-XX-dhd"> <binding destination="-2" name="hidden" keyPath="self.activityInProgress" id="9pA-XX-dhd">
<dictionary key="options"> <dictionary key="options">
@ -265,29 +233,107 @@ CA
</binding> </binding>
</connections> </connections>
</button> </button>
<searchField toolTip="Search a timezone" wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="biT-6m-ElR"> <segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MiN-SF-nnU">
<rect key="frame" x="8" y="288" width="329" height="24"/> <rect key="frame" x="6" y="257" width="294" height="24"/>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" focusRingType="none" placeholderString="Enter a city, state, country name" drawsBackground="YES" usesSingleLineMode="YES" id="ijc-z6-99E"> <constraints>
<font key="font" size="13" name="SFUIDisplay-Light"/> <constraint firstAttribute="width" constant="290" id="bEt-xB-Cf4"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <constraint firstAttribute="height" constant="21" id="uOZ-MR-dr4"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </constraints>
</searchFieldCell> <segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="P1v-7w-asy">
<font key="font" size="12" name="SFUIDisplay-Regular"/>
<segments>
<segment label="Search By City" width="144" selected="YES"/>
<segment label="Search by Timezone(s)" width="143" tag="1"/>
</segments>
</segmentedCell>
<connections> <connections>
<action selector="filterArray:" target="-2" id="MWr-sX-24E"/> <action selector="searchOptions:" target="-2" id="gSx-X9-eBQ"/>
<binding destination="-2" name="editable" keyPath="self.activityInProgress" id="qG8-46-bev">
<dictionary key="options">
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
</connections> </connections>
</searchField> </segmentedControl>
<scrollView focusRingType="none" borderType="none" autohidesScrollers="YES" horizontalLineScroll="22" horizontalPageScroll="10" verticalLineScroll="22" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LM9-75-vkc">
<rect key="frame" x="8" y="28" width="329" height="223"/>
<clipView key="contentView" id="Z7L-Ef-90Z">
<rect key="frame" x="0.0" y="0.0" width="329" height="223"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="20" headerView="85y-4a-860" id="Q0t-hQ-orw">
<rect key="frame" x="0.0" y="0.0" width="329" height="200"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<tableViewGridLines key="gridStyleMask" vertical="YES"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="availableTimezones" editable="NO" width="236" minWidth="200" maxWidth="1000" id="48H-5i-utq">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Places/Timezone(s)">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="QRU-bQ-qf9">
<font key="font" size="13" name="SFUIDisplay-Light"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<connections>
<binding destination="-2" name="headerTitle" keyPath="self.columnName" id="7nT-oz-EFo"/>
</connections>
</tableColumn>
<tableColumn identifier="abbreviation" editable="NO" width="87" minWidth="70" maxWidth="100" id="V1c-xe-G2h">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Abbreviation">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="j4V-8w-sXt">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
</tableColumns>
<connections>
<binding destination="-2" name="doubleClickTarget" keyPath="self" id="nBJ-qr-qEf">
<dictionary key="options">
<string key="NSSelectorName">addToFavorites:</string>
</dictionary>
</binding>
<binding destination="-2" name="enabled" keyPath="self.activityInProgress" id="Xk8-FS-aWk">
<dictionary key="options">
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
<outlet property="dataSource" destination="-2" id="86g-xx-hg5"/>
<outlet property="delegate" destination="-2" id="i7A-WW-A7a"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="Ge2-Rs-CZ1">
<rect key="frame" x="0.0" y="208" width="329" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="fHR-IX-Phl">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="85y-4a-860">
<rect key="frame" x="0.0" y="0.0" width="329" height="23"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
</scrollView>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="KFC-NV-5A3" firstAttribute="leading" secondItem="cyZ-cL-S7a" secondAttribute="trailing" constant="4" id="1i8-FW-qYz"/> <constraint firstItem="KFC-NV-5A3" firstAttribute="leading" secondItem="cyZ-cL-S7a" secondAttribute="trailing" constant="4" id="1i8-FW-qYz"/>
<constraint firstItem="MiN-SF-nnU" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="9Ha-gC-PU5"/>
<constraint firstAttribute="trailing" secondItem="KFC-NV-5A3" secondAttribute="trailing" constant="15" id="B6V-vn-THO"/> <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 firstItem="MiN-SF-nnU" firstAttribute="top" secondItem="biT-6m-ElR" secondAttribute="bottom" constant="8" id="Cjb-kq-geP"/>
<constraint firstItem="Wb6-yr-Pw4" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="13" id="Ezn-kD-zu1"/> <constraint firstItem="Wb6-yr-Pw4" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="13" id="Ezn-kD-zu1"/>
<constraint firstAttribute="bottom" secondItem="KFC-NV-5A3" secondAttribute="bottom" constant="4" id="FWx-F1-VK8"/> <constraint firstAttribute="bottom" secondItem="KFC-NV-5A3" secondAttribute="bottom" constant="4" id="FWx-F1-VK8"/>
<constraint firstItem="hp6-CH-WJs" firstAttribute="top" secondItem="LM9-75-vkc" secondAttribute="bottom" constant="5" id="Kpp-JH-4vn"/>
<constraint firstItem="hp6-CH-WJs" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="Oir-hL-Og8"/> <constraint firstItem="hp6-CH-WJs" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="Oir-hL-Og8"/>
<constraint firstItem="Wb6-yr-Pw4" firstAttribute="top" secondItem="ifx-PO-gfq" secondAttribute="bottom" constant="5" id="Pha-iy-RTE"/> <constraint firstItem="Wb6-yr-Pw4" firstAttribute="top" secondItem="ifx-PO-gfq" secondAttribute="bottom" constant="5" id="Pha-iy-RTE"/>
<constraint firstItem="ifx-PO-gfq" firstAttribute="centerX" secondItem="Q0t-hQ-orw" secondAttribute="centerX" id="QOS-0E-N10"/> <constraint firstItem="ifx-PO-gfq" firstAttribute="centerX" secondItem="Q0t-hQ-orw" secondAttribute="centerX" id="QOS-0E-N10"/>
@ -295,10 +341,12 @@ CA
<constraint firstAttribute="trailing" secondItem="Wb6-yr-Pw4" secondAttribute="trailing" constant="15" id="RgE-qx-qrq"/> <constraint firstAttribute="trailing" secondItem="Wb6-yr-Pw4" secondAttribute="trailing" constant="15" id="RgE-qx-qrq"/>
<constraint firstItem="biT-6m-ElR" firstAttribute="top" secondItem="kXo-nl-oxR" secondAttribute="top" constant="8" id="Y7N-oR-3KY"/> <constraint firstItem="biT-6m-ElR" firstAttribute="top" secondItem="kXo-nl-oxR" secondAttribute="top" constant="8" id="Y7N-oR-3KY"/>
<constraint firstItem="LM9-75-vkc" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="ZJc-ws-AZR"/> <constraint firstItem="LM9-75-vkc" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="ZJc-ws-AZR"/>
<constraint firstAttribute="trailing" secondItem="biT-6m-ElR" secondAttribute="trailing" constant="8" id="bKu-IQ-cX1"/>
<constraint firstItem="cyZ-cL-S7a" firstAttribute="leading" secondItem="hp6-CH-WJs" secondAttribute="trailing" constant="2" id="g8m-TW-fLo"/> <constraint firstItem="cyZ-cL-S7a" firstAttribute="leading" secondItem="hp6-CH-WJs" secondAttribute="trailing" constant="2" id="g8m-TW-fLo"/>
<constraint firstAttribute="bottom" secondItem="hp6-CH-WJs" secondAttribute="bottom" constant="5" id="hEn-h1-my5"/> <constraint firstAttribute="bottom" secondItem="hp6-CH-WJs" secondAttribute="bottom" constant="5" id="hEn-h1-my5"/>
<constraint firstItem="biT-6m-ElR" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="nhU-xR-AW2"/> <constraint firstItem="biT-6m-ElR" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="nhU-xR-AW2"/>
<constraint firstAttribute="trailing" secondItem="LM9-75-vkc" secondAttribute="trailing" constant="8" id="pMs-Ol-hsh"/> <constraint firstAttribute="trailing" secondItem="LM9-75-vkc" secondAttribute="trailing" constant="8" id="pMs-Ol-hsh"/>
<constraint firstItem="LM9-75-vkc" firstAttribute="top" secondItem="MiN-SF-nnU" secondAttribute="bottom" constant="8" id="q84-IW-wwg"/>
<constraint firstItem="Wb6-yr-Pw4" firstAttribute="centerY" secondItem="Q0t-hQ-orw" secondAttribute="centerY" id="uio-eQ-cpc"/> <constraint firstItem="Wb6-yr-Pw4" firstAttribute="centerY" secondItem="Q0t-hQ-orw" secondAttribute="centerY" id="uio-eQ-cpc"/>
</constraints> </constraints>
</view> </view>

1
Clocker/Preferences/CLPreferencesViewController.h

@ -20,6 +20,7 @@ typedef enum : NSUInteger {
@property (atomic, assign) BOOL launchOnLogin; @property (atomic, assign) BOOL launchOnLogin;
@property (nonatomic, strong) NSMutableArray *timeZoneArray; @property (nonatomic, strong) NSMutableArray *timeZoneArray;
@property (nonatomic, strong) NSMutableArray *timeZoneFilteredArray; @property (nonatomic, strong) NSMutableArray *timeZoneFilteredArray;
@property (nonatomic, strong) NSString *columnName;
@property (atomic, strong) NSArray *themes; @property (atomic, strong) NSArray *themes;
@property (nonatomic, strong) NSURLSessionDataTask *dataTask; @property (nonatomic, strong) NSURLSessionDataTask *dataTask;

13
Clocker/Preferences/CLPreferencesViewController.m

@ -43,6 +43,7 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?";
@property (weak) IBOutlet NSSearchField *searchField; @property (weak) IBOutlet NSSearchField *searchField;
@property (weak) IBOutlet NSTextField *messageLabel; @property (weak) IBOutlet NSTextField *messageLabel;
@property (weak) IBOutlet NSSegmentedControl *searchCriteria; @property (weak) IBOutlet NSSegmentedControl *searchCriteria;
@property (weak) IBOutlet NSTableColumn *abbreviation;
@end @end
@ -76,6 +77,8 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?";
//Register for drag and drop //Register for drag and drop
[self.timezoneTableView registerForDraggedTypes: [NSArray arrayWithObject: CLDragSessionKey]]; [self.timezoneTableView registerForDraggedTypes: [NSArray arrayWithObject: CLDragSessionKey]];
self.columnName = @"Place(s)";
self.abbreviation.hidden = YES;
// Do view setup here. // Do view setup here.
} }
@ -409,6 +412,12 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?";
- (IBAction)filterArray:(id)sender - (IBAction)filterArray:(id)sender
{ {
if (self.searchCriteria.selectedSegment == 1)
{
[self filterTimezoneArray:sender];
return;
}
[self clearLabel]; [self clearLabel];
self.filteredArray = [NSMutableArray array]; self.filteredArray = [NSMutableArray array];
@ -733,11 +742,15 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?";
if (self.searchCriteria.selectedSegment == 0) if (self.searchCriteria.selectedSegment == 0)
{ {
self.searchField.placeholderString = @"Enter a city, state or country name"; self.searchField.placeholderString = @"Enter a city, state or country name";
self.columnName = @"Place(s)";
self.abbreviation.hidden = YES;
} }
else else
{ {
self.timeZoneArray = [NSMutableArray arrayWithArray:[NSTimeZone knownTimeZoneNames]]; self.timeZoneArray = [NSMutableArray arrayWithArray:[NSTimeZone knownTimeZoneNames]];
self.searchField.placeholderString = @"Enter a timezone name"; self.searchField.placeholderString = @"Enter a timezone name";
self.columnName = @"Timezone(s)";
self.abbreviation.hidden = NO;
} }
self.filteredArray = [NSMutableArray new]; self.filteredArray = [NSMutableArray new];

Loading…
Cancel
Save