aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormltownsend <mltownsend@gmail.com>2008-12-18 20:10:53 +0000
committermltownsend <mltownsend@gmail.com>2008-12-18 20:10:53 +0000
commit59c95e96af7a2382252d74adc2d97b0015785f99 (patch)
treef378b745c720fe8bc2c93f5b5cc438a3f1e857a5
parent906c1bda101a07181185d8dc6da412d1a6eb7c3d (diff)
downloadsequelpro-59c95e96af7a2382252d74adc2d97b0015785f99.tar.gz
sequelpro-59c95e96af7a2382252d74adc2d97b0015785f99.tar.bz2
sequelpro-59c95e96af7a2382252d74adc2d97b0015785f99.zip
Removed Panther compatibilitiy
-rw-r--r--Source/TableContent.m29
-rw-r--r--Source/TableDump.m14
2 files changed, 11 insertions, 32 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 1aa939f2..962f6dde 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -149,17 +149,11 @@
// Add the new columns to the table
for ( i = 0 ; i < [fieldNames count] ; i++ ) {
-
+
// Set up the column
theCol = [[NSTableColumn alloc] initWithIdentifier:[fieldNames objectAtIndex:i]];
[theCol setEditable:YES];
- if ( [theCol respondsToSelector:@selector(setResizingMask:)] ) {
- // Mac OS X 10.4+
- [theCol setResizingMask:NSTableColumnUserResizingMask];
- } else {
- // Mac OS X pre-10.4
- [theCol setResizable:YES];
- }
+
[[theCol headerCell] setStringValue:[fieldNames objectAtIndex:i]];
// Set up the data cell depending on the column type
@@ -180,12 +174,9 @@
dataCell = [[[NSTextFieldCell alloc] initTextCell:@""] autorelease];
}
[dataCell setEditable:YES];
-
- if ( [dataCell respondsToSelector:@selector(setLineBreakMode:)] ) {
- // Mac OS X 10.4+
- [dataCell setLineBreakMode:NSLineBreakByTruncatingTail];
- }
-
+
+ [dataCell setLineBreakMode:NSLineBreakByTruncatingTail];
+
// Set the data cell font according to the preferences
if ( [prefs boolForKey:@"useMonospacedFonts"] )
{
@@ -198,7 +189,7 @@
// Assign the data cell
[theCol setDataCell:dataCell];
-
+
// Set the width of this column to saved value if exists
colWidth = [[[[prefs objectForKey:@"tableColumnWidths"] objectForKey:[NSString stringWithFormat:@"%@@%@", [tableDocumentInstance database], [tableDocumentInstance host]]] objectForKey:[tablesListInstance table]] objectForKey:[fieldNames objectAtIndex:i]];
if ( colWidth )
@@ -773,13 +764,7 @@
} else {
data = [editData description];
}
- if ( [editData respondsToSelector:@selector(writeToFile:atomically:encoding:error:)] ) {
- // mac os 10.4 or later
- [editData writeToFile:fileName atomically:YES encoding:[CMMCPConnection encodingForMySQLEncoding:[(NSString *)[tableDocumentInstance encoding] UTF8String]] error:NULL];
- } else {
- // mac os pre 10.4
- [editData writeToFile:fileName atomically:YES];
- }
+ [editData writeToFile:fileName atomically:YES encoding:[CMMCPConnection encodingForMySQLEncoding:[(NSString *)[tableDocumentInstance encoding] UTF8String]] error:NULL];
}
}
diff --git a/Source/TableDump.m b/Source/TableDump.m
index ab96baf3..442ec84a 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -361,16 +361,10 @@
[prefs setObject:[sheet directory] forKey:@"openPath"];
//load file into string
- if ( [NSString respondsToSelector:@selector(stringWithContentsOfFile:encoding:error:)] ) {
- // mac os 10.4 or later
- dumpFile = [NSString stringWithContentsOfFile:[sheet filename]
- encoding:[CMMCPConnection encodingForMySQLEncoding:[[tableDocumentInstance encoding] cString]]
- error:errorStr];
- } else {
- // mac os pre 10.4
- dumpFile = [NSString stringWithContentsOfFile:[sheet filename]];
- }
-
+ dumpFile = [NSString stringWithContentsOfFile:[sheet filename]
+ encoding:[CMMCPConnection encodingForMySQLEncoding:[[tableDocumentInstance encoding] cString]]
+ error:errorStr];
+
if ( !dumpFile ) {
NSBeginAlertSheet(NSLocalizedString(@"Error", @"Title of error alert"),
NSLocalizedString(@"OK", @"OK button"),