began extracting Autotypecandidate selection to separate controller

This commit is contained in:
michael starke
2017-10-26 19:34:09 +02:00
parent 991e7eb763
commit d6f4411313
7 changed files with 265 additions and 38 deletions

View File

@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13196" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13196"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="MPAutotypeCandidateSelectionViewController">
<connections>
<outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView id="Hz6-mo-xeY">
<rect key="frame" x="0.0" y="0.0" width="480" height="375"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<scrollView wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7cB-re-3ys">
<rect key="frame" x="20" y="61" width="440" height="252"/>
<clipView key="contentView" id="WSc-o2-GsZ">
<rect key="frame" x="1" y="0.0" width="438" height="251"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnSelection="YES" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" headerView="Ixq-CN-2h1" viewBased="YES" id="Ih2-lo-t2W">
<rect key="frame" x="0.0" y="0.0" width="438" height="228"/>
<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="116" minWidth="40" maxWidth="1000" id="wTy-0L-yzY">
<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="PKW-gr-yqN">
<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="emA-5O-NDD">
<rect key="frame" x="1" y="1" width="116" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fQ0-QM-oX6">
<rect key="frame" x="0.0" y="0.0" width="116" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="UEw-gx-717">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<connections>
<outlet property="textField" destination="fQ0-QM-oX6" id="Apx-6T-sOh"/>
</connections>
</tableCellView>
</prototypeCellViews>
</tableColumn>
</tableColumns>
<connections>
<outlet property="dataSource" destination="-2" id="4ld-qs-eNP"/>
<outlet property="delegate" destination="-2" id="ibb-G8-tPQ"/>
</connections>
</tableView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="Xgd-fL-vdl">
<rect key="frame" x="1" y="215" width="438" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="5cX-o7-7ZJ">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="Ixq-CN-2h1">
<rect key="frame" x="0.0" y="0.0" width="438" height="23"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
</scrollView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="330" translatesAutoresizingMaskIntoConstraints="NO" id="kDw-2l-7gQ">
<rect key="frame" x="18" y="321" width="444" height="34"/>
<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"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zBX-HB-tR7">
<rect key="frame" x="236" y="13" width="82" height="32"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="60p-7v-Nje">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
</buttonCell>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="V5B-Qq-GN8">
<rect key="frame" x="318" y="13" width="148" height="32"/>
<buttonCell key="cell" type="push" title="Perform Autotype" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="w7H-hx-CUF">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
DQ
</string>
</buttonCell>
</button>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="V5B-Qq-GN8" secondAttribute="bottom" constant="20" id="FMz-e1-hOB"/>
<constraint firstItem="kDw-2l-7gQ" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="GcO-tk-i2z"/>
<constraint firstItem="kDw-2l-7gQ" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" symbolic="YES" id="OHm-6j-uPs"/>
<constraint firstAttribute="trailing" secondItem="V5B-Qq-GN8" secondAttribute="trailing" constant="20" symbolic="YES" id="SRs-hx-av7"/>
<constraint firstItem="V5B-Qq-GN8" firstAttribute="leading" secondItem="zBX-HB-tR7" secondAttribute="trailing" constant="12" symbolic="YES" id="UuF-Ba-HS5"/>
<constraint firstItem="zBX-HB-tR7" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="ZNu-po-1u8"/>
<constraint firstItem="7cB-re-3ys" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="egY-ml-urP"/>
<constraint firstAttribute="trailing" secondItem="7cB-re-3ys" secondAttribute="trailing" constant="20" symbolic="YES" id="hqW-Hz-bFN"/>
<constraint firstItem="V5B-Qq-GN8" firstAttribute="baseline" secondItem="zBX-HB-tR7" secondAttribute="baseline" id="iAg-1w-h25"/>
<constraint firstItem="zBX-HB-tR7" firstAttribute="top" secondItem="7cB-re-3ys" secondAttribute="bottom" constant="20" symbolic="YES" id="onA-YV-ezJ"/>
<constraint firstItem="7cB-re-3ys" firstAttribute="top" secondItem="kDw-2l-7gQ" secondAttribute="bottom" constant="8" symbolic="YES" id="ss6-Ku-XPY"/>
<constraint firstAttribute="trailing" secondItem="kDw-2l-7gQ" secondAttribute="trailing" constant="20" symbolic="YES" id="zSz-fH-fVn"/>
</constraints>
<point key="canvasLocation" x="61" y="29.5"/>
</customView>
</objects>
</document>

View File

@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13196" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13196"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="MPAutotypeDaemon">
@@ -15,14 +16,14 @@
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Autotype Selection" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1">
<windowStyleMask key="styleMask" titled="YES"/>
<rect key="contentRect" x="196" y="240" width="370" height="156"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
<rect key="contentRect" x="196" y="240" width="229" height="459"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
<view key="contentView" id="2">
<rect key="frame" x="0.0" y="0.0" width="370" height="156"/>
<rect key="frame" x="0.0" y="0.0" width="353" height="156"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NdQ-vM-dHT">
<rect key="frame" x="123" y="13" width="82" height="32"/>
<rect key="frame" x="109" y="13" width="82" height="32"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="WJJ-kW-fak">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -35,7 +36,7 @@ Gw
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Jlm-i9-jVy">
<rect key="frame" x="205" y="13" width="151" height="32"/>
<rect key="frame" x="191" y="13" width="148" height="32"/>
<buttonCell key="cell" type="push" title="Perform Autotype" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="AER-eU-kcu">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -47,8 +48,24 @@ DQ
<action selector="performAutotypeWithSelectedMatch:" target="-2" id="vRo-HH-NIy"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="330" translatesAutoresizingMaskIntoConstraints="NO" id="q1d-ED-T5M">
<rect key="frame" x="18" y="102" width="317" height="34"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="There are multiple matches for the current window. Please select which match should be used." id="ehp-xc-B5g">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Epz-xU-9TM">
<rect key="frame" x="18" y="64" width="87" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Match to use:" id="pLz-Kc-yPh">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" horizontalCompressionResistancePriority="499" translatesAutoresizingMaskIntoConstraints="NO" id="tAw-72-pSm">
<rect key="frame" x="111" y="58" width="242" height="26"/>
<rect key="frame" x="109" y="58" width="227" height="26"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="TAr-ZQ-aDu">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
@@ -59,31 +76,17 @@ DQ
</menu>
</popUpButtonCell>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q1d-ED-T5M">
<rect key="frame" x="18" y="102" width="334" height="34"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="There are multiple matches for the current window. Please select which match should be used." id="ehp-xc-B5g">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Epz-xU-9TM">
<rect key="frame" x="18" y="64" width="89" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Match to use:" id="pLz-Kc-yPh">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="NdQ-vM-dHT" firstAttribute="top" secondItem="tAw-72-pSm" secondAttribute="bottom" constant="20" symbolic="YES" id="7nN-gT-KRY"/>
<constraint firstItem="tAw-72-pSm" firstAttribute="trailing" secondItem="Jlm-i9-jVy" secondAttribute="trailing" id="BUy-GV-a8U"/>
<constraint firstItem="tAw-72-pSm" firstAttribute="top" secondItem="q1d-ED-T5M" secondAttribute="bottom" constant="20" id="Bwf-bJ-2AY"/>
<constraint firstItem="Jlm-i9-jVy" firstAttribute="top" secondItem="tAw-72-pSm" secondAttribute="bottom" constant="20" symbolic="YES" id="CZ6-7H-g05"/>
<constraint firstItem="Jlm-i9-jVy" firstAttribute="leading" secondItem="NdQ-vM-dHT" secondAttribute="trailing" constant="12" symbolic="YES" id="DHs-Xz-gcZ"/>
<constraint firstAttribute="bottom" secondItem="NdQ-vM-dHT" secondAttribute="bottom" constant="20" symbolic="YES" id="Eua-I4-kKg"/>
<constraint firstAttribute="trailing" secondItem="tAw-72-pSm" secondAttribute="trailing" constant="20" symbolic="YES" id="ITA-QN-ZYj"/>
<constraint firstItem="tAw-72-pSm" firstAttribute="trailing" secondItem="q1d-ED-T5M" secondAttribute="trailing" id="MsD-dU-YC8"/>
<constraint firstItem="Epz-xU-9TM" firstAttribute="baseline" secondItem="tAw-72-pSm" secondAttribute="baseline" id="O99-nG-qmf"/>
<constraint firstAttribute="trailing" secondItem="Jlm-i9-jVy" secondAttribute="trailing" constant="20" symbolic="YES" id="QlH-af-YI1"/>
<constraint firstItem="NdQ-vM-dHT" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="2" secondAttribute="leading" constant="20" symbolic="YES" id="Rvr-iZ-RVe"/>
<constraint firstItem="Epz-xU-9TM" firstAttribute="leading" secondItem="q1d-ED-T5M" secondAttribute="leading" id="Vcg-aa-5pd"/>
<constraint firstAttribute="trailing" secondItem="q1d-ED-T5M" secondAttribute="trailing" constant="20" symbolic="YES" id="Wcu-aH-ONq"/>
<constraint firstItem="q1d-ED-T5M" firstAttribute="top" secondItem="2" secondAttribute="top" constant="20" symbolic="YES" id="eAk-Qk-bjO"/>
@@ -93,6 +96,7 @@ DQ
<constraint firstItem="tAw-72-pSm" firstAttribute="leading" secondItem="Epz-xU-9TM" secondAttribute="trailing" constant="8" symbolic="YES" id="wJ9-T1-rT8"/>
</constraints>
</view>
<point key="canvasLocation" x="-12.5" y="106.5"/>
</window>
</objects>
</document>

View File

@@ -0,0 +1,15 @@
//
// MPAutotypeCandidateSelectionViewController.h
// MacPass
//
// Created by Michael Starke on 26.10.17.
// Copyright © 2017 HicknHack Software GmbH. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface MPAutotypeCandidateSelectionViewController : NSViewController
@property (copy) NSArray *candidates;
@end

View File

@@ -0,0 +1,40 @@
//
// MPAutotypeCandidateSelectionViewController.m
// MacPass
//
// Created by Michael Starke on 26.10.17.
// Copyright © 2017 HicknHack Software GmbH. All rights reserved.
//
#import "MPAutotypeCandidateSelectionViewController.h"
#import "MPAutotypeContext.h"
#import <KeePassKit/KeePassKit.h>
@interface MPAutotypeCandidateSelectionViewController () <NSTableViewDataSource, NSTableViewDelegate>
@end
@implementation MPAutotypeCandidateSelectionViewController
- (NSNibName)nibName {
return @"AutotypeCandidateSelectionViewController";
}
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView {
return self.candidates.count;
}
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
NSTableCellView *view = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self];
MPAutotypeContext *context = self.candidates[row];
view.textField.stringValue = context.entry.title;
view.imageView.image = context.entry.icon.image;
return view;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do view setup here.
}
@end

View File

@@ -32,6 +32,8 @@
#import "NSApplication+MPAdditions.h"
#import "MPAutotypeCandidateSelectionViewController.h"
#import "KeePassKit/KeePassKit.h"
#import "DDHotKeyCenter.h"
@@ -142,11 +144,13 @@ static MPAutotypeDaemon *_sharedInstance;
NSMenuItem *item = self.matchSelectionButton.selectedItem;
MPAutotypeContext *context = item.representedObject;
[self.matchSelectionWindow orderOut:self];
self.matchSelectionWindow = nil;
[self _performAutotypeForContext:context];
}
- (void)cancelAutotypeSelection:(id)sender {
[self.matchSelectionWindow orderOut:sender];
self.matchSelectionWindow = nil;
if(self.targetPID) {
[self _orderApplicationToFront:self.targetPID];
}
@@ -187,6 +191,9 @@ static MPAutotypeDaemon *_sharedInstance;
MPAutotypeContext *context = [self _autotypeContextForDocuments:documents forWindowTitle:self.targetWindowTitle preferredEntry:entryOrNil];
/* TODO: that's popping up if the mulit selection dialog goes up! */
if(self.matchSelectionWindow) {
return; // we present the match selection window, just return
}
if(!entryOrNil) {
NSUserNotification *notification = [[NSUserNotification alloc] init];
notification.title = NSApp.applicationName;
@@ -289,11 +296,18 @@ static MPAutotypeDaemon *_sharedInstance;
}
- (void)_presentSelectionWindow:(NSArray *)candidates {
if(!self.matchSelectionWindow) {
[[NSBundle mainBundle] loadNibNamed:@"AutotypeCandidateSelectionWindow" owner:self topLevelObjects:nil];
self.matchSelectionWindow.level = NSFloatingWindowLevel;
//[[NSBundle mainBundle] loadNibNamed:@"AutotypeCandidateSelectionWindow" owner:self topLevelObjects:nil];
self.matchSelectionWindow = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 100, 100) styleMask:NSWindowStyleMaskTitled backing:NSBackingStoreRetained defer:YES];
//self.matchSelectionWindow.level = NSFloatingWindowLevel;
MPAutotypeCandidateSelectionViewController *vc = [[MPAutotypeCandidateSelectionViewController alloc] init];
vc.candidates = candidates;
self.matchSelectionWindow.contentViewController = vc;
}
NSMenu *associationMenu = [[NSMenu alloc] init];
/*NSMenu *associationMenu = [[NSMenu alloc] init];
[associationMenu addItemWithTitle:NSLocalizedString(@"SELECT_AUTOTYPE_CANDIDATE", "Menu item for selection a single match from multiple Autotype matches") action:NULL keyEquivalent:@""];
[associationMenu addItem:[NSMenuItem separatorItem]];
associationMenu.autoenablesItems = NO;
@@ -313,6 +327,8 @@ static MPAutotypeDaemon *_sharedInstance;
}
}
self.matchSelectionButton.menu = associationMenu;
*/
[self.matchSelectionWindow center];
[self.matchSelectionWindow makeKeyAndOrderFront:self];
[NSApp activateIgnoringOtherApps:YES];
}

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13196" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12121"/>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13196"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -15,12 +16,12 @@
<window title="Password Generator" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<rect key="contentRect" x="196" y="240" width="338" height="216"/>
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
<view key="contentView" id="2">
<rect key="frame" x="0.0" y="0.0" width="338" height="216"/>
<autoresizingMask key="autoresizingMask"/>
</view>
<point key="canvasLocation" x="-74" y="-10"/>
<point key="canvasLocation" x="150" y="5"/>
</window>
</objects>
</document>