Welcome window now displays a list of recent documents.

also the window now gets closed when a document is loaded
This commit is contained in:
Michael Starke
2018-09-28 16:49:11 +02:00
parent 5aacbc66fe
commit 66118d50c3
19 changed files with 319 additions and 160 deletions

View File

@@ -0,0 +1,201 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14313.18"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="MPWelcomeViewController">
<connections>
<outlet property="tableView" destination="51b-Ql-3gM" id="g2f-YT-q5R"/>
<outlet property="view" destination="9Nv-Zl-Z9p" id="ySe-F6-puU"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<view id="9Nv-Zl-Z9p">
<rect key="frame" x="0.0" y="0.0" width="528" height="300"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView orientation="horizontal" alignment="centerY" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ITj-5P-sn9">
<rect key="frame" x="20" y="0.0" width="508" height="300"/>
<middleViews>
<stackView orientation="vertical" alignment="centerX" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jd3-xw-cZP">
<rect key="frame" x="143" y="0.0" width="222" height="300"/>
<middleViews>
<imageView misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VWi-da-LGh">
<rect key="frame" x="47" y="105" width="128" height="128"/>
<constraints>
<constraint firstAttribute="height" constant="128" id="T0d-gp-edr"/>
<constraint firstAttribute="width" constant="128" id="Xdf-jE-D9H"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="MacPassAppIcon" id="9f2-Co-St2"/>
</imageView>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EEg-rH-sPx">
<rect key="frame" x="-2" y="68" width="226" height="29"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Welcome to MacPass" id="zdv-z8-khG">
<font key="font" metaFont="system" size="24"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</middleViews>
<endViews>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MmF-PL-dgZ">
<rect key="frame" x="39" y="22" width="144" height="32"/>
<buttonCell key="cell" type="push" title="Open Database…" bezelStyle="rounded" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Jj3-zy-gaz">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="openDatabase:" target="-1" id="iC6-yP-ZKT"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="IRO-Hz-Zjp">
<rect key="frame" x="26" y="-7" width="170" height="32"/>
<buttonCell key="cell" type="push" title="Create new Database" bezelStyle="rounded" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Vxx-Ql-eI5">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="createNewDatabase:" target="-1" id="hbV-Rz-x5g"/>
</connections>
</button>
</endViews>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="300" id="f86-vL-FmV"/>
</constraints>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</middleViews>
<endViews>
<scrollView misplaced="YES" autohidesScrollers="YES" horizontalLineScroll="40" horizontalPageScroll="10" verticalLineScroll="40" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eUA-6g-T1O">
<rect key="frame" x="373" y="0.0" width="135" height="300"/>
<clipView key="contentView" id="0Kf-Fq-by2">
<rect key="frame" x="1" y="1" width="133" height="298"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="38" rowSizeStyle="automatic" viewBased="YES" id="51b-Ql-3gM">
<rect key="frame" x="0.0" y="0.0" width="133" height="298"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn width="130" minWidth="40" maxWidth="1000" id="oLj-wZ-syY">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
<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="Fbl-HT-XIu">
<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"/>
<prototypeCellViews>
<tableCellView id="6UF-Gr-4nf">
<rect key="frame" x="1" y="1" width="130" height="38"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Kko-1G-JNn">
<rect key="frame" x="2" y="3" width="32" height="32"/>
<constraints>
<constraint firstAttribute="width" secondItem="Kko-1G-JNn" secondAttribute="height" multiplier="1:1" id="DCx-UU-29t"/>
<constraint firstAttribute="height" constant="32" id="tUG-uX-FuQ"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSActionTemplate" id="9TF-9t-7gd"/>
</imageView>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Kso-jb-pRH">
<rect key="frame" x="39" y="3" width="91" height="32"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="vzM-ly-CYn">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="6UF-Gr-4nf" name="value" keyPath="objectValue" id="xQO-gD-dYm"/>
</connections>
</textField>
</subviews>
<constraints>
<constraint firstItem="Kso-jb-pRH" firstAttribute="centerY" secondItem="6UF-Gr-4nf" secondAttribute="centerY" id="EFe-Eu-cwW"/>
<constraint firstItem="Kso-jb-pRH" firstAttribute="leading" secondItem="Kko-1G-JNn" secondAttribute="trailing" constant="7" id="Jlp-gO-6rv"/>
<constraint firstItem="Kso-jb-pRH" firstAttribute="top" secondItem="Kko-1G-JNn" secondAttribute="top" id="KY0-l7-LXd"/>
<constraint firstItem="Kko-1G-JNn" firstAttribute="leading" secondItem="6UF-Gr-4nf" secondAttribute="leading" constant="2" id="RV0-o5-iyA"/>
<constraint firstItem="Kso-jb-pRH" firstAttribute="bottom" secondItem="Kko-1G-JNn" secondAttribute="bottom" id="d6U-3y-ffn"/>
<constraint firstAttribute="trailing" secondItem="Kso-jb-pRH" secondAttribute="trailing" constant="2" id="ptI-vC-fK9"/>
</constraints>
<connections>
<outlet property="imageView" destination="Kko-1G-JNn" id="AvW-EL-9Rw"/>
<outlet property="textField" destination="Kso-jb-pRH" id="yWg-4p-sFp"/>
</connections>
</tableCellView>
</prototypeCellViews>
</tableColumn>
</tableColumns>
<connections>
<action trigger="doubleAction" selector="openRecentURL:" target="-2" id="kTu-60-aYp"/>
<outlet property="dataSource" destination="-2" id="pLD-5Q-GVH"/>
<outlet property="delegate" destination="-2" id="hO0-G9-RVy"/>
</connections>
</tableView>
</subviews>
</clipView>
<constraints>
<constraint firstAttribute="width" constant="200" id="R0Z-La-Y3C"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="bRy-ef-e76">
<rect key="frame" x="1" y="283" width="133" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="2e9-uR-dY7">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
</endViews>
<constraints>
<constraint firstAttribute="bottom" secondItem="jd3-xw-cZP" secondAttribute="bottom" constant="20" id="581-be-EbR"/>
<constraint firstItem="jd3-xw-cZP" firstAttribute="top" secondItem="ITj-5P-sn9" secondAttribute="top" constant="20" id="9he-mz-Ciw"/>
<constraint firstAttribute="bottom" secondItem="eUA-6g-T1O" secondAttribute="bottom" constant="-1" id="Ejt-qZ-puH"/>
<constraint firstAttribute="trailing" secondItem="eUA-6g-T1O" secondAttribute="trailing" constant="-1" id="PEw-In-uMJ"/>
<constraint firstItem="eUA-6g-T1O" firstAttribute="top" secondItem="ITj-5P-sn9" secondAttribute="top" constant="-1" id="piI-8Q-zsE"/>
</constraints>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="ITj-5P-sn9" secondAttribute="trailing" id="7Bo-Jl-7Zu"/>
<constraint firstItem="ITj-5P-sn9" firstAttribute="top" secondItem="9Nv-Zl-Z9p" secondAttribute="top" id="lrE-f8-tD5"/>
<constraint firstItem="ITj-5P-sn9" firstAttribute="leading" secondItem="9Nv-Zl-Z9p" secondAttribute="leading" constant="20" id="oWL-PJ-VCT"/>
<constraint firstAttribute="bottom" secondItem="ITj-5P-sn9" secondAttribute="bottom" id="syW-TO-uwv"/>
</constraints>
<point key="canvasLocation" x="-21" y="-483"/>
</view>
</objects>
<resources>
<image name="MacPassAppIcon" width="128" height="128"/>
<image name="NSActionTemplate" width="14" height="14"/>
</resources>
</document>