Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set up the Passenger module warning with an alert icon.

  • Loading branch information...
commit 7cbaa91e887b9b5ed27faa25b0acfaa3cb62225d 1 parent 8f9bda3
@Manfred Manfred authored
View
45 English.lproj/PassengerPref.xib
@@ -627,7 +627,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="NSNextKeyView" ref="593820217"/>
</object>
</object>
- <string key="NSFrame">{{238, 89}, {413, 268}}</string>
+ <string key="NSFrame">{{238, 93}, {413, 268}}</string>
<reference key="NSSuperview" ref="453226259"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="452669158"/>
@@ -919,7 +919,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="NSCustomView" id="992940565">
<reference key="NSNextResponder" ref="453226259"/>
- <int key="NSvFlags">-2147483380</int>
+ <int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSImageView" id="556412990">
@@ -945,7 +945,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSImageCell" key="NSCell" id="1020303840">
<int key="NSCellFlags">130560</int>
<int key="NSCellFlags2">33554432</int>
- <int key="NSAlign">0</int>
+ <int key="NSAlign">7</int>
<int key="NSScale">0</int>
<int key="NSStyle">0</int>
<bool key="NSAnimates">NO</bool>
@@ -955,7 +955,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="700798641">
<reference key="NSNextResponder" ref="992940565"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{27, -10}, {332, 42}}</string>
+ <string key="NSFrame">{{29, -12}, {332, 42}}</string>
<reference key="NSSuperview" ref="992940565"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="615078570"/>
@@ -1059,14 +1059,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<int key="connectionID">139</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">installPassengerWarning</string>
- <reference key="source" ref="565115411"/>
- <reference key="destination" ref="992940565"/>
- </object>
- <int key="connectionID">198</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">remove:</string>
<reference key="source" ref="565115411"/>
@@ -1084,14 +1076,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">newApplicationHostTextField</string>
- <reference key="source" ref="565115411"/>
- <reference key="destination" ref="423181793"/>
- </object>
- <int key="connectionID">265</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">authorizationView</string>
<reference key="source" ref="565115411"/>
<reference key="destination" ref="432233478"/>
@@ -1822,6 +1806,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">524</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">passengerModuleWarning</string>
+ <reference key="source" ref="565115411"/>
+ <reference key="destination" ref="992940565"/>
+ </object>
+ <int key="connectionID">526</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -1862,7 +1854,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference ref="352101313"/>
<reference ref="987090916"/>
<reference ref="1040168125"/>
- <reference ref="298054908"/>
<reference ref="432233478"/>
<reference ref="81605200"/>
<reference ref="992940565"/>
@@ -1870,6 +1861,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference ref="232803967"/>
<reference ref="510136812"/>
<reference ref="615078570"/>
+ <reference ref="298054908"/>
</object>
<reference key="parent" ref="703878053"/>
</object>
@@ -2253,8 +2245,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="object" ref="992940565"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="700798641"/>
<reference ref="556412990"/>
+ <reference ref="700798641"/>
</object>
<reference key="parent" ref="453226259"/>
</object>
@@ -2528,7 +2520,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">524</int>
+ <int key="maxID">526</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -2674,6 +2666,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>mainView</string>
<string>openInBrowserButton</string>
<string>passengerIconView</string>
+ <string>passengerModuleWarning</string>
<string>textStateColor</string>
</object>
<object class="NSMutableArray" key="dict.values">
@@ -2684,6 +2677,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>NSView</string>
<string>NSButton</string>
<string>NSImageView</string>
+ <string>NSView</string>
<string>NSColor</string>
</object>
</object>
@@ -2697,6 +2691,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>mainView</string>
<string>openInBrowserButton</string>
<string>passengerIconView</string>
+ <string>passengerModuleWarning</string>
<string>textStateColor</string>
</object>
<object class="NSMutableArray" key="dict.values">
@@ -2726,6 +2721,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="candidateClassName">NSImageView</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">passengerModuleWarning</string>
+ <string key="candidateClassName">NSView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">textStateColor</string>
<string key="candidateClassName">NSColor</string>
</object>
View
4 Passenger.xcodeproj/project.pbxproj
@@ -10,7 +10,6 @@
5186C31F0E090C9C008D8E1F /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5186C31E0E090C9C008D8E1F /* Carbon.framework */; };
5189C6E70E111C3300B83EA5 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 5189C6E60E111C3300B83EA5 /* LICENSE */; };
518C7F560E06745E003A3ED0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 518C7F550E06745E003A3ED0 /* Security.framework */; };
- 51B9190D0E01523900F45803 /* Alerts.icns in Resources */ = {isa = PBXBuildFile; fileRef = 51B9190C0E01523900F45803 /* Alerts.icns */; };
51D45407109843A6003978A9 /* label.png in Resources */ = {isa = PBXBuildFile; fileRef = 51D45405109843A6003978A9 /* label.png */; };
51D45408109843A6003978A9 /* PassengerPref.icns in Resources */ = {isa = PBXBuildFile; fileRef = 51D45406109843A6003978A9 /* PassengerPref.icns */; };
6333C0D912C216AA00080A38 /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = 6333C0D812C216AA00080A38 /* Common.h */; };
@@ -83,7 +82,6 @@
5186C31E0E090C9C008D8E1F /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
5189C6E60E111C3300B83EA5 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
518C7F550E06745E003A3ED0 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
- 51B9190C0E01523900F45803 /* Alerts.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Alerts.icns; path = resources/Alerts.icns; sourceTree = "<group>"; };
51D45405109843A6003978A9 /* label.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = label.png; path = resources/label.png; sourceTree = "<group>"; };
51D45406109843A6003978A9 /* PassengerPref.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = PassengerPref.icns; path = resources/PassengerPref.icns; sourceTree = "<group>"; };
6333C0D812C216AA00080A38 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Common.h; path = app/utils/Common.h; sourceTree = "<group>"; };
@@ -190,7 +188,6 @@
6361755112B7C18F00E3412D /* bin */,
6361755212B7C18F00E3412D /* lib */,
51D45406109843A6003978A9 /* PassengerPref.icns */,
- 51B9190C0E01523900F45803 /* Alerts.icns */,
9648B5EE0D195C2F00DC73E2 /* Pref.xib */,
8D202CF70486D31800D8A456 /* Info.plist */,
5186C31E0E090C9C008D8E1F /* Carbon.framework */,
@@ -420,7 +417,6 @@
files = (
8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */,
9648B5F00D195C2F00DC73E2 /* Pref.xib in Resources */,
- 51B9190D0E01523900F45803 /* Alerts.icns in Resources */,
5189C6E70E111C3300B83EA5 /* LICENSE in Resources */,
51D45407109843A6003978A9 /* label.png in Resources */,
51D45408109843A6003978A9 /* PassengerPref.icns in Resources */,
View
2  app/controllers/PassengerPref.h
@@ -16,6 +16,7 @@
IBOutlet NSButton *openInBrowserButton;
IBOutlet SFAuthorizationView *authorizationView;
IBOutlet NSTableView *applicationsTableView;
+ IBOutlet NSView *passengerModuleWarning;
}
@property (assign, getter=isAuthorized) BOOL authorized;
@@ -28,6 +29,7 @@
- (void) setupUI;
- (void) setupAuthorizationView;
- (void) setupApplicationView;
+- (void) setupPassengerModuleWarning;
- (IBAction) add:(id)sender;
- (IBAction) remove:(id)sender;
View
15 app/controllers/PassengerPref.m
@@ -15,6 +15,7 @@ - (void) mainViewDidLoad {
[self setupUI];
[self setupAuthorizationView];
[self setupApplicationView];
+ [self setupPassengerModuleWarning];
[self checkIfPassengerModuleInstalled];
@@ -55,6 +56,20 @@ - (void) setupApplicationView {
[applicationsTableView setDraggingSourceOperationMask:NSDragOperationGeneric forLocal:NO];
}
+- (void) setupPassengerModuleWarning {
+ NSUInteger index;
+ NSImageView *iconView;
+
+ index = [[passengerModuleWarning subviews] indexOfObjectPassingTest:^ BOOL (id object, NSUInteger index, BOOL *stop) {
+ return [object isKindOfClass:[NSImageView class]];
+ }];
+ iconView = [[passengerModuleWarning subviews] objectAtIndex:index];
+ if (iconView) {
+ NSLog(@"%@", [iconView description]);
+ [iconView setImage:[[NSImage alloc] initByReferencingFile:@"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns"]];
+ }
+}
+
#pragma SFAuthorizationView delegate methods
- (void) authorizationViewDidAuthorize:(SFAuthorizationView *)view {
View
BIN  resources/Alerts.icns
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.