Skip to content

Commit

Permalink
Key Loader Refactoring
Browse files Browse the repository at this point in the history
Use an explicit internal state machine instead of the callback based and
fairly unmaintained implicit one. This allows clearer modeling of state
transitions between different key types.
No longer grab focus, and only accept keyboard input when a password is
actually requested.
  • Loading branch information
cbreak-black committed Jun 1, 2020
1 parent d38c363 commit 3c7c795
Show file tree
Hide file tree
Showing 2 changed files with 243 additions and 118 deletions.
10 changes: 5 additions & 5 deletions ZetaWatch/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15705" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16097" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15705"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -832,7 +832,7 @@
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField hidden="YES" horizontalHuggingPriority="249" verticalHuggingPriority="750" verticalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="egb-Mb-iyZ">
<textField horizontalHuggingPriority="249" verticalHuggingPriority="750" verticalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="egb-Mb-iyZ">
<rect key="frame" x="114" y="22" width="277" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Status" id="Mwk-R6-lED">
<font key="font" metaFont="system"/>
Expand Down Expand Up @@ -949,7 +949,7 @@ Gw
<userDefaultsController representsSharedInstance="YES" id="oMO-Og-s5N"/>
<customObject id="7Va-uZ-m1K" customClass="SUUpdater"/>
<customView id="xBy-DS-Zxq" userLabel="QueryDialog">
<rect key="frame" x="0.0" y="1" width="555" height="115"/>
<rect key="frame" x="0.0" y="0.0" width="555" height="115"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VwX-rR-NXB" userLabel="QueryTextField">
Expand Down Expand Up @@ -1050,7 +1050,7 @@ Gw
<textField horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="KzI-U2-jrx">
<rect key="frame" x="92" y="61" width="443" height="166"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="9lS-cc-3KX">
<font key="font" metaFont="controlContent" size="11"/>
<font key="font" metaFont="message" size="11"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
Expand Down
Loading

0 comments on commit 3c7c795

Please sign in to comment.