diff options
author | stuconnolly <stuart02@gmail.com> | 2010-03-08 16:22:09 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-03-08 16:22:09 +0000 |
commit | b312414a21b97a101a527ae91a8f9a5ac55b1a0c (patch) | |
tree | 6d6854edc35c888cf16a6cdbed3caa0431a6949c | |
parent | 16a1da9e3eb7cc48c782e53142c4b94113239f1c (diff) | |
download | sequelpro-b312414a21b97a101a527ae91a8f9a5ac55b1a0c.tar.gz sequelpro-b312414a21b97a101a527ae91a8f9a5ac55b1a0c.tar.bz2 sequelpro-b312414a21b97a101a527ae91a8f9a5ac55b1a0c.zip |
Fix user manager splitview maximum and minimum sizes.
-rw-r--r-- | Interfaces/English.lproj/UserManagerView.xib | 37 | ||||
-rw-r--r-- | Source/SPUserManager.h | 6 | ||||
-rw-r--r-- | Source/SPUserManager.m | 7 |
3 files changed, 33 insertions, 17 deletions
diff --git a/Interfaces/English.lproj/UserManagerView.xib b/Interfaces/English.lproj/UserManagerView.xib index feacf4b9..111caf56 100644 --- a/Interfaces/English.lproj/UserManagerView.xib +++ b/Interfaces/English.lproj/UserManagerView.xib @@ -21,8 +21,8 @@ </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="586"/> <integer value="894"/> + <integer value="26"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -400,7 +400,6 @@ </object> </object> </object> - <int key="NSSelectedIndex">4</int> <bool key="NSPullDown">YES</bool> <int key="NSPreferredEdge">1</int> <bool key="NSUsesItemFromMenu">YES</bool> @@ -573,7 +572,7 @@ <object class="NSTabViewItem" id="1024639412"> <string key="NSIdentifier">Global Privileges</string> <object class="NSView" key="NSView" id="202198269"> - <reference key="NSNextResponder" ref="716372522"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">288</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -946,7 +945,7 @@ <object class="NSButton" id="610554589"> <reference key="NSNextResponder" ref="386290455"/> <int key="NSvFlags">289</int> - <string key="NSFrame">{{333, 124}, {114, 32}}</string> + <string key="NSFrame">{{299, 124}, {114, 32}}</string> <reference key="NSSuperview" ref="386290455"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="674356083"> @@ -1221,7 +1220,7 @@ <object class="NSButton" id="191574098"> <reference key="NSNextResponder" ref="386290455"/> <int key="NSvFlags">289</int> - <string key="NSFrame">{{333, 92}, {114, 32}}</string> + <string key="NSFrame">{{299, 92}, {114, 32}}</string> <reference key="NSSuperview" ref="386290455"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="513183495"> @@ -1390,7 +1389,6 @@ </object> </object> <string key="NSFrame">{{10, 33}, {511, 414}}</string> - <reference key="NSSuperview" ref="716372522"/> </object> <string key="NSLabel">Global Privileges</string> <reference key="NSColor" ref="409859189"/> @@ -1399,7 +1397,7 @@ <object class="NSTabViewItem" id="487249930"> <string key="NSIdentifier">Schema Privileges</string> <object class="NSView" key="NSView" id="601698335"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder" ref="716372522"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -1573,7 +1571,7 @@ <object class="NSTableHeaderCell" key="NSHeaderCell"> <int key="NSCellFlags">75628096</int> <int key="NSCellFlags2">2048</int> - <string key="NSContents">Granted Privilege</string> + <string key="NSContents">Granted Privileges</string> <reference key="NSSupport" ref="26"/> <object class="NSColor" key="NSBackgroundColor"> <int key="NSColorSpace">3</int> @@ -1702,7 +1700,7 @@ <object class="NSTableHeaderCell" key="NSHeaderCell"> <int key="NSCellFlags">612499008</int> <int key="NSCellFlags2">2048</int> - <string key="NSContents">Available Privilige</string> + <string key="NSContents">Available Privileges</string> <reference key="NSSupport" ref="26"/> <object class="NSColor" key="NSBackgroundColor"> <int key="NSColorSpace">3</int> @@ -1848,6 +1846,7 @@ </object> </object> <string key="NSFrame">{{10, 33}, {511, 414}}</string> + <reference key="NSSuperview" ref="716372522"/> </object> <string key="NSLabel">Schema Privileges</string> <reference key="NSColor" ref="409859189"/> @@ -2124,13 +2123,13 @@ <reference key="NSTabView" ref="716372522"/> </object> </object> - <reference key="NSSelectedTabViewItem" ref="1024639412"/> + <reference key="NSSelectedTabViewItem" ref="487249930"/> <reference key="NSFont" ref="746597359"/> <int key="NSTvFlags">0</int> <bool key="NSDrawsBackground">YES</bool> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="202198269"/> + <reference ref="601698335"/> </object> </object> <object class="NSButton" id="445730006"> @@ -4068,6 +4067,14 @@ </object> <int key="connectionID">914</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">splitViewButtonBar</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="623571747"/> + </object> + <int key="connectionID">917</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -5481,11 +5488,11 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{461, 153}, {752, 506}}</string> + <string>{{434, 346}, {752, 506}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="NO"/> <boolean value="NO"/> - <string>{{461, 153}, {752, 506}}</string> + <string>{{434, 346}, {752, 506}}</string> <boolean value="NO"/> <boolean value="YES"/> <string>{752, 506}</string> @@ -5665,7 +5672,7 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">916</int> + <int key="maxID">917</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -5800,6 +5807,7 @@ <string>removeSchemaPrivButton</string> <string>schemaController</string> <string>schemasTableView</string> + <string>splitViewButtonBar</string> <string>tabView</string> <string>treeController</string> <string>userNameTextField</string> @@ -5816,6 +5824,7 @@ <string>NSButton</string> <string>NSArrayController</string> <string>NSTableView</string> + <string>BWAnchoredButtonBar</string> <string>NSTabView</string> <string>NSTreeController</string> <string>NSTextField</string> diff --git a/Source/SPUserManager.h b/Source/SPUserManager.h index 88f88ee6..0bcc82bd 100644 --- a/Source/SPUserManager.h +++ b/Source/SPUserManager.h @@ -24,7 +24,7 @@ #import <Cocoa/Cocoa.h> -@class MCPConnection; +@class MCPConnection, BWAnchoredButtonBar; @interface SPUserManager : NSWindowController { @@ -53,7 +53,9 @@ IBOutlet NSButton *removeSchemaPrivButton; IBOutlet NSTextField *userNameTextField; - + + IBOutlet BWAnchoredButtonBar *splitViewButtonBar; + NSMutableArray *schemas; NSMutableArray *grantedSchemaPrivs; NSMutableArray *availablePrivs; diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m index 317ca848..0cc2b125 100644 --- a/Source/SPUserManager.m +++ b/Source/SPUserManager.m @@ -30,6 +30,7 @@ #import "SPArrayAdditions.h" #import "SPStringAdditions.h" #import "SPGrowlController.h" +#import "SPConnectionController.h" #define COLUMNIDNAME @"NameColumn" @@ -122,6 +123,9 @@ [imageAndTextCell setEditable:NO]; [tableColumn setDataCell:imageAndTextCell]; + // Set the button delegate + [splitViewButtonBar setSplitViewDelegate:self]; + [self _initializeUsers]; [self _initializeSchemaPrivs]; [super windowDidLoad]; @@ -1183,7 +1187,7 @@ */ - (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset { - return (proposedMax - 220); + return (proposedMax - 555); } /** @@ -1196,6 +1200,7 @@ #pragma mark - #pragma mark TableView Delegate Methods + - (void)tableViewSelectionDidChange:(NSNotification *)notification { if ([notification object] == schemasTableView) |