Revision: 7440
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7440&view=rev
Author:   hofman
Date:     2011-08-22 14:33:15 +0000 (Mon, 22 Aug 2011)

Log Message:
-----------
no need to create remote state window when we're not showing it

Modified Paths:
--------------
    trunk/SKRemoteStateWindow.m

Modified: trunk/SKRemoteStateWindow.m
===================================================================
--- trunk/SKRemoteStateWindow.m 2011-08-22 14:31:08 UTC (rev 7439)
+++ trunk/SKRemoteStateWindow.m 2011-08-22 14:33:15 UTC (rev 7440)
@@ -61,6 +61,10 @@
     return sharedRemoteStateWindow;
 }
 
++ (NSTimeInterval)timeInterval {
+    return [[NSUserDefaults standardUserDefaults] 
floatForKey:SKAppleRemoteSwitchIndicationTimeoutKey];
+}
+
 - (id)init {
     NSRect contentRect = SKRectFromCenterAndSquareSize(NSZeroPoint, 
WINDOW_SIZE);
     self = [super initWithContentRect:contentRect];
@@ -76,7 +80,7 @@
 - (CGFloat)defaultAlphaValue { return ALPHA_VALUE; }
 
 - (NSTimeInterval)autoHideTimeInterval {
-    return [[NSUserDefaults standardUserDefaults] 
floatForKey:SKAppleRemoteSwitchIndicationTimeoutKey];
+    return [[self class] timeInterval];
 }
 
 - (void)showWithType:(SKRemoteState)remoteState {
@@ -91,7 +95,8 @@
 }
 
 + (void)showWithType:(SKRemoteState)remoteState {
-    [[self sharedRemoteStateWindow] showWithType:remoteState];
+    if ([[self class] timeInterval] > 0.0)
+        [[self sharedRemoteStateWindow] showWithType:remoteState];
 }
 
 @end


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to