aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-10-01 15:23:33 +0000
committerstuconnolly <stuart02@gmail.com>2009-10-01 15:23:33 +0000
commitd766381344119184158738d2d5a23484a8a1b3a1 (patch)
treeb74e3e39419d4271ee56931e9a06a1799e9b4035 /Source
parent9f7b5dccfae711371970031b3e79f671213441d6 (diff)
downloadsequelpro-d766381344119184158738d2d5a23484a8a1b3a1.tar.gz
sequelpro-d766381344119184158738d2d5a23484a8a1b3a1.tar.bz2
sequelpro-d766381344119184158738d2d5a23484a8a1b3a1.zip
- Add copy create syntax button to the create syntax sheet.
- Fix the Growl notification prefs message as well as making the dialog a sheet. - Re-run genstrings to update localizable.strings and also remove use of multiple comments for a single string.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPContentFilterManager.m2
-rw-r--r--Source/SPPreferenceController.m10
-rw-r--r--Source/TableDocument.h1
-rw-r--r--Source/TableDocument.m21
-rw-r--r--Source/TableDump.m4
5 files changed, 29 insertions, 9 deletions
diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m
index 8ac609b9..4d15823b 100644
--- a/Source/SPContentFilterManager.m
+++ b/Source/SPContentFilterManager.m
@@ -550,7 +550,7 @@
[contentFilterConjunctionLabel setHidden:(numOfArgs < 2)];
if(numOfArgs > 2) {
- [resultingClauseLabel setStringValue:NSLocalizedString(@"Error", @"Error")];
+ [resultingClauseLabel setStringValue:NSLocalizedString(@"Error", @"error")];
[resultingClauseContentLabel setStringValue:NSLocalizedString(@"Maximum number of arguments is 2!", @"Maximum number of arguments is 2!")];
} else {
[resultingClauseLabel setStringValue:@"SELECT * FROM <table> WHERE"];
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index c1a430f9..a0fac783 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -946,12 +946,10 @@
- (void)setGrowlEnabled:(BOOL)value
{
if (value) {
- NSRunInformationalAlertPanel(
- NSLocalizedString(@"growl_prefs_title", "Title for Growl Notifications Alert Dialog"),
- NSLocalizedString(@"growl_prefs_msg", @"Message for Growl Notifications Alert Dialog"),
- nil,
- nil,
- nil
+ NSBeginInformationalAlertSheet(
+ NSLocalizedString(@"Growl notification preferences", "Growl notification preferences alert title"),
+ nil, nil, nil, [self window], self, nil, nil, nil,
+ NSLocalizedString(@"All Growl notifications are enabled by default. To change which notifications are displayed, go to the Growl Preference Pane in the System Preferences and choose what notifications Growl should display from Sequel Pro.", @"Growl notification preferences alert message")
);
}
diff --git a/Source/TableDocument.h b/Source/TableDocument.h
index 89603085..2741ca7d 100644
--- a/Source/TableDocument.h
+++ b/Source/TableDocument.h
@@ -188,6 +188,7 @@ enum sp_current_query_mode
- (IBAction)flushTable:(id)sender;
- (IBAction)checksumTable:(id)sender;
- (IBAction)saveCreateSyntax:(id)sender;
+- (IBAction)copyCreateTableSyntaxFromSheet:(id)sender;
// Other methods
- (void) setQueryMode:(int)theQueryMode;
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index c685c89b..be05b720 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -1743,6 +1743,27 @@
[panel beginSheetForDirectory:nil file:@"CreateSyntax" modalForWindow:createTableSyntaxWindow modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:@"CreateSyntax"];
}
+/**
+ * Copy the create syntax in the create syntax text view to the pasteboard.
+ */
+- (IBAction)copyCreateTableSyntaxFromSheet:(id)sender
+{
+ NSString *createSyntax = [createTableSyntaxTextView string];
+
+ if ([createSyntax length] > 0) {
+ // Copy to the clipboard
+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
+
+ [pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self];
+ [pb setString:createSyntax forType:NSStringPboardType];
+
+ // Table syntax copied Growl notification
+ [[SPGrowlController sharedGrowlController] notifyWithTitle:@"Syntax Copied"
+ description:[NSString stringWithFormat:NSLocalizedString(@"Syntax for %@ table copied", @"description for table syntax copied growl notification"), [self table]]
+ notificationName:@"Syntax Copied"];
+ }
+}
+
#pragma mark -
#pragma mark Other Methods
diff --git a/Source/TableDump.m b/Source/TableDump.m
index 3f518214..346ae099 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -735,7 +735,7 @@
// Reset progress interface
[errorsView setString:@""];
[singleProgressTitle setStringValue:NSLocalizedString(@"Importing CSV", @"text showing that the application is importing CSV")];
- [singleProgressText setStringValue:NSLocalizedString(@"Reading...", @"text showing that app is reading CSV file")];
+ [singleProgressText setStringValue:NSLocalizedString(@"Reading...", @"text showing that app is reading dump")];
[singleProgressBar setIndeterminate:YES];
[singleProgressBar setUsesThreadedAnimation:YES];
[singleProgressBar startAnimation:self];
@@ -1006,7 +1006,7 @@
// Ensure data was provided, or alert than an import error occurred and return false.
if (![importData count]) {
- NSBeginAlertSheet(NSLocalizedString(@"Error", @"Error"),
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"),
NSLocalizedString(@"OK", @"OK button"),
nil, nil,
tableWindow, self,