diff options
author | rowanbeentje <rowan@beent.je> | 2009-07-26 12:40:34 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-07-26 12:40:34 +0000 |
commit | 84fdbe2ab1489786031973997f8413cd2f137375 (patch) | |
tree | 6c2582eb2eb4dea292c53f621867498f0a8fbba6 /Source/TablesList.m | |
parent | b9519867ed83d228e16937ae77c1adbba1676c79 (diff) | |
download | sequelpro-84fdbe2ab1489786031973997f8413cd2f137375.tar.gz sequelpro-84fdbe2ab1489786031973997f8413cd2f137375.tar.bz2 sequelpro-84fdbe2ab1489786031973997f8413cd2f137375.zip |
- Tweak table information panel to show scrollbars if it's resized to a position that would hide content
- Store collapse state of table information panel in preferences
- Apply a double fix for BWSplitView/NSSplitView+BWAnchoredButtonBar not informing delegates of resizes - correctly inform original BWSplitView delegates of resizes, and allow BWAnchoredButtonBar registered delegates to recieve the original split view resize notifications. This fixes database menu resizing in synch with splitview resizing for improved/consistent look and feel.
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r-- | Source/TablesList.m | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m index 10be699a..a8781128 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -705,6 +705,15 @@ [alert beginSheetModalForWindow:tableWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"truncateTable"]; } +/** + * Toggle whether the splitview is collapsed. + */ +- (IBAction)togglePaneCollapse:(id)sender +{ + [tableListSplitView toggleCollapse:sender]; + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:([tableInfoCollapseButton state] == NSOffState)] forKey:@"TableInformationPanelCollapsed"]; +} + #pragma mark Alert sheet methods /** @@ -1660,6 +1669,22 @@ } /** + * Standard awakeFromNib method for interface loading. + */ +- (void)awakeFromNib +{ + + // Collapse the table information pane if preference to do so is set + if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"TableInformationPanelCollapsed"] boolValue] + && [tableListSplitView collapsibleSubview]) { + [tableInfoCollapseButton setNextState]; + [tableListSplitView setValue:[NSNumber numberWithFloat:[tableListSplitView collapsibleSubview].frame.size.height] forKey:@"uncollapsedSize"]; + [[tableListSplitView collapsibleSubview] setFrameSize:NSMakeSize([tableListSplitView collapsibleSubview].frame.size.width, 0)]; + [tableListSplitView setCollapsibleSubviewCollapsed:YES]; + } +} + +/** * Standard dealloc method. */ - (void)dealloc |