Browse Source

OBSlider: fetch latest version from HEAD, so we can drop our private patches

Felix Paul Kühne 12 years ago
parent
commit
57e94c9d6e

+ 1 - 10
buildAspenProject.sh

@@ -142,16 +142,7 @@ git clone git://git.videolan.org/vlc-bindings/VLCKit.git
 #cd ..
 fi
 if ! [ -e OBSlider ]; then
-git clone git://github.com/sylverb/OBSlider.git
-info "Applying patches to OBSlider.git"
-cd OBSlider
-git am ../../patches/obslider/*.patch
-if [ $? -ne 0 ]; then
-git am --abort
-info "Applying the patches failed, aborting git-am"
-exit 1
-fi
-cd ..
+git clone git://github.com/ole/OBSlider.git
 fi
 if ! [ -e AQGridView ]; then
 git clone git://github.com/AlanQuatermain/AQGridView.git

+ 0 - 26
patches/obslider/0001-fixed-logic-error.patch

@@ -1,27 +0,0 @@
-From 330c312dc86edccc4ec7b02b64e3a5c0059c9e9b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
-Date: Fri, 19 Oct 2012 13:12:57 +0200
-Subject: [PATCH 1/3] fixed logic error
-
----
- OBSlider/OBSlider.m | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/OBSlider/OBSlider.m b/OBSlider/OBSlider.m
-index f4d1586..53d880a 100644
---- a/OBSlider/OBSlider.m
-+++ b/OBSlider/OBSlider.m
-@@ -127,8 +127,8 @@
-          
-         CGRect trackRect = [self trackRectForBounds:self.bounds];
-         realPositionValue = realPositionValue + (self.maximumValue - self.minimumValue) * (trackingOffset / trackRect.size.width);
--        if ( (self.beganTrackingLocation.y < currentLocation.y) && (currentLocation.y < previousLocation.y) ||
--             (self.beganTrackingLocation.y > currentLocation.y) && (currentLocation.y > previousLocation.y) )
-+        if ( ((self.beganTrackingLocation.y < currentLocation.y) && (currentLocation.y < previousLocation.y)) ||
-+             ((self.beganTrackingLocation.y > currentLocation.y) && (currentLocation.y > previousLocation.y)) )
-             {
-             // We are getting closer to the slider, go closer to the real location
-             self.value = self.value + self.scrubbingSpeed * (self.maximumValue - self.minimumValue) * (trackingOffset / trackRect.size.width) + (realPositionValue - self.value) / ( 1 + fabsf(currentLocation.y - self.beganTrackingLocation.y));
-1.7.12.4 (Apple Git-37)
-

+ 0 - 106
patches/obslider/0002-Convert-code-to-ARC.patch

@@ -1,108 +0,0 @@
-From 7a8668248c5a9ddd65728adc1fd41e9845ec0164 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
-Date: Sun, 28 Apr 2013 17:14:15 +0200
-Subject: [PATCH 2/3] Convert code to ARC
-
----
- OBSlider/OBSlider.h |  8 ++++----
- OBSlider/OBSlider.m | 20 +++++++-------------
- 2 files changed, 11 insertions(+), 17 deletions(-)
-
-diff --git a/OBSlider/OBSlider.h b/OBSlider/OBSlider.h
-index 619836d..eeb32af 100644
---- a/OBSlider/OBSlider.h
-+++ b/OBSlider/OBSlider.h
-@@ -13,14 +13,14 @@
-     float scrubbingSpeed;
-     NSArray *scrubbingSpeeds;
-     NSArray *scrubbingSpeedChangePositions;
--    
-+
-     CGPoint beganTrackingLocation;
--	
-+
-     float realPositionValue;
- }
- 
- @property (assign, readonly) float scrubbingSpeed;
--@property (retain) NSArray *scrubbingSpeeds;
--@property (retain) NSArray *scrubbingSpeedChangePositions;
-+@property (strong) NSArray *scrubbingSpeeds;
-+@property (strong) NSArray *scrubbingSpeedChangePositions;
- 
- @end
-diff --git a/OBSlider/OBSlider.m b/OBSlider/OBSlider.m
-index 53d880a..1dcf4bc 100644
---- a/OBSlider/OBSlider.m
-+++ b/OBSlider/OBSlider.m
-@@ -28,12 +28,6 @@
- @synthesize beganTrackingLocation;
- 
- 
--{
--    self.scrubbingSpeeds = nil;
--    self.scrubbingSpeedChangePositions = nil;
--    [super dealloc];
--}
- 
- 
- - (id) initWithFrame:(CGRect)frame
-@@ -56,7 +50,7 @@
- - (id) initWithCoder:(NSCoder *)decoder
- {
-     self = [super initWithCoder:decoder];
--    if (self != nil) 
-+    if (self != nil)
-     {
-     	if ([decoder containsValueForKey:@"scrubbingSpeeds"]) {
-             self.scrubbingSpeeds = [decoder decodeObjectForKey:@"scrubbingSpeeds"];
-@@ -69,7 +63,7 @@
-         } else {
-             self.scrubbingSpeedChangePositions = [self defaultScrubbingSpeedChangePositions];
-         }
--        
-+
-         self.scrubbingSpeed = [[self.scrubbingSpeeds objectAtIndex:0] floatValue];
-     }
-     return self;
-@@ -105,7 +99,7 @@
-             return i;
-         }
-     }
--    return NSNotFound; 
-+    return NSNotFound;
- }
- 
- 
-@@ -116,15 +110,15 @@
-         CGPoint previousLocation = [touch previousLocationInView:self];
-         CGPoint currentLocation  = [touch locationInView:self];
-         CGFloat trackingOffset = currentLocation.x - previousLocation.x;
--        
-+
-         // Find the scrubbing speed that curresponds to the touch's vertical offset
-         CGFloat verticalOffset = fabsf(currentLocation.y - self.beganTrackingLocation.y);
--        NSUInteger scrubbingSpeedChangePosIndex = [self findIndexOfLowerScrubbingSpeed:self.scrubbingSpeedChangePositions :verticalOffset];        
-+        NSUInteger scrubbingSpeedChangePosIndex = [self findIndexOfLowerScrubbingSpeed:self.scrubbingSpeedChangePositions :verticalOffset];
-         if (scrubbingSpeedChangePosIndex == NSNotFound) {
-             scrubbingSpeedChangePosIndex = [self.scrubbingSpeeds count];
-         }
-         self.scrubbingSpeed = [[self.scrubbingSpeeds objectAtIndex:scrubbingSpeedChangePosIndex - 1] floatValue];
--         
-+
-         CGRect trackRect = [self trackRectForBounds:self.bounds];
-         realPositionValue = realPositionValue + (self.maximumValue - self.minimumValue) * (trackingOffset / trackRect.size.width);
-         if ( ((self.beganTrackingLocation.y < currentLocation.y) && (currentLocation.y < previousLocation.y)) ||
-@@ -146,7 +140,7 @@
- 
- - (void) endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event
- {
--    if (self.tracking) 
-+    if (self.tracking)
-     {
-         self.scrubbingSpeed = [[self.scrubbingSpeeds objectAtIndex:0] floatValue];
-         [self sendActionsForControlEvents:UIControlEventValueChanged];
-1.7.12.4 (Apple Git-37)
-

+ 0 - 92
patches/obslider/0003-Upgrade-ObjC-syntax.patch

@@ -1,93 +0,0 @@
-From baeb9d2044195cd6ce202d96a37c45a9ebf20101 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
-Date: Sun, 28 Apr 2013 17:34:36 +0200
-Subject: [PATCH 3/3] Upgrade ObjC syntax
-
----
- OBSlider/OBSlider.m | 30 +++++++++++++-----------------
- 1 file changed, 13 insertions(+), 17 deletions(-)
-
-diff --git a/OBSlider/OBSlider.m b/OBSlider/OBSlider.m
-index 1dcf4bc..6b8a2c3 100644
---- a/OBSlider/OBSlider.m
-+++ b/OBSlider/OBSlider.m
-@@ -37,7 +37,7 @@
-     {
-         self.scrubbingSpeeds = [self defaultScrubbingSpeeds];
-         self.scrubbingSpeedChangePositions = [self defaultScrubbingSpeedChangePositions];
--        self.scrubbingSpeed = [[self.scrubbingSpeeds objectAtIndex:0] floatValue];
-+        self.scrubbingSpeed = [(self.scrubbingSpeeds)[0] floatValue];
-     }
-     return self;
- }
-@@ -64,7 +64,7 @@
-             self.scrubbingSpeedChangePositions = [self defaultScrubbingSpeedChangePositions];
-         }
- 
--        self.scrubbingSpeed = [[self.scrubbingSpeeds objectAtIndex:0] floatValue];
-+        self.scrubbingSpeed = [(self.scrubbingSpeeds)[0] floatValue];
-     }
-     return self;
- }
-@@ -94,7 +94,7 @@
- 
- - (NSUInteger) findIndexOfLowerScrubbingSpeed:(NSArray*)scrubbingSpeedPositions :(CGFloat)verticalOffset {
-     for (int i=0; i < [scrubbingSpeedPositions count]; i++) {
--        NSNumber *obj = [scrubbingSpeedPositions objectAtIndex:i];
-+        NSNumber *obj = scrubbingSpeedPositions[i];
-         if (verticalOffset < [obj floatValue]) {
-             return i;
-         }
-@@ -117,7 +117,7 @@
-         if (scrubbingSpeedChangePosIndex == NSNotFound) {
-             scrubbingSpeedChangePosIndex = [self.scrubbingSpeeds count];
-         }
--        self.scrubbingSpeed = [[self.scrubbingSpeeds objectAtIndex:scrubbingSpeedChangePosIndex - 1] floatValue];
-+        self.scrubbingSpeed = [(self.scrubbingSpeeds)[scrubbingSpeedChangePosIndex - 1] floatValue];
- 
-         CGRect trackRect = [self trackRectForBounds:self.bounds];
-         realPositionValue = realPositionValue + (self.maximumValue - self.minimumValue) * (trackingOffset / trackRect.size.width);
-@@ -142,7 +142,7 @@
- {
-     if (self.tracking)
-     {
--        self.scrubbingSpeed = [[self.scrubbingSpeeds objectAtIndex:0] floatValue];
-+        self.scrubbingSpeed = [(self.scrubbingSpeeds)[0] floatValue];
-         [self sendActionsForControlEvents:UIControlEventValueChanged];
-     }
- }
-@@ -155,23 +155,19 @@
- // Used in -initWithFrame: and -initWithCoder:
- - (NSArray *) defaultScrubbingSpeeds
- {
--    return [NSArray arrayWithObjects:
--            [NSNumber numberWithFloat:1.0f],
--            [NSNumber numberWithFloat:0.5f],
--            [NSNumber numberWithFloat:0.25f],
--            [NSNumber numberWithFloat:0.1f],
--            nil];
-+    return @[@1.0f,
-+             @0.5f,
-+             @0.25f,
-+             @0.1f];
- }
- 
- 
- - (NSArray *) defaultScrubbingSpeedChangePositions
- {
--    return [NSArray arrayWithObjects:
--            [NSNumber numberWithFloat:0.0f],
--            [NSNumber numberWithFloat:50.0f],
--            [NSNumber numberWithFloat:100.0f],
--            [NSNumber numberWithFloat:150.0f],
--            nil];
-+    return @[@0.0f,
-+             @50.0f,
-+             @100.0f,
-+             @150.0f];
- }
- 
- @end
-1.7.12.4 (Apple Git-37)
-