forked from MacPass/AutotypeURL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
248 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// ATUSettingsViewController.h | ||
// AutotypeURL | ||
// | ||
// Created by George Snow on 7/10/19. | ||
// Copyright © 2019 George Snow All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@class ATUAutotypeURL; | ||
|
||
@interface ATUSettingsViewController : NSViewController | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// | ||
// ATUSettingsViewController.m | ||
// AutotypeURL | ||
// | ||
// Created by George Snow on 7/10/19. | ||
// Copyright © 2019 George Snow All rights reserved. | ||
// | ||
|
||
#import "ATUSettingsViewController.h" | ||
#import "ATUAutotypeURL.h" | ||
|
||
@interface ATUSettingsViewController () | ||
|
||
@property (strong) IBOutlet NSButton *useCompleteURLAsWindowTitleButton; | ||
@property (strong) IBOutlet NSButton *useURLHostAsWindowTitleButton; | ||
|
||
- (IBAction)toggleWindowTitleBehaviour:(id)sender; | ||
|
||
@end | ||
|
||
@implementation ATUSettingsViewController | ||
|
||
- (void)dealloc { | ||
[self.useCompleteURLAsWindowTitleButton unbind:NSValueBinding]; | ||
} | ||
|
||
- (NSBundle *)nibBundle { | ||
return [NSBundle bundleForClass:self.class]; | ||
} | ||
|
||
- (NSString *)nibName { | ||
return @"AutotypeURLSettings"; | ||
} | ||
|
||
- (void)viewDidLoad { | ||
BOOL useCompletURL = [NSUserDefaults.standardUserDefaults boolForKey:kMPASettingsKeyFullMatch]; | ||
if(useCompletURL) { | ||
self.useCompleteURLAsWindowTitleButton.state = NSOnState; | ||
self.useURLHostAsWindowTitleButton.state = NSOffState; | ||
} | ||
else { | ||
self.useCompleteURLAsWindowTitleButton.state = NSOffState; | ||
self.useURLHostAsWindowTitleButton.state = NSOnState; | ||
} | ||
} | ||
|
||
- (void)toggleWindowTitleBehaviour:(id)sender { | ||
BOOL useCompletURL = self.useCompleteURLAsWindowTitleButton.state == NSOnState; | ||
[NSUserDefaults.standardUserDefaults setBool:useCompletURL forKey:kMPASettingsKeyFullMatch]; | ||
} | ||
|
||
|
||
@end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> | ||
<dependencies> | ||
<deployment identifier="macosx"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<customObject id="-2" userLabel="File's Owner" customClass="ATUSettingsViewController"> | ||
<connections> | ||
<outlet property="useCompleteURLAsWindowTitleButton" destination="Mlp-dR-3Eg" id="mzD-d8-rbG"/> | ||
<outlet property="useURLHostAsWindowTitleButton" destination="sx5-m1-nBn" id="myQ-CW-q2C"/> | ||
<outlet property="view" destination="Hz6-mo-xeY" id="ujE-Pk-8jr"/> | ||
</connections> | ||
</customObject> | ||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
<customObject id="-3" userLabel="Application" customClass="NSObject"/> | ||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Hz6-mo-xeY"> | ||
<rect key="frame" x="0.0" y="0.0" width="444" height="124"/> | ||
<subviews> | ||
<stackView orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" translatesAutoresizingMaskIntoConstraints="NO" id="b2a-03-dSA"> | ||
<rect key="frame" x="20" y="20" width="404" height="84"/> | ||
<beginningViews> | ||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sx5-m1-nBn"> | ||
<rect key="frame" x="-1" y="67" width="170" height="18"/> | ||
<buttonCell key="cell" type="radio" title="Use host as window title" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="UQ0-qc-9dN"> | ||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> | ||
<font key="font" metaFont="system"/> | ||
</buttonCell> | ||
<connections> | ||
<action selector="toggleWindowTitleBehaviour:" target="-2" id="aW3-FB-P3x"/> | ||
</connections> | ||
</button> | ||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3Vy-hB-Qm7"> | ||
<rect key="frame" x="-2" y="46" width="290" height="14"/> | ||
<textFieldCell key="cell" controlSize="small" lineBreakMode="clipping" title="https://sub.domain.com/some/path → sub.domain.com" id="BSO-Lz-Rbc"> | ||
<font key="font" metaFont="smallSystem"/> | ||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/> | ||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> | ||
</textFieldCell> | ||
</textField> | ||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Mlp-dR-3Eg"> | ||
<rect key="frame" x="-1" y="21" width="190" height="18"/> | ||
<buttonCell key="cell" type="radio" title="Use full URL as window title" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="v8M-pT-gr1"> | ||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> | ||
<font key="font" metaFont="system"/> | ||
</buttonCell> | ||
<connections> | ||
<action selector="toggleWindowTitleBehaviour:" target="-2" id="OJj-hO-vlC"/> | ||
</connections> | ||
</button> | ||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oY1-b8-nf7"> | ||
<rect key="frame" x="-2" y="0.0" width="388" height="14"/> | ||
<textFieldCell key="cell" controlSize="small" lineBreakMode="clipping" title="https://sub.domain.com/some/path → https://sub.domain.com/some/path" id="Qyx-Rx-Ngm"> | ||
<font key="font" metaFont="smallSystem"/> | ||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/> | ||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> | ||
</textFieldCell> | ||
</textField> | ||
</beginningViews> | ||
<constraints> | ||
<constraint firstItem="3Vy-hB-Qm7" firstAttribute="leading" secondItem="b2a-03-dSA" secondAttribute="leading" constant="20" id="mCa-PM-o58"/> | ||
<constraint firstItem="oY1-b8-nf7" firstAttribute="leading" secondItem="b2a-03-dSA" secondAttribute="leading" constant="20" id="pY2-T8-YhD"/> | ||
</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> | ||
</subviews> | ||
<constraints> | ||
<constraint firstItem="b2a-03-dSA" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="20" symbolic="YES" id="9QH-Aw-T0r"/> | ||
<constraint firstAttribute="trailing" secondItem="b2a-03-dSA" secondAttribute="trailing" constant="20" symbolic="YES" id="Ccz-6q-lG1"/> | ||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="b2a-03-dSA" secondAttribute="bottom" constant="20" symbolic="YES" id="XiH-Op-deT"/> | ||
<constraint firstItem="b2a-03-dSA" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" symbolic="YES" id="ddR-ia-qqg"/> | ||
</constraints> | ||
<point key="canvasLocation" x="116" y="-117"/> | ||
</customView> | ||
</objects> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.