Browse Source

stuff.

pull/92/head
Abhishek 4 years ago
parent
commit
19682c8160
  1. 5
      Clocker/Panel/Data Layer/TimezoneData.swift
  2. 2
      Clocker/Panel/Notes Popover/NotesPopover.swift
  3. 60
      Clocker/Panel/Notes Popover/NotesPopover.xib

5
Clocker/Panel/Data Layer/TimezoneData.swift

@ -352,10 +352,7 @@ class TimezoneData: NSObject, NSCoding {
func timezoneFormat() -> String { func timezoneFormat() -> String {
let chosenDefault = DataStore.shared().timezoneFormat() let chosenDefault = DataStore.shared().timezoneFormat()
let currentValue = values[chosenDefault] ?? DateFormat.twelveHour return values[chosenDefault] ?? DateFormat.twelveHour
Swift.print("Format is \(currentValue)")
return currentValue
// var timeFormat = DateFormat.twentyFourHour // var timeFormat = DateFormat.twentyFourHour
// //

2
Clocker/Panel/Notes Popover/NotesPopover.swift

@ -36,8 +36,6 @@ class NotesPopover: NSViewController {
@IBOutlet var timeFormatControl: NSSegmentedControl! @IBOutlet var timeFormatControl: NSSegmentedControl!
@IBOutlet var secondsFormatControl: NSSegmentedControl!
@IBOutlet var notesTextView: TextViewWithPlaceholder! @IBOutlet var notesTextView: TextViewWithPlaceholder!
override func viewDidLoad() { override func viewDidLoad() {

60
Clocker/Panel/Notes Popover/NotesPopover.xib

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17132" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies> <dependencies>
<deployment identifier="macosx"/> <deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17132"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
@ -16,7 +16,6 @@
<outlet property="remindersButton" destination="9hd-54-hYl" id="UX2-3v-MSX"/> <outlet property="remindersButton" destination="9hd-54-hYl" id="UX2-3v-MSX"/>
<outlet property="saveButton" destination="qgx-Yf-bP8" id="fAe-wb-MiA"/> <outlet property="saveButton" destination="qgx-Yf-bP8" id="fAe-wb-MiA"/>
<outlet property="scriptExecutionIndicator" destination="zMZ-FX-ZI4" id="me0-n8-iEV"/> <outlet property="scriptExecutionIndicator" destination="zMZ-FX-ZI4" id="me0-n8-iEV"/>
<outlet property="secondsFormatControl" destination="eiB-dp-56X" id="Trg-te-ap1"/>
<outlet property="setReminderCheckbox" destination="4qH-g6-DPb" id="ToC-jq-tfe"/> <outlet property="setReminderCheckbox" destination="4qH-g6-DPb" id="ToC-jq-tfe"/>
<outlet property="timeFormatControl" destination="seL-7y-MOc" id="mfh-v1-uhs"/> <outlet property="timeFormatControl" destination="seL-7y-MOc" id="mfh-v1-uhs"/>
<outlet property="timeFormatTweakingView" destination="Rxa-0J-YeW" id="1hi-JL-Xcx"/> <outlet property="timeFormatTweakingView" destination="Rxa-0J-YeW" id="1hi-JL-Xcx"/>
@ -25,15 +24,15 @@
</customObject> </customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView wantsLayer="YES" id="Hz6-mo-xeY"> <customView wantsLayer="YES" misplaced="YES" id="Hz6-mo-xeY">
<rect key="frame" x="0.0" y="0.0" width="300" height="357"/> <rect key="frame" x="0.0" y="0.0" width="300" height="297"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews> <subviews>
<stackView distribution="fill" orientation="vertical" alignment="centerX" spacing="0.0" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LIg-k5-T3T"> <stackView distribution="fill" orientation="vertical" alignment="centerX" spacing="0.0" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LIg-k5-T3T">
<rect key="frame" x="0.0" y="0.0" width="300" height="357"/> <rect key="frame" x="0.0" y="0.0" width="300" height="297"/>
<subviews> <subviews>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="SGQ-TJ-HMl"> <customView translatesAutoresizingMaskIntoConstraints="NO" id="SGQ-TJ-HMl">
<rect key="frame" x="0.0" y="267" width="300" height="90"/> <rect key="frame" x="0.0" y="207" width="300" height="90"/>
<subviews> <subviews>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0Ii-Hg-QWF"> <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0Ii-Hg-QWF">
<rect key="frame" x="18" y="35" width="270" height="30"/> <rect key="frame" x="18" y="35" width="270" height="30"/>
@ -124,7 +123,7 @@
</constraints> </constraints>
</customView> </customView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="oyr-RC-N9X"> <customView translatesAutoresizingMaskIntoConstraints="NO" id="oyr-RC-N9X">
<rect key="frame" x="0.0" y="197" width="300" height="70"/> <rect key="frame" x="0.0" y="137" width="300" height="70"/>
<subviews> <subviews>
<datePicker verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BTo-6Z-o0e"> <datePicker verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BTo-6Z-o0e">
<rect key="frame" x="106" y="39" width="186" height="27"/> <rect key="frame" x="106" y="39" width="186" height="27"/>
@ -153,7 +152,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5UW-2m-WFy"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5UW-2m-WFy">
<rect key="frame" x="104" y="9" width="189" height="25"/> <rect key="frame" x="103" y="8" width="191" height="26"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="21" id="Lbb-u5-8M1"/> <constraint firstAttribute="height" constant="21" id="Lbb-u5-8M1"/>
</constraints> </constraints>
@ -184,7 +183,7 @@
</constraints> </constraints>
</customView> </customView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Rxa-0J-YeW"> <customView translatesAutoresizingMaskIntoConstraints="NO" id="Rxa-0J-YeW">
<rect key="frame" x="0.0" y="137" width="300" height="60"/> <rect key="frame" x="0.0" y="77" width="300" height="60"/>
<subviews> <subviews>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="seL-7y-MOc"> <segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="seL-7y-MOc">
<rect key="frame" x="18" y="11" width="265" height="24"/> <rect key="frame" x="18" y="11" width="265" height="24"/>
@ -201,7 +200,7 @@
</connections> </connections>
</segmentedControl> </segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Wqz-cF-lhm"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Wqz-cF-lhm">
<rect key="frame" x="18" y="36" width="274" height="14"/> <rect key="frame" x="18" y="36" width="274" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="Timezone Format" id="JnF-g8-GLM"> <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="Timezone Format" id="JnF-g8-GLM">
<font key="font" usesAppearanceFont="YES"/> <font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
@ -220,43 +219,6 @@
<constraint firstAttribute="width" constant="300" id="xeM-Ue-etB"/> <constraint firstAttribute="width" constant="300" id="xeM-Ue-etB"/>
</constraints> </constraints>
</customView> </customView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="pIj-e1-8y2">
<rect key="frame" x="0.0" y="77" width="300" height="60"/>
<subviews>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eiB-dp-56X">
<rect key="frame" x="18" y="11" width="265" height="24"/>
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="E2D-Y2-kok">
<font key="font" size="12" name="Avenir-Book"/>
<segments>
<segment label="Yes" width="86"/>
<segment label="No" width="86" tag="1"/>
<segment label="Global" width="85" selected="YES"/>
</segments>
</segmentedCell>
<connections>
<action selector="customizeSecondsFormat:" target="-2" id="xJN-5k-DaS"/>
</connections>
</segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WVk-sH-CqF">
<rect key="frame" x="18" y="36" width="274" height="14"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="Display Seconds" id="lCg-ZI-gIk">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="eiB-dp-56X" secondAttribute="trailing" constant="19" id="8oV-s6-Rrd"/>
<constraint firstAttribute="height" constant="60" id="CRo-FH-m9V"/>
<constraint firstItem="eiB-dp-56X" firstAttribute="leading" secondItem="pIj-e1-8y2" secondAttribute="leading" constant="20" id="J1Q-fm-hfX"/>
<constraint firstAttribute="bottom" secondItem="eiB-dp-56X" secondAttribute="bottom" constant="12" id="SKm-79-Rau"/>
<constraint firstItem="eiB-dp-56X" firstAttribute="top" secondItem="WVk-sH-CqF" secondAttribute="bottom" constant="2" id="aSa-Fz-Iu3"/>
<constraint firstAttribute="width" constant="300" id="nQb-1g-SNX"/>
<constraint firstAttribute="trailing" secondItem="WVk-sH-CqF" secondAttribute="trailing" constant="10" id="pZi-8V-Pah"/>
<constraint firstItem="WVk-sH-CqF" firstAttribute="leading" secondItem="eiB-dp-56X" secondAttribute="leading" id="yuf-gH-ud1"/>
</constraints>
</customView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="yYA-ih-eGS" userLabel="Notes "> <customView translatesAutoresizingMaskIntoConstraints="NO" id="yYA-ih-eGS" userLabel="Notes ">
<rect key="frame" x="0.0" y="35" width="300" height="42"/> <rect key="frame" x="0.0" y="35" width="300" height="42"/>
<subviews> <subviews>
@ -371,7 +333,6 @@
<integer value="1000"/> <integer value="1000"/>
<integer value="1000"/> <integer value="1000"/>
<integer value="1000"/> <integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities> </visibilityPriorities>
<customSpacing> <customSpacing>
<real value="3.4028234663852886e+38"/> <real value="3.4028234663852886e+38"/>
@ -379,7 +340,6 @@
<real value="3.4028234663852886e+38"/> <real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/> <real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/> <real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing> </customSpacing>
</stackView> </stackView>
</subviews> </subviews>

Loading…
Cancel
Save