[vlc-devel] commit: macosx: remove some more special cases for 10.4 and earlier ( Felix Paul Kühne )
git version control
git at videolan.org
Tue Mar 3 15:05:59 CET 2009
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Feb 28 19:53:33 2009 +0100| [2c1b14a00d3519e305f608dcf3cba0a96ba270cc] | committer: Felix Paul Kühne
macosx: remove some more special cases for 10.4 and earlier
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c1b14a00d3519e305f608dcf3cba0a96ba270cc
---
modules/gui/macosx/AppleRemote.m | 48 ++++++++++---------------------------
modules/gui/macosx/misc.m | 8 +++---
2 files changed, 17 insertions(+), 39 deletions(-)
diff --git a/modules/gui/macosx/AppleRemote.m b/modules/gui/macosx/AppleRemote.m
index e1b036c..2440120 100644
--- a/modules/gui/macosx/AppleRemote.m
+++ b/modules/gui/macosx/AppleRemote.m
@@ -32,7 +32,7 @@
* or (at your option) any later version.
* Thus, the following statements apply to our changes:
*
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright (C) 2006-2009 the VideoLAN team
* Authors: Eric Petit <titer at m0k.org>
* Felix Kühne <fkuehne at videolan dot org>
*
@@ -61,10 +61,6 @@ const int REMOTE_SWITCH_COOKIE=19;
const NSTimeInterval DEFAULT_MAXIMUM_CLICK_TIME_DIFFERENCE=0.35;
const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL=0.4;
-#ifndef NSUInteger
-#define NSUInteger unsigned
-#endif
-
@implementation AppleRemote
#pragma public interface
@@ -76,36 +72,18 @@ const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL=0.4;
hidDeviceInterface = NULL;
cookieToButtonMapping = [[NSMutableDictionary alloc] init];
- if( MACOS_VERSION < 10.5f )
- {
- /* use the traditional cookies for Tiger (and Panther, if it is supported by the frame app) */
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Plus] forKey:@"14_12_11_6_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Minus] forKey:@"14_13_11_6_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu] forKey:@"14_7_6_14_7_6_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay] forKey:@"14_8_6_14_8_6_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight] forKey:@"14_9_6_14_9_6_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft] forKey:@"14_10_6_14_10_6_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight_Hold] forKey:@"14_6_4_2_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft_Hold] forKey:@"14_6_3_2_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu_Hold] forKey:@"14_6_14_6_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Sleep] forKey:@"18_14_6_18_14_6_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"];
- }
- else
- {
- /* we're on Leopard and need to use a new set of cookies */
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Plus] forKey:@"31_29_28_18_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Minus] forKey:@"31_30_28_18_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu] forKey:@"31_20_18_31_20_18_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay] forKey:@"31_21_18_31_21_18_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight] forKey:@"31_22_18_31_22_18_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft] forKey:@"31_23_18_31_23_18_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight_Hold] forKey:@"31_18_4_2_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft_Hold] forKey:@"31_18_3_2_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu_Hold] forKey:@"31_18_31_18_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Sleep] forKey:@"35_31_18_35_31_18_"];
- [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"];
- }
+ /* we're on Leopard and need to use a different set of cookies then we used to on Tiger and earlier */
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Plus] forKey:@"31_29_28_18_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Minus] forKey:@"31_30_28_18_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu] forKey:@"31_20_18_31_20_18_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay] forKey:@"31_21_18_31_21_18_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight] forKey:@"31_22_18_31_22_18_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft] forKey:@"31_23_18_31_23_18_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight_Hold] forKey:@"31_18_4_2_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft_Hold] forKey:@"31_18_3_2_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu_Hold] forKey:@"31_18_31_18_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Sleep] forKey:@"35_31_18_35_31_18_"];
+ [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"];
/* defaults */
[self setSimulatesPlusMinusHold: YES];
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 2552009..347148b 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -1,7 +1,7 @@
/*****************************************************************************
* misc.m: code not specific to vlc
*****************************************************************************
- * Copyright (C) 2003-2008 the VideoLAN team
+ * Copyright (C) 2003-2009 the VideoLAN team
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl at nanocrew.net>
@@ -248,7 +248,7 @@ static NSMutableArray *blackoutWindows = NULL;
{
NSInvocation *invoc;
- if (!animate || MACOS_VERSION < 10.4f)
+ if (!animate)
{
[super close];
return;
@@ -280,7 +280,7 @@ static NSMutableArray *blackoutWindows = NULL;
NSViewAnimation *current_anim;
NSMutableDictionary *dict;
- if (!animate || MACOS_VERSION < 10.4f)
+ if (!animate)
{
[self orderOut: sender];
return;
@@ -329,7 +329,7 @@ static NSMutableArray *blackoutWindows = NULL;
NSViewAnimation *current_anim;
NSMutableDictionary *dict;
- if (!animate || MACOS_VERSION < 10.4f)
+ if (!animate)
{
[super orderFront: sender];
[self setAlphaValue: 1.0];
More information about the vlc-devel
mailing list