aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-12-14 12:43:22 +0000
committerstuconnolly <stuart02@gmail.com>2009-12-14 12:43:22 +0000
commit8ee58e3c951a363280f9949a4589dbc6286d6c00 (patch)
tree14d4c8e72ed921e708548b98b0aa837430b19d3d
parent5247ac10ff8d1fe91756c60dfd05605e8bc3d884 (diff)
downloadsequelpro-8ee58e3c951a363280f9949a4589dbc6286d6c00.tar.gz
sequelpro-8ee58e3c951a363280f9949a4589dbc6286d6c00.tar.bz2
sequelpro-8ee58e3c951a363280f9949a4589dbc6286d6c00.zip
Remove old redundant code that was left over form when the server variables sheet was moved to its own controller.
-rw-r--r--Source/TableDocument.h1
-rw-r--r--Source/TableDocument.m41
2 files changed, 1 insertions, 41 deletions
diff --git a/Source/TableDocument.h b/Source/TableDocument.h
index 8164746a..391066a9 100644
--- a/Source/TableDocument.h
+++ b/Source/TableDocument.h
@@ -115,7 +115,6 @@
MCPConnection *mySQLConnection;
- NSMutableArray *variables, *variablesFiltered;
NSString *selectedDatabase;
NSString *mySQLVersion;
NSUserDefaults *prefs;
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 284d1b62..25524389 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -85,7 +85,6 @@
selectedDatabase = nil;
mySQLConnection = nil;
mySQLVersion = nil;
- variables = nil;
printWebView = [[WebView alloc] init];
[printWebView setFrameLoadDelegate:self];
@@ -3055,20 +3054,7 @@
- (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
{
if (returnCode == NSOKButton) {
- if ([contextInfo isEqualToString:@"ServerVariables"]) {
- if ([variablesFiltered count] > 0) {
- NSMutableString *variablesString = [NSMutableString stringWithFormat:@"# MySQL server variables for %@\n\n", [self host]];
-
- for (NSDictionary *variable in variablesFiltered)
- {
- [variablesString appendString:[NSString stringWithFormat:@"%@ = %@\n", [variable objectForKey:@"Variable_name"], [variable objectForKey:@"Value"]]];
- }
-
- [variablesString writeToFile:[sheet filename] atomically:YES encoding:NSUTF8StringEncoding error:NULL];
- }
- }
- else if ([contextInfo isEqualToString:@"CreateSyntax"]) {
-
+ if ([contextInfo isEqualToString:@"CreateSyntax"]) {
NSString *createSyntax = [createTableSyntaxTextView string];
@@ -3588,30 +3574,6 @@
}
#pragma mark -
-#pragma mark TableView datasource methods
-
-- (int)numberOfRowsInTableView:(NSTableView *)aTableView
-{
- return [variablesFiltered count];
-}
-
-- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
-{
- id theValue = [[variablesFiltered objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]];
-
- if ([theValue isKindOfClass:[NSData class]]) {
- theValue = [[NSString alloc] initWithData:theValue encoding:[mySQLConnection encoding]];
- if (theValue == nil) {
- theValue = [[NSString alloc] initWithData:theValue encoding:NSASCIIStringEncoding];
- }
-
- if (theValue) [theValue autorelease];
- }
-
- return theValue;
-}
-
-#pragma mark -
/**
* Dealloc
@@ -3626,7 +3588,6 @@
if (processListController) [processListController release];
if (serverVariablesController) [serverVariablesController release];
if (mySQLConnection) [mySQLConnection release];
- if (variables) [variables release];
if (selectedDatabase) [selectedDatabase release];
if (mySQLVersion) [mySQLVersion release];
if (taskDrawTimer) [taskDrawTimer release];