aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPAlertSheets.h
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2013-04-03 01:00:57 +0000
committerrowanbeentje <rowan@beent.je>2013-04-03 01:00:57 +0000
commit9a1f06bd2328561b0ca0a59840470b3f50ec8a47 (patch)
tree3b36ac31ec617fbc818711197068cc4fe7938fcb /Source/SPAlertSheets.h
parentf2d7bfd3eec70fd38797806a95693a7ba3d4feb6 (diff)
downloadsequelpro-9a1f06bd2328561b0ca0a59840470b3f50ec8a47.tar.gz
sequelpro-9a1f06bd2328561b0ca0a59840470b3f50ec8a47.tar.bz2
sequelpro-9a1f06bd2328561b0ca0a59840470b3f50ec8a47.zip
- Move the SPBeginWaitingAlertSheet function to a beginWaitingAlertSheetWithTitle:... class method on a new SPAlertSheets class, allowing us to use invocation forwarding to ensure the entire function is executing on the main thread. This allows runloop processing to happen on the main thread, addressing Issue #1676
Diffstat (limited to 'Source/SPAlertSheets.h')
-rw-r--r--Source/SPAlertSheets.h34
1 files changed, 18 insertions, 16 deletions
diff --git a/Source/SPAlertSheets.h b/Source/SPAlertSheets.h
index ab6f1812..51f5bb32 100644
--- a/Source/SPAlertSheets.h
+++ b/Source/SPAlertSheets.h
@@ -30,6 +30,23 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
+@interface SPAlertSheets : NSObject
+
++ (void)beginWaitingAlertSheetWithTitle:(NSString *)title
+ defaultButton:(NSString *)defaultButton
+ alternateButton:(NSString *)alternateButton
+ otherButton:(NSString *)otherButton
+ alertStyle:(NSAlertStyle)alertStyle
+ docWindow:(NSWindow *)docWindow
+ modalDelegate:(id)modalDelegate
+ didEndSelector:(SEL)didEndSelector
+ contextInfo:(void *)contextInfo
+ msg:(NSString *)msg
+ infoText:(NSString *)infoText
+ returnCode:(NSInteger *)returnCode;
+
+@end
+
void SPBeginAlertSheet(
NSString *title,
NSString *defaultButton,
@@ -40,19 +57,4 @@ void SPBeginAlertSheet(
SEL didEndSelector,
void *contextInfo,
NSString *msg
-);
-
-void SPBeginWaitingAlertSheet(
- NSString *title,
- NSString *defaultButton,
- NSString *alternateButton,
- NSString *otherButton,
-NSAlertStyle alertStyle,
- NSWindow *docWindow,
- id modalDelegate,
- SEL didEndSelector,
- void *contextInfo,
- NSString *msg,
- NSString *infoText,
- NSInteger *returnCode
-);
+); \ No newline at end of file