diff options
author | rowanbeentje <rowan@beent.je> | 2013-04-01 23:10:35 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-04-01 23:10:35 +0000 |
commit | 177fa173dd397062e0a5bcc011edf2fcf8f171a7 (patch) | |
tree | 72ce9692c799ea878416f0e0035fde57879adece /Source | |
parent | 6820099de060cbede59f43867a62be5eb424ae4c (diff) | |
download | sequelpro-177fa173dd397062e0a5bcc011edf2fcf8f171a7.tar.gz sequelpro-177fa173dd397062e0a5bcc011edf2fcf8f171a7.tar.bz2 sequelpro-177fa173dd397062e0a5bcc011edf2fcf8f171a7.zip |
- Fix query status and error message title to not always suggest an error has occurred, addressing Issue #1670
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPCustomQuery.h | 1 | ||||
-rw-r--r-- | Source/SPCustomQuery.m | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPCustomQuery.h b/Source/SPCustomQuery.h index 4ce76b57..66e9c100 100644 --- a/Source/SPCustomQuery.h +++ b/Source/SPCustomQuery.h @@ -97,6 +97,7 @@ IBOutlet SPCopyTable *customQueryView; IBOutlet NSScrollView *customQueryScrollView; IBOutlet id errorText; + IBOutlet NSTextField *errorTextTitle; IBOutlet NSScrollView *errorTextScrollView; IBOutlet id affectedRowsText; IBOutlet id valueSheet; diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index 083c676e..43bb425a 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -559,6 +559,7 @@ } [tableDocumentInstance startTaskWithDescription:taskString]; + [errorTextTitle setStringValue:NSLocalizedString(@"Query Status", @"Query Status")]; [errorText setString:taskString]; [affectedRowsText setStringValue:@""]; @@ -725,6 +726,7 @@ [errors appendFormat:NSLocalizedString(@"[ERROR in query %ld] %@\n", @"error text when multiple custom query failed"), (long)(i+1), errorString]; + [[errorTextTitle onMainThread] setStringValue:NSLocalizedString(@"Last Error Message", @"Last Error Message")]; [[errorText onMainThread] setString:errors]; // ask the user to continue after detecting an error @@ -1295,6 +1297,7 @@ #ifndef SP_CODA // set the error text + [errorTextTitle setStringValue:NSLocalizedString(@"Last Error Message", @"Last Error Message")]; [errorText setString:[errorsString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; [[errorTextScrollView verticalScroller] setFloatValue:1.0f]; #endif @@ -1356,6 +1359,7 @@ } } else if ( [errorsString length] && queryIsTableSorter ) { + [errorTextTitle setStringValue:NSLocalizedString(@"Last Error Message", @"Last Error Message")]; [errorText setString:NSLocalizedString(@"Couldn't sort column.", @"text shown if an error occured while sorting the result table")]; NSBeep(); } else { @@ -1950,6 +1954,7 @@ NSString *tableForColumn = [columnDefinition objectForKey:@"org_table"]; if(!tableForColumn || ![tableForColumn length]) { + [errorTextTitle setStringValue:NSLocalizedString(@"Last Error Message", @"Last Error Message")]; [errorText setString:[NSString stringWithFormat:NSLocalizedString(@"Couldn't identify field origin unambiguously. The column '%@' contains data from more than one table.", @"Custom Query result editing error - could not identify a corresponding column"), [columnDefinition objectForKey:@"name"]]]; NSBeep(); return; |