aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-04-01 00:51:15 +0000
committerrowanbeentje <rowan@beent.je>2011-04-01 00:51:15 +0000
commit53c84acb6d2bea63d29a88153a8ae2ceffb6fe0a (patch)
treeafa2790fb5dd5a23a0313d654abf442bf5f9a2c9 /Source
parent9cb3057259b02c8d691112a36168117d7acac6bb (diff)
downloadsequelpro-53c84acb6d2bea63d29a88153a8ae2ceffb6fe0a.tar.gz
sequelpro-53c84acb6d2bea63d29a88153a8ae2ceffb6fe0a.tar.bz2
sequelpro-53c84acb6d2bea63d29a88153a8ae2ceffb6fe0a.zip
Fix Issue #1019 (Sidebar width not remembered):
- This may be due to an Apple bug. I tracked it down to purely SPDatabaseDocument having a reference outlet to the activity scroll view. - Removing the reference worked as a fix; removing all code that used that reference did not. - Renaming the reference, and removing SPTableInfo's use of a reference, appears to act as a workaround. If the reference is not renamed, the bug still mainfests (!!!)
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDatabaseDocument.h2
-rw-r--r--Source/SPDatabaseDocument.m9
-rw-r--r--Source/SPTableInfo.h1
-rw-r--r--Source/SPTableInfo.m9
4 files changed, 9 insertions, 12 deletions
diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h
index 2b7fb38a..485b224b 100644
--- a/Source/SPDatabaseDocument.h
+++ b/Source/SPDatabaseDocument.h
@@ -66,7 +66,7 @@
IBOutlet NSSearchField *listFilterField;
IBOutlet NSScrollView *tableInfoScrollView;
- IBOutlet NSScrollView *activitiesScrollView;
+ IBOutlet NSScrollView *documentActivityScrollView;
IBOutlet NSView *parentView;
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 376d7d3f..751d7654 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -167,7 +167,7 @@
// Set the connection controller's delegate
[connectionController setDelegate:self];
-
+
// Register observers for when the DisplayTableViewVerticalGridlines preference changes
[prefs addObserver:self forKeyPath:SPDisplayTableViewVerticalGridlines options:NSKeyValueObservingOptionNew context:NULL];
[prefs addObserver:tableSourceInstance forKeyPath:SPDisplayTableViewVerticalGridlines options:NSKeyValueObservingOptionNew context:NULL];
@@ -202,6 +202,9 @@
// Hide the tabs in the tab view (we only show them to allow switching tabs in interface builder)
[tableTabView setTabViewType:NSNoTabsNoBorder];
+ // Hide the activity list
+ [self setActivityPaneHidden:[NSNumber numberWithInteger:1]];
+
// Bind the background color of the create syntax text view to the users preference
[createTableSyntaxTextView setAllowsDocumentBackgroundColorChange:YES];
@@ -5098,9 +5101,9 @@
{
if(![hide integerValue] == 1) {
[tableInfoScrollView setHidden:YES];
- [activitiesScrollView setHidden:NO];
+ [documentActivityScrollView setHidden:NO];
} else {
- [activitiesScrollView setHidden:YES];
+ [documentActivityScrollView setHidden:YES];
[tableInfoScrollView setHidden:NO];
}
}
diff --git a/Source/SPTableInfo.h b/Source/SPTableInfo.h
index 9328e05c..48e56e0c 100644
--- a/Source/SPTableInfo.h
+++ b/Source/SPTableInfo.h
@@ -33,7 +33,6 @@
IBOutlet NSTableView *activitiesTable;
IBOutlet NSScrollView *tableInfoScrollView;
- IBOutlet NSScrollView *activitiesScrollView;
IBOutlet NSView *containerView;
NSMutableArray *info;
diff --git a/Source/SPTableInfo.m b/Source/SPTableInfo.m
index 6c7c216d..d06198b4 100644
--- a/Source/SPTableInfo.m
+++ b/Source/SPTableInfo.m
@@ -63,9 +63,6 @@
name:SPActivitiesUpdateNotification
object:nil];
- [tableInfoScrollView setHidden:NO];
- [activitiesScrollView setHidden:YES];
-
// Add activities header
[activities addObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"ACTIVITIES", @"header for activities pane"), @"name", nil]];
[activitiesTable reloadData];
@@ -364,12 +361,10 @@
if(rowIndex > 0) return NO;
if(![tableInfoScrollView isHidden]) {
- [tableInfoScrollView setHidden:YES];
- [activitiesScrollView setHidden:NO];
+ [tableDocumentInstance setActivityPaneHidden:[NSNumber numberWithInteger:0]];
[[NSApp mainWindow] makeFirstResponder:activitiesTable];
} else {
- [activitiesScrollView setHidden:YES];
- [tableInfoScrollView setHidden:NO];
+ [tableDocumentInstance setActivityPaneHidden:[NSNumber numberWithInteger:1]];
[[NSApp mainWindow] makeFirstResponder:infoTable];
}