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

Log Message:
-----------
simplify remote state indication as we always show it centered

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

Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m     2011-08-20 10:19:58 UTC (rev 7438)
+++ trunk/SKApplicationController.m     2011-08-22 14:31:08 UTC (rev 7439)
@@ -337,12 +337,7 @@
     if (isPressed) {
         if (buttonCode == kHIDRemoteButtonCodeMenu) {
             remoteScrolling = !remoteScrolling;
-            if ([[NSUserDefaults standardUserDefaults] 
floatForKey:SKAppleRemoteSwitchIndicationTimeoutKey] > 0.0) {
-                NSRect rect = [[NSScreen mainScreen] frame];
-                NSPoint point = NSMakePoint(NSMidX(rect), NSMidY(rect));
-                NSInteger type = remoteScrolling ? SKRemoteStateScroll : 
SKRemoteStateResize;
-                [SKRemoteStateWindow showWithType:type atPoint:point];
-            }
+            [SKRemoteStateWindow showWithType:remoteScrolling ? 
SKRemoteStateScroll : SKRemoteStateResize];
         } else {
             NSEvent *theEvent = [NSEvent 
otherEventWithType:NSApplicationDefined
                                                    location:NSZeroPoint

Modified: trunk/SKRemoteStateWindow.h
===================================================================
--- trunk/SKRemoteStateWindow.h 2011-08-20 10:19:58 UTC (rev 7438)
+++ trunk/SKRemoteStateWindow.h 2011-08-22 14:31:08 UTC (rev 7439)
@@ -46,5 +46,5 @@
 typedef NSUInteger SKRemoteState;
 
 @interface SKRemoteStateWindow : SKAnimatedBorderlessWindow
-+ (void)showWithType:(SKRemoteState)remoteState atPoint:(NSPoint)point;
++ (void)showWithType:(SKRemoteState)remoteState;
 @end

Modified: trunk/SKRemoteStateWindow.m
===================================================================
--- trunk/SKRemoteStateWindow.m 2011-08-20 10:19:58 UTC (rev 7438)
+++ trunk/SKRemoteStateWindow.m 2011-08-22 14:31:08 UTC (rev 7439)
@@ -79,19 +79,19 @@
     return [[NSUserDefaults standardUserDefaults] 
floatForKey:SKAppleRemoteSwitchIndicationTimeoutKey];
 }
 
-- (void)showWithType:(SKRemoteState)remoteState atPoint:(NSPoint)point {
+- (void)showWithType:(SKRemoteState)remoteState {
     if ([self autoHideTimeInterval] > 0.0) {
         [self stopAnimation];
         
-        [self setFrame:SKRectFromCenterAndSize(point, SKMakeSquareSize(60.0)) 
display:NO animate:NO];
+        [self setFrame:SKRectFromCenterAndSize(SKCenterPoint([[NSScreen 
mainScreen] frame]), SKMakeSquareSize(60.0)) display:NO animate:NO];
         [(SKRemoteStateView *)[self contentView] setRemoteState:remoteState];
         
         [self orderFrontRegardless];
     }
 }
 
-+ (void)showWithType:(SKRemoteState)remoteState atPoint:(NSPoint)point {
-    [[self sharedRemoteStateWindow] showWithType:remoteState atPoint:point];
++ (void)showWithType:(SKRemoteState)remoteState {
+    [[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