aboutsummaryrefslogtreecommitdiffstats
path: root/TableDocument.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2008-11-28 23:52:42 +0000
committerstuconnolly <stuart02@gmail.com>2008-11-28 23:52:42 +0000
commitddbed0ade57c4efecbb7cd9a09047a1ce80ae497 (patch)
tree68cc14f92f250de42cf175d56da9207a5610b396 /TableDocument.m
parentd45adb6d2a0c305cc431d75cd20844dbe721f388 (diff)
downloadsequelpro-ddbed0ade57c4efecbb7cd9a09047a1ce80ae497.tar.gz
sequelpro-ddbed0ade57c4efecbb7cd9a09047a1ce80ae497.tar.bz2
sequelpro-ddbed0ade57c4efecbb7cd9a09047a1ce80ae497.zip
New Growl notification controller.
Diffstat (limited to 'TableDocument.m')
-rw-r--r--TableDocument.m46
1 files changed, 15 insertions, 31 deletions
diff --git a/TableDocument.m b/TableDocument.m
index 785907f1..f9805288 100644
--- a/TableDocument.m
+++ b/TableDocument.m
@@ -32,7 +32,7 @@
#import "TableDump.h"
#import "TableStatus.h"
#import "ImageAndTextCell.h"
-#import <Growl/Growl.h>
+#import "SPGrowlController.h"
NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocumentFavoritesControllerSelectionIndexDidChange";
NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFavoritesControllerFavoritesDidChange";
@@ -207,16 +207,10 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
[tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", mySQLVersion, [userField stringValue],
[hostField stringValue], [databaseField stringValue]]];
- // Connected Growl Notification
- [GrowlApplicationBridge notifyWithTitle:@"Connected"
- description:[NSString stringWithFormat:NSLocalizedString(@"Connected to %@",@"description for connected growl notification"), [tableWindow title]]
- notificationName:@"Connected"
- iconData:nil
- priority:0
- isSticky:NO
- clickContext:nil
- ];
-
+ // Connected Growl notification
+ [[SPGrowlController sharedGrowlController] notifyWithTitle:@"Connected"
+ description:[NSString stringWithFormat:NSLocalizedString(@"Connected to %@",@"description for connected growl notification"), [tableWindow title]]
+ notificationName:@"Connected"];
} else if (code == 2) {
//can't connect to host
@@ -813,16 +807,11 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
NSPasteboard *pb = [NSPasteboard generalPasteboard];
[pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self];
[pb setString:tableSyntax forType:NSStringPboardType];
-
- // Table Syntax Copied Growl Notification
- [GrowlApplicationBridge notifyWithTitle:@"Table Syntax Copied"
- description:[NSString stringWithFormat:NSLocalizedString(@"Syntax for %@ table copied",@"description for table syntax copied growl notification"), [self table]]
- notificationName:@"Table Syntax Copied"
- iconData:nil
- priority:0
- isSticky:NO
- clickContext:nil
- ];
+
+ // Table syntax copied Growl notification
+ [[SPGrowlController sharedGrowlController] notifyWithTitle:@"Table Syntax Copied"
+ description:[NSString stringWithFormat:NSLocalizedString(@"Syntax for %@ table copied",@"description for table syntax copied growl notification"), [self table]]
+ notificationName:@"Table Syntax Copied"];
}
- (IBAction)checkTable:(id)sender
@@ -1015,16 +1004,11 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
- (void)closeConnection
{
[mySQLConnection disconnect];
-
- // Disconnected Growl Notification
- [GrowlApplicationBridge notifyWithTitle:@"Disconnected"
- description:[NSString stringWithFormat:NSLocalizedString(@"Disconnected from %@",@"description for disconnected growl notification"), [tableWindow title]]
- notificationName:@"Disconnected"
- iconData:nil
- priority:0
- isSticky:NO
- clickContext:nil
- ];
+
+ // Disconnected Growl notification
+ [[SPGrowlController sharedGrowlController] notifyWithTitle:@"Disconnected"
+ description:[NSString stringWithFormat:NSLocalizedString(@"Disconnected from %@",@"description for disconnected growl notification"), [tableWindow title]]
+ notificationName:@"Disconnected"];
}