From b312414a21b97a101a527ae91a8f9a5ac55b1a0c Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 8 Mar 2010 16:22:09 +0000 Subject: Fix user manager splitview maximum and minimum sizes. --- Interfaces/English.lproj/UserManagerView.xib | 37 +++++++++++++++++----------- Source/SPUserManager.h | 6 +++-- 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 @@ YES - + YES @@ -400,7 +400,6 @@ - 4 YES 1 YES @@ -573,7 +572,7 @@ Global Privileges - + 288 YES @@ -946,7 +945,7 @@ 289 - {{333, 124}, {114, 32}} + {{299, 124}, {114, 32}} YES @@ -1221,7 +1220,7 @@ 289 - {{333, 92}, {114, 32}} + {{299, 92}, {114, 32}} YES @@ -1390,7 +1389,6 @@ {{10, 33}, {511, 414}} - Global Privileges @@ -1399,7 +1397,7 @@ Schema Privileges - + 256 YES @@ -1573,7 +1571,7 @@ 75628096 2048 - Granted Privilege + Granted Privileges 3 @@ -1702,7 +1700,7 @@ 612499008 2048 - Available Privilige + Available Privileges 3 @@ -1848,6 +1846,7 @@ {{10, 33}, {511, 414}} + Schema Privileges @@ -2124,13 +2123,13 @@ - + 0 YES YES - + @@ -4068,6 +4067,14 @@ 914 + + + splitViewButtonBar + + + + 917 + @@ -5481,11 +5488,11 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{461, 153}, {752, 506}} + {{434, 346}, {752, 506}} com.apple.InterfaceBuilder.CocoaPlugin - {{461, 153}, {752, 506}} + {{434, 346}, {752, 506}} {752, 506} @@ -5665,7 +5672,7 @@ - 916 + 917 @@ -5800,6 +5807,7 @@ removeSchemaPrivButton schemaController schemasTableView + splitViewButtonBar tabView treeController userNameTextField @@ -5816,6 +5824,7 @@ NSButton NSArrayController NSTableView + BWAnchoredButtonBar NSTabView NSTreeController NSTextField 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 -@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) -- cgit v1.2.3