Localized Autotype confirmation. Enhanced layout for window

When confirming, the table view only shows one row, when choosing, at most 5 rows are visible.
This commit is contained in:
Michael Starke
2020-12-22 23:42:50 +01:00
parent 68ccb8e1ad
commit 9fe9c6a41d
5 changed files with 26 additions and 26 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" 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>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12120"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -19,7 +19,7 @@
<rect key="frame" x="0.0" y="0.0" width="392" height="210"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<tokenField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jzn-UC-Ok8">
<tokenField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Jzn-UC-Ok8">
<rect key="frame" x="20" y="50" width="352" height="66"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="66" id="7rr-fC-NeH"/>
@@ -31,13 +31,13 @@
</tokenFieldCell>
</tokenField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lS4-1R-Bhp">
<rect key="frame" x="215" y="18" width="157" height="25"/>
<rect key="frame" x="215" y="19" width="157" height="23"/>
<buttonCell key="cell" type="roundTextured" title="Set Autotype Sequence" bezelStyle="texturedRounded" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="aOD-Ih-Sft">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7xF-eN-vs3">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7xF-eN-vs3">
<rect key="frame" x="18" y="176" width="207" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Available Commands and Placeholders" id="lug-97-H9D">
<font key="font" metaFont="smallSystem"/>
@@ -45,7 +45,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Kw-lW-ASe">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9Kw-lW-ASe">
<rect key="frame" x="18" y="124" width="107" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Autotype Sequence" id="8ny-Qk-Jvo">
<font key="font" metaFont="smallSystem"/>
@@ -53,7 +53,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<tokenField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k06-gn-ahB">
<tokenField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="k06-gn-ahB">
<rect key="frame" x="20" y="146" width="352" height="22"/>
<constraints>
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="400" id="can-wk-8oX"/>

View File

@@ -17,8 +17,8 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hz6-mo-xeY">
<rect key="frame" x="0.0" y="0.0" width="480" height="409"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Hz6-mo-xeY">
<rect key="frame" x="0.0" y="0.0" width="480" height="201"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zBX-HB-tR7">
<rect key="frame" x="236" y="13" width="82" height="32"/>
@@ -47,7 +47,7 @@ DQ
</connections>
</button>
<stackView distribution="fill" orientation="vertical" alignment="centerX" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="82Y-g7-4wV">
<rect key="frame" x="20" y="317" width="440" height="72"/>
<rect key="frame" x="20" y="109" width="440" height="72"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="bWJ-Ub-c10">
<rect key="frame" x="204" y="40" width="32" height="32"/>
@@ -57,7 +57,7 @@ DQ
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="NSApplicationIcon" id="d6x-JH-Lw2"/>
</imageView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kDw-2l-7gQ">
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="kDw-2l-7gQ">
<rect key="frame" x="-2" y="0.0" width="444" height="32"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="There are multiple matches for the current window. Please select which match should be used." id="gcf-gb-ZsF">
<font key="font" metaFont="system"/>
@@ -76,13 +76,13 @@ DQ
</customSpacing>
</stackView>
<scrollView wantsLayer="YES" verticalCompressionResistancePriority="250" autohidesScrollers="YES" horizontalLineScroll="38" horizontalPageScroll="10" verticalLineScroll="38" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7cB-re-3ys">
<rect key="frame" x="20" y="61" width="440" height="248"/>
<rect key="frame" x="20" y="61" width="440" height="40"/>
<clipView key="contentView" id="WSc-o2-GsZ">
<rect key="frame" x="1" y="1" width="438" height="246"/>
<rect key="frame" x="1" y="1" width="438" height="38"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="36" viewBased="YES" id="Ih2-lo-t2W">
<rect key="frame" x="0.0" y="0.0" width="438" height="246"/>
<rect key="frame" x="0.0" y="0.0" width="438" height="38"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -100,8 +100,8 @@ DQ
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
<prototypeCellViews>
<tableCellView misplaced="YES" id="vkI-FK-7wg" customClass="MPExtendedTableCellView">
<rect key="frame" x="1" y="1" width="435" height="17"/>
<tableCellView id="vkI-FK-7wg" customClass="MPExtendedTableCellView">
<rect key="frame" x="1" y="1" width="435" height="36"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Utl-Gl-ETE">
@@ -157,9 +157,6 @@ DQ
</tableView>
</subviews>
</clipView>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="108" id="0cD-ng-4sc"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="Xgd-fL-vdl">
<rect key="frame" x="1" y="235" width="92" height="16"/>
<autoresizingMask key="autoresizingMask"/>
@@ -184,7 +181,7 @@ DQ
<constraint firstItem="zBX-HB-tR7" firstAttribute="top" secondItem="7cB-re-3ys" secondAttribute="bottom" constant="20" symbolic="YES" id="onA-YV-ezJ"/>
<constraint firstItem="82Y-g7-4wV" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="uoN-Et-pWh"/>
</constraints>
<point key="canvasLocation" x="-353" y="-2707.5"/>
<point key="canvasLocation" x="-388" y="-2744"/>
</customView>
</objects>
<resources>

View File

@@ -56,10 +56,13 @@
if(self.candidates.count > 1) {
template = NSLocalizedString(@"AUTOTYPE_CANDIDATE_SELECTION_WINDOW_MESSAGE_%@_%@", "Message text in the autotype selection window. Placeholder is %1 - applicationName, %2 windowTitle");
self.messageTextField.stringValue = [NSString stringWithFormat:template, targetApplication.localizedName, self.environment.windowTitle];
NSInteger rows = MIN(self.candidates.count, 5);
[self.contextTableView.enclosingScrollView.heightAnchor constraintGreaterThanOrEqualToConstant:39 * rows].active = YES;
}
else {
template = NSLocalizedString(@"AUTOTYPE_CANDIDATE_CONFIRMATION_WINDOW_MESSAGE_%@_%@", "Message text in the autotype confirmation window. Placeholder is %1 - applicationName, %2 windowTitle");
self.messageTextField.stringValue = [NSString stringWithFormat:template, targetApplication.localizedName, self.environment.windowTitle];
[self.contextTableView.enclosingScrollView.heightAnchor constraintEqualToConstant:39].active = YES;
}
NSNotification *notification = [NSNotification notificationWithName:NSTableViewSelectionDidChangeNotification object:self.contextTableView];

View File

@@ -79,12 +79,12 @@
<gridCell row="hS6-e9-JPg" column="Ecc-pj-MX9" id="6MO-n5-2Cu">
<popUpButton key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="caF-Au-ey8">
<rect key="frame" x="107" y="53" width="95" height="25"/>
<popUpButtonCell key="cell" type="push" title="SHA-1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="4Bi-z2-2Oz" id="Rxs-11-LRy">
<popUpButtonCell key="cell" type="push" title="SHA-1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="4Bi-z2-2Oz" id="Rxs-11-LRy">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="zev-8W-Uhl">
<items>
<menuItem title="SHA-1" id="4Bi-z2-2Oz">
<menuItem title="SHA-1" state="on" id="4Bi-z2-2Oz">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem title="SHA-256" id="oW0-dE-qqs">
@@ -138,12 +138,12 @@
<gridCell row="0Jy-aF-Wst" column="Ecc-pj-MX9" id="gil-83-ris">
<popUpButton key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aa3-XV-Chc">
<rect key="frame" x="107" y="-3" width="53" height="25"/>
<popUpButtonCell key="cell" type="push" title="6" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="jz0-Sd-awx" id="rzY-5S-dIJ">
<popUpButtonCell key="cell" type="push" title="6" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="jz0-Sd-awx" id="rzY-5S-dIJ">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="XCv-uH-EcW">
<items>
<menuItem title="6" id="jz0-Sd-awx">
<menuItem title="6" state="on" id="jz0-Sd-awx">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem title="7" id="hz5-72-opf">

View File

@@ -96,10 +96,10 @@
"AUTOCREATE_TRASH_FOLDER" = "Create Automatically";
/* Message text in the autotype confirmation window. Placeholder is %1 - applicationName, %2 windowTitle */
"AUTOTYPE_CANDIDATE_CONFIRMATION_WINDOW_MESSAGE_%@_%@" = "AUTOTYPE_CANDIDATE_CONFIRMATION_WINDOW_MESSAGE_%1$@_%2$@";
"AUTOTYPE_CANDIDATE_CONFIRMATION_WINDOW_MESSAGE_%@_%@" = "Autotype has found a match for window \"%2$@\" of application \"%1$@\". Please confirm to continue the execution.";
/* Message text in the autotype selection window. Placeholder is %1 - applicationName, %2 windowTitle */
"AUTOTYPE_CANDIDATE_SELECTION_WINDOW_MESSAGE_%@_%@" = "There are multiple matches for the window %2$@ of application %1$@. Please select which match should be used.";
"AUTOTYPE_CANDIDATE_SELECTION_WINDOW_MESSAGE_%@_%@" = "There are multiple matches for the window \"%2$@\" of application \"%1$@\". Please select which match should be used.";
/* Window title for the stand-alone password creator window */
"AUTOTYPE_DOCTOR_RESULTS_WINDOW_TITLE" = "Autotype Doctor";