Revision: 7442
http://skim-app.svn.sourceforge.net/skim-app/?rev=7442&view=rev
Author: hofman
Date: 2011-08-23 11:33:09 +0000 (Tue, 23 Aug 2011)
Log Message:
-----------
Prevent Lion from changing the scroller style when there's a placard view
Modified Paths:
--------------
trunk/NSScrollView_SKExtensions.m
Modified: trunk/NSScrollView_SKExtensions.m
===================================================================
--- trunk/NSScrollView_SKExtensions.m 2011-08-23 11:31:49 UTC (rev 7441)
+++ trunk/NSScrollView_SKExtensions.m 2011-08-23 11:33:09 UTC (rev 7442)
@@ -65,7 +65,7 @@
static void (*original_setHasHorizontalScroller)(id, SEL, BOOL) = NULL;
static void (*original_setAutohidesScrollers)(id, SEL, BOOL) = NULL;
-static void (*original_setScrollerStyle)(id, SEL, BOOL) = NULL;
+static void (*original_setScrollerStyle)(id, SEL, NSScrollerStyle) = NULL;
static void (*original_dealloc)(id, SEL) = NULL;
static void (*original_tile)(id, SEL) = NULL;
@@ -92,7 +92,7 @@
- (void)replacement_setScrollerStyle:(NSScrollerStyle)newScrollerStyle;
{
if ([scrollViewPlacardViews objectForKey:self] == nil)
- original_setScrollerStyle(self, _cmd, flag);
+ original_setScrollerStyle(self, _cmd, newScrollerStyle);
}
- (void)replacement_tile {
@@ -114,7 +114,7 @@
+ (void)load {
original_setHasHorizontalScroller = (void (*)(id, SEL,
BOOL))SKReplaceInstanceMethodImplementationFromSelector(self,
@selector(setHasHorizontalScroller:),
@selector(replacement_setHasHorizontalScroller:));
original_setAutohidesScrollers = (void (*)(id, SEL,
BOOL))SKReplaceInstanceMethodImplementationFromSelector(self,
@selector(setAutohidesScrollers:),
@selector(replacement_setAutohidesScrollers:));
- original_setScrollerStyle = (void (*)(id, SEL,
BOOL))SKReplaceInstanceMethodImplementationFromSelector(self,
@selector(setAutohidesScrollers:), @selector(replacement_setScrollerStyle:));
+ original_setScrollerStyle = (void (*)(id, SEL,
NSScrollerStyle))SKReplaceInstanceMethodImplementationFromSelector(self,
@selector(setAutohidesScrollers:), @selector(replacement_setScrollerStyle:));
original_dealloc = (void (*)(id,
SEL))SKReplaceInstanceMethodImplementationFromSelector(self,
@selector(dealloc), @selector(replacement_dealloc));
original_tile = (void (*)(id,
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(tile),
@selector(replacement_tile));
@@ -142,11 +142,11 @@
original_setHasHorizontalScroller(self,
@selector(setHasHorizontalScroller:), YES);
original_setAutohidesScrollers(self,
@selector(setAutohidesScrollers:), NO);
if (original_setScrollerStyle != NULL)
- original_setScrollerStyle(NSScrollerStyleOverlay);
+ original_setScrollerStyle(self, @selector(setScrollerStyle:),
NSScrollerStyleOverlay);
} else if (placardView) {
[scrollViewPlacardViews removeObjectForKey:self];
if (original_setScrollerStyle != NULL && [NSScroller
respondsToSelector:@selector(preferredScrollerStyle)])
- original_setScrollerStyle([NSScroller preferredScrollerStyle]);
+ original_setScrollerStyle(self, @selector(setScrollerStyle:),
[NSScroller preferredScrollerStyle]);
}
[placardView release];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit