aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPGrowlController.h
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-10-03 21:47:55 +0000
committerrowanbeentje <rowan@beent.je>2009-10-03 21:47:55 +0000
commitd794d105545e92a75bdaf697580ee7f12b566531 (patch)
tree18a8cf4bc60380284d28b151eb89357cf0df76bd /Source/SPGrowlController.h
parent7abd1679730327d15a33cc516e84e0e368f53696 (diff)
downloadsequelpro-d794d105545e92a75bdaf697580ee7f12b566531.tar.gz
sequelpro-d794d105545e92a75bdaf697580ee7f12b566531.tar.bz2
sequelpro-d794d105545e92a75bdaf697580ee7f12b566531.zip
Improve Growl interaction to reduce general Growl spammage and improve functionality:
- Growls are now only shown by default if they are not fired from the frontmost window - Long-running tasks (>3 secs) will still Growl - Clicking on a Growl will now bring the associated window to the front This addresses the original concerns of Issue #98.
Diffstat (limited to 'Source/SPGrowlController.h')
-rw-r--r--Source/SPGrowlController.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/SPGrowlController.h b/Source/SPGrowlController.h
index 707f6601..cd0f1ded 100644
--- a/Source/SPGrowlController.h
+++ b/Source/SPGrowlController.h
@@ -26,22 +26,38 @@
#import <Cocoa/Cocoa.h>
#import <Growl/Growl.h>
+#define SP_LONGRUNNING_NOTIFICATION_TIME 3.0
+
@interface SPGrowlController : NSObject <GrowlApplicationBridgeDelegate>
+{
+ NSString *timingNotificationName;
+ double timingNotificationStart;
+}
// Singleton controller
+ (SPGrowlController *)sharedGrowlController;
// Post notification
- (void)notifyWithTitle:(NSString *)title
- description:(NSString *)description
+ description:(NSString *)description
+ window:(NSWindow *)window
notificationName:(NSString *)name;
+- (void)notifyWithObject:(NSDictionary *)notificationDictionary;
+
- (void)notifyWithTitle:(NSString *)title
description:(NSString *)description
+ window:(NSWindow *)window
notificationName:(NSString *)name
iconData:(NSData *)data
priority:(int)priority
isSticky:(BOOL)sticky
clickContext:(id)clickContext;
+// Receive notification click
+- (void) growlNotificationWasClicked:(NSDictionary *)clickContext;
+
+// Timing functions
+- (void) setVisibilityForNotificationName:(NSString *)name;
+- (double) milliTime;
@end