</object>
<int key="connectionID">21</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">fCancelButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="9691643"/>
+ </object>
+ <int key="connectionID">22</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="459786882"/>
<reference ref="9691643"/>
- <reference ref="794131740"/>
<reference ref="1066788818"/>
+ <reference ref="794131740"/>
</object>
<reference key="parent" ref="461713252"/>
</object>
<string>6.IBPluginDependency</string>
<string>6.ImportedFromIB2</string>
<string>7.IBPluginDependency</string>
+ <string>7.IBViewBoundsToFrameTransform</string>
<string>7.ImportedFromIB2</string>
<string>8.IBPluginDependency</string>
<string>8.ImportedFromIB2</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{535, 596}, {400, 177}}</string>
+ <string>{{594, 582}, {400, 177}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{535, 596}, {400, 177}}</string>
+ <string>{{594, 582}, {400, 177}}</string>
<integer value="1"/>
<integer value="0"/>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDmAAAwigAAA</bytes>
+ </object>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">21</int>
+ <int key="maxID">22</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>fCancelButton</string>
<string>fLabelField</string>
<string>fOpenButton</string>
<string>fTextField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSButton</string>
<string>NSTextField</string>
<string>NSButton</string>
<string>NSTextField</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>fCancelButton</string>
<string>fLabelField</string>
<string>fOpenButton</string>
<string>fTextField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fCancelButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
<object class="IBToOneOutletInfo">
<string key="name">fLabelField</string>
<string key="candidateClassName">NSTextField</string>
[fTextField setStringValue: urlString];
[fTextField selectText: self];
- [fOpenButton setEnabled: ![urlString isEqualToString: @""]];
+ [fOpenButton setTitle: NSLocalizedString(@"Open", "URL sheet button")];
+ [fCancelButton setTitle: NSLocalizedString(@"Cancel", "URL sheet button")];
+
+ [fOpenButton sizeToFit];
+ [fCancelButton sizeToFit];
+
+ //size the two buttons the same
+ NSRect openFrame = [fOpenButton frame];
+ openFrame.size.width += 10.0;
+ NSRect cancelFrame = [fCancelButton frame];
+ cancelFrame.size.width += 10.0;
+
+
+
+ if (NSWidth(openFrame) > NSWidth(cancelFrame))
+ cancelFrame.size.width = NSWidth(openFrame);
+ else
+ openFrame.size.width = NSWidth(cancelFrame);
+
+ openFrame.origin.x = NSWidth([[self window] frame]) - NSWidth(openFrame) - 20.0 + 6.0; //I don't know why the extra 6.0 is needed
+
+ [fOpenButton setFrame: openFrame];
+
+ cancelFrame.origin.x = NSMinX(openFrame) - NSWidth(cancelFrame);
+ [fCancelButton setFrame: cancelFrame];
}
- (IBAction) beginSheetForWindow: (NSWindow *) window