aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r--Source/TablesList.m25
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