-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Johan Bloemberg
committed
Jan 5, 2019
1 parent
4822e8a
commit 52ff4ef
Showing
13 changed files
with
181 additions
and
25 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
6 changes: 0 additions & 6 deletions
6
WireGuardStatusbar.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,28 @@ | ||
// | ||
|
||
import Cocoa | ||
|
||
class Preferences: NSWindowController { | ||
override var windowNibName: String { | ||
return "PreferencesController" | ||
} | ||
|
||
// make sure window is always brought to the front when it is opened | ||
override func showWindow(_: Any?) { | ||
window?.center() | ||
window?.makeKeyAndOrderFront(nil) | ||
NSApp.activate(ignoringOtherApps: true) | ||
} | ||
|
||
// close on ⌘-w (required because app has no menubar with close window action) | ||
override func keyDown(with event: NSEvent) { | ||
if event.modifierFlags.contains(.command) && event.characters == "w" { | ||
window?.close() | ||
} | ||
} | ||
|
||
// close on esc key | ||
@objc func cancel(_: Any?) { | ||
window?.close() | ||
} | ||
} |
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,78 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> | ||
<dependencies> | ||
<deployment identifier="macosx"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<customObject id="-2" userLabel="File's Owner" customClass="PreferencesController" customModule="WireGuardStatusbar" customModuleProvider="target"> | ||
<connections> | ||
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/> | ||
</connections> | ||
</customObject> | ||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
<customObject id="-3" userLabel="Application" customClass="NSObject"/> | ||
<window title="WireGuardStatusbar Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5"> | ||
<windowStyleMask key="styleMask" titled="YES" closable="YES"/> | ||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> | ||
<rect key="contentRect" x="196" y="240" width="464" height="99"/> | ||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/> | ||
<view key="contentView" wantsLayer="YES" id="se5-gp-TjO"> | ||
<rect key="frame" x="0.0" y="0.0" width="464" height="99"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="IDs-pg-KKz"> | ||
<rect key="frame" x="18" y="20" width="428" height="17"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> | ||
<textFieldCell key="cell" lineBreakMode="clipping" title="Using ⌥ while clicking the icon will always show details for all tunnels." id="YUk-cT-Go7"> | ||
<font key="font" metaFont="system"/> | ||
<color key="textColor" name="systemGrayColor" catalog="System" colorSpace="catalog"/> | ||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> | ||
</textFieldCell> | ||
</textField> | ||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tNl-7F-mIu"> | ||
<rect key="frame" x="18" y="63" width="183" height="18"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> | ||
<buttonCell key="cell" type="check" title="Show details on all tunnels" bezelStyle="regularSquare" imagePosition="left" inset="2" id="NM9-F3-wFq"> | ||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> | ||
<font key="font" metaFont="system"/> | ||
</buttonCell> | ||
<connections> | ||
<binding destination="6PC-Jo-aPx" name="value" keyPath="values.showAllTunnelDetails" id="W9W-qH-GrG"/> | ||
</connections> | ||
</button> | ||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HI0-mR-oFH"> | ||
<rect key="frame" x="18" y="43" width="234" height="18"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> | ||
<buttonCell key="cell" type="check" title="Show details on connected tunnels" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="Yjb-1e-uAs"> | ||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> | ||
<font key="font" metaFont="system"/> | ||
</buttonCell> | ||
<connections> | ||
<binding destination="6PC-Jo-aPx" name="enabled" keyPath="values.showAllTunnelDetails" id="EOt-im-tYW"> | ||
<dictionary key="options"> | ||
<string key="NSValueTransformerName">NSNegateBoolean</string> | ||
</dictionary> | ||
</binding> | ||
<binding destination="6PC-Jo-aPx" name="value" keyPath="values.showConnectedTunnelDetails" id="BAL-A3-vaz"/> | ||
</connections> | ||
</button> | ||
</subviews> | ||
</view> | ||
<connections> | ||
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/> | ||
</connections> | ||
<point key="canvasLocation" x="8" y="2.5"/> | ||
</window> | ||
<userDefaultsController representsSharedInstance="YES" id="6PC-Jo-aPx"/> | ||
<button verticalHuggingPriority="750" id="aHX-dO-il1"> | ||
<rect key="frame" x="0.0" y="0.0" width="61" height="18"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> | ||
<buttonCell key="cell" type="radio" title="Radio" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="Vb7-ag-cJm"> | ||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> | ||
<font key="font" metaFont="system"/> | ||
</buttonCell> | ||
</button> | ||
</objects> | ||
</document> |
Oops, something went wrong.