Permalink
Browse files

Showing basic information.

  • Loading branch information...
1 parent 3d9dc8b commit 60ae16c0ddf4fe1d71208152556432d0b531af6c @tomaz committed Mar 8, 2012
@@ -225,7 +225,6 @@
<string key="NSFrame">{{385, 0}, {95, 28}}</string>
<reference key="NSSuperview" ref="564727303"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="536915794">
@@ -269,6 +268,54 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
+ <string key="label">applicationNameLabel</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="10227382"/>
+ </object>
+ <int key="connectionID">113</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">punchLineLabel</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="925720178"/>
+ </object>
+ <int key="connectionID">114</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">applicationVersionLabel</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="151851529"/>
+ </object>
+ <int key="connectionID">115</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">copyrightLabel</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="499106173"/>
+ </object>
+ <int key="connectionID">116</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">creditsView</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="963509034"/>
+ </object>
+ <int key="connectionID">117</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">getInTouch:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="701293670"/>
+ </object>
+ <int key="connectionID">118</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="740481076"/>
<reference key="destination" ref="1001"/>
@@ -1065,13 +1112,53 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">112</int>
+ <int key="maxID">118</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">AboutWindowController</string>
<string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">getInTouch:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">getInTouch:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">getInTouch:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <dictionary class="NSMutableDictionary" key="outlets">
+ <string key="applicationNameLabel">NSTextField</string>
+ <string key="applicationVersionLabel">NSTextField</string>
+ <string key="copyrightLabel">NSTextField</string>
+ <string key="creditsView">NSView</string>
+ <string key="punchLineLabel">NSTextField</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <object class="IBToOneOutletInfo" key="applicationNameLabel">
+ <string key="name">applicationNameLabel</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="applicationVersionLabel">
+ <string key="name">applicationVersionLabel</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="copyrightLabel">
+ <string key="name">copyrightLabel</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="creditsView">
+ <string key="name">creditsView</string>
+ <string key="candidateClassName">NSView</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="punchLineLabel">
+ <string key="name">punchLineLabel</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ </dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/AboutWindowController.h</string>
@@ -10,4 +10,12 @@
@interface AboutWindowController : NSWindowController
+- (IBAction)getInTouch:(id)sender;
+
+@property (weak) IBOutlet NSTextField *applicationNameLabel;
+@property (weak) IBOutlet NSTextField *applicationVersionLabel;
+@property (weak) IBOutlet NSTextField *punchLineLabel;
+@property (weak) IBOutlet NSTextField *copyrightLabel;
+@property (weak) IBOutlet NSView *creditsView;
+
@end
@@ -10,13 +10,22 @@
#import "AboutWindowController.h"
@interface AboutWindowController ()
-
+@property (nonatomic, readonly) NSString *applicationNameString;
+@property (nonatomic, readonly) NSString *applicationVersionString;
+@property (nonatomic, readonly) NSString *applicationBuildNumberString;
+@property (nonatomic, readonly) NSString *applicationCopyrightString;
@end
#pragma mark -
@implementation AboutWindowController
+@synthesize applicationNameLabel;
+@synthesize applicationVersionLabel;
+@synthesize punchLineLabel;
+@synthesize copyrightLabel;
+@synthesize creditsView;
+
#pragma mark - Initialization & disposal
- (id)init {
@@ -27,6 +36,37 @@ - (id)init {
#pragma mark - Window lifecycle
- (void)awakeFromNib {
+ NSString *versionFormat = NSLocalizedString(@"Version %@ (%@)", nil);
+ NSString *versionString = [NSString stringWithFormat:versionFormat, self.applicationVersionString, self.applicationBuildNumberString];
+ self.applicationNameLabel.stringValue = self.applicationNameString;
+ self.punchLineLabel.stringValue = NSLocalizedString(@"Scrolling about window demonstrator!", nil);
+ [self.applicationVersionLabel.cell setPlaceholderString:versionString];
+ [self.copyrightLabel.cell setPlaceholderString:self.applicationCopyrightString];
+}
+
+#pragma mark - User actions
+
+- (IBAction)getInTouch:(id)sender {
+ NSURL *url = [NSURL URLWithString:@"http://gentlebytes.com"];
+ [[NSWorkspace sharedWorkspace] openURL:url];
+}
+
+#pragma mark - Properties
+
+- (NSString *)applicationNameString {
+ return [[[NSBundle mainBundle] infoDictionary] valueForKey:(NSString *)kCFBundleNameKey];
+}
+
+- (NSString *)applicationVersionString {
+ return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
+}
+
+- (NSString *)applicationBuildNumberString {
+ return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
+}
+
+- (NSString *)applicationCopyrightString {
+ return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSHumanReadableCopyright"];
}
@end
@@ -11,10 +11,13 @@
<string key="NS.object.0">2177</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
- <string>NSWindowTemplate</string>
<string>NSView</string>
<string>NSMenu</string>
+ <string>NSWindowTemplate</string>
<string>NSMenuItem</string>
+ <string>NSButtonCell</string>
+ <string>IBNSLayoutConstraint</string>
+ <string>NSButton</string>
<string>NSCustomObject</string>
</array>
<array key="IBDocument.PluginDependencies">
@@ -1299,9 +1302,42 @@
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="439893737">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="NSButton" id="225749778">
+ <reference key="NSNextResponder" ref="439893737"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{157, 162}, {166, 32}}</string>
+ <reference key="NSSuperview" ref="439893737"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="1044976780">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Show about window</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <string key="NSCellIdentifier">_NS:9</string>
+ <reference key="NSControlView" ref="225749778"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </array>
<string key="NSFrameSize">{480, 360}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="225749778"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1058}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
@@ -1950,6 +1986,14 @@
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
+ <string key="label">showAboutWindow:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="225749778"/>
+ </object>
+ <int key="connectionID">542</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
<string key="label">addFontTrait:</string>
<reference key="source" ref="755631768"/>
<reference key="destination" ref="305399458"/>
@@ -2520,6 +2564,41 @@
<object class="IBObjectRecord">
<int key="objectID">372</int>
<reference key="object" ref="439893737"/>
+ <array class="NSMutableArray" key="children">
+ <object class="IBNSLayoutConstraint" id="680753677">
+ <reference key="firstItem" ref="225749778"/>
+ <int key="firstAttribute">10</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="439893737"/>
+ <int key="secondAttribute">10</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">5</int>
+ <float key="scoringTypeFloat">22</float>
+ <int key="contentType">2</int>
+ <reference key="containingView" ref="439893737"/>
+ </object>
+ <reference ref="225749778"/>
+ <object class="IBNSLayoutConstraint" id="593638259">
+ <reference key="firstItem" ref="225749778"/>
+ <int key="firstAttribute">9</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="439893737"/>
+ <int key="secondAttribute">9</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">5</int>
+ <float key="scoringTypeFloat">22</float>
+ <int key="contentType">2</int>
+ <reference key="containingView" ref="439893737"/>
+ </object>
+ </array>
<reference key="parent" ref="972006081"/>
</object>
<object class="IBObjectRecord">
@@ -2995,6 +3074,29 @@
<reference key="object" ref="738670835"/>
<reference key="parent" ref="963351320"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">537</int>
+ <reference key="object" ref="225749778"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1044976780"/>
+ </array>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">538</int>
+ <reference key="object" ref="1044976780"/>
+ <reference key="parent" ref="225749778"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">540</int>
+ <reference key="object" ref="680753677"/>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">541</int>
+ <reference key="object" ref="593638259"/>
+ <reference key="parent" ref="439893737"/>
+ </object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -3061,6 +3163,10 @@
<string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="371.IBWindowTemplateEditedContentRect">{{380, 496}, {480, 360}}</string>
<integer value="1" key="371.NSWindowTemplate.visibleAtLaunch"/>
+ <array class="NSMutableArray" key="372.IBNSViewMetadataConstraints">
+ <reference ref="680753677"/>
+ <reference ref="593638259"/>
+ </array>
<string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3138,6 +3244,11 @@
<string key="516.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="517.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="534.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <boolean value="NO" key="537.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+ <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="538.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="540.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3157,7 +3268,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">536</int>
+ <int key="maxID">542</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -3191,6 +3302,14 @@
<string key="minorKey">./Classes/AppDelegate.h</string>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSLayoutConstraint</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/NSLayoutConstraint.h</string>
+ </object>
+ </object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>

0 comments on commit 60ae16c

Please sign in to comment.