Revision: 3368
http://skim-app.svn.sourceforge.net/skim-app/?rev=3368&view=rev
Author: hofman
Date: 2008-01-11 07:54:31 -0800 (Fri, 11 Jan 2008)
Log Message:
-----------
Don't bounce the dock icon when showing the progress sheet.
Modified Paths:
--------------
trunk/SKApplication.h
trunk/SKApplication.m
trunk/SKProgressController.m
Modified: trunk/SKApplication.h
===================================================================
--- trunk/SKApplication.h 2008-01-10 16:37:54 UTC (rev 3367)
+++ trunk/SKApplication.h 2008-01-11 15:54:31 UTC (rev 3368)
@@ -40,7 +40,11 @@
extern NSString *SKApplicationStartsTerminatingNotification;
[EMAIL PROTECTED] SKApplication : NSApplication
[EMAIL PROTECTED] SKApplication : NSApplication {
+ BOOL userAttentionDisabled;
+}
+- (BOOL)isUserAttentionDisabled;
+- (void)setUserAttentionDisabled:(BOOL)flag;
@end
Modified: trunk/SKApplication.m
===================================================================
--- trunk/SKApplication.m 2008-01-10 16:37:54 UTC (rev 3367)
+++ trunk/SKApplication.m 2008-01-11 15:54:31 UTC (rev 3368)
@@ -51,6 +51,18 @@
@implementation SKApplication
+- (BOOL)isUserAttentionDisabled {
+ return userAttentionDisabled;
+}
+
+- (void)setUserAttentionDisabled:(BOOL)flag {
+ userAttentionDisabled = flag;
+}
+
+- (int)requestUserAttention:(NSRequestUserAttentionType)requestType {
+ return userAttentionDisabled ? 0 : [super
requestUserAttention:requestType];
+}
+
- (void)sendEvent:(NSEvent *)anEvent {
if ([anEvent type] == NSScrollWheel && [anEvent modifierFlags] &
NSAlternateKeyMask) {
id target = [self targetForAction:@selector(magnifyWheel:)];
Modified: trunk/SKProgressController.m
===================================================================
--- trunk/SKProgressController.m 2008-01-10 16:37:54 UTC (rev 3367)
+++ trunk/SKProgressController.m 2008-01-11 15:54:31 UTC (rev 3368)
@@ -37,6 +37,7 @@
*/
#import "SKProgressController.h"
+#import "SKApplication.h"
@implementation SKProgressController
@@ -115,7 +116,9 @@
- (void)beginSheetModalForWindow:(NSWindow *)window {
[self window];
[progressBar startAnimation:self];
+ [(SKApplication *)NSApp setUserAttentionDisabled:YES];
[NSApp beginSheet:[self window] modalForWindow:window modalDelegate:nil
didEndSelector:NULL contextInfo:NULL];
+ [(SKApplication *)NSApp setUserAttentionDisabled:NO];
}
- (void)endSheet {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit