Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added version number to the preferences window (Resolves #169) #192

Closed
wants to merge 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 21, 2014
  1. @Amwam
This page is out of date. Refresh to see the latest.
View
17 Languages/en.lproj/SpectaclePreferencesWindow.xib
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4511" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
- <deployment defaultVersion="1070" identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4511"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="SpectaclePreferencesController">
@@ -27,6 +26,7 @@
<outlet property="redoLastMoveHotKeyRecorder" destination="116" id="140"/>
<outlet property="statusItemEnabled" destination="41" id="142"/>
<outlet property="undoLastMoveHotKeyRecorder" destination="114" id="141"/>
+ <outlet property="versionNumberLabel" destination="8Hc-JA-Da2" id="4w9-eb-E5h"/>
<outlet property="window" destination="3" id="68"/>
</connections>
</customObject>
@@ -282,7 +282,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button id="39">
- <rect key="frame" x="15.999992512584992" y="16" width="182" height="18"/>
+ <rect key="frame" x="16" y="16" width="181.99999251258498" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="check" title="Launch Spectacle at login" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="47">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -327,6 +327,15 @@
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</box>
+ <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="8Hc-JA-Da2">
+ <rect key="frame" x="18" y="50" width="104" height="17"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="1Yr-9r-KQK">
+ <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>
</view>
</window>
View
1  SpectaclePreferencesController.h
@@ -25,6 +25,7 @@
@property (nonatomic) IBOutlet ZKHotKeyRecorder *redoLastMoveHotKeyRecorder;
@property (nonatomic) IBOutlet NSButton *loginItemEnabled;
@property (nonatomic) IBOutlet NSPopUpButton *statusItemEnabled;
+@property (nonatomic) IBOutlet NSTextField *versionNumberLabel;
#pragma mark -
View
7 SpectaclePreferencesController.m
@@ -59,6 +59,13 @@ - (void)windowDidLoad {
_loginItemEnabled.state = loginItemEnabledState;
[_statusItemEnabled selectItemWithTag: isStatusItemEnabled ? 0 : 1];
+
+ NSDictionary *infoDictionary = [[NSBundle mainBundle]infoDictionary];
+
+ NSString *build = infoDictionary[(NSString*)kCFBundleVersionKey];
+ NSString *bundleName = infoDictionary[@"CFBundleShortVersionString"];
+
+ [self.versionNumberLabel setStringValue:[NSString stringWithFormat:@"%@ (%@)", bundleName, build]];
}
#pragma mark -
Something went wrong with that request. Please try again.