Revision: 3927
http://skim-app.svn.sourceforge.net/skim-app/?rev=3927&view=rev
Author: hofman
Date: 2008-05-28 08:28:33 -0700 (Wed, 28 May 2008)
Log Message:
-----------
Rename accessor for placards in scrollview.
Modified Paths:
--------------
trunk/BDSKZoomablePDFView.m
trunk/NSScrollView_SKExtensions.h
trunk/NSScrollView_SKExtensions.m
trunk/SKSecondaryPDFView.m
Modified: trunk/BDSKZoomablePDFView.m
===================================================================
--- trunk/BDSKZoomablePDFView.m 2008-05-28 13:17:32 UTC (rev 3926)
+++ trunk/BDSKZoomablePDFView.m 2008-05-28 15:28:33 UTC (rev 3927)
@@ -152,7 +152,7 @@
[scalePopUpButton selectItemAtIndex:cnt];
// put it in the scrollview
- [scrollView setSubcontrols:[NSArray arrayWithObject:scalePopUpButton]];
+ [scrollView setPlacards:[NSArray arrayWithObject:scalePopUpButton]];
[scalePopUpButton release];
}
}
Modified: trunk/NSScrollView_SKExtensions.h
===================================================================
--- trunk/NSScrollView_SKExtensions.h 2008-05-28 13:17:32 UTC (rev 3926)
+++ trunk/NSScrollView_SKExtensions.h 2008-05-28 15:28:33 UTC (rev 3927)
@@ -41,8 +41,8 @@
@interface NSScrollView (SKExtensions)
-- (NSArray *)subcontrols;
-- (void)setSubcontrols:(NSArray *)newSubcontrols;
+- (NSArray *)placards;
+- (void)setPlacards:(NSArray *)newPlacards;
// new API allows ignoring PDFView's attempts to remove the horizontal scroller
- (void)setAlwaysHasHorizontalScroller:(BOOL)flag;
Modified: trunk/NSScrollView_SKExtensions.m
===================================================================
--- trunk/NSScrollView_SKExtensions.m 2008-05-28 13:17:32 UTC (rev 3926)
+++ trunk/NSScrollView_SKExtensions.m 2008-05-28 15:28:33 UTC (rev 3927)
@@ -54,7 +54,7 @@
static CFMutableSetRef scrollViewsWithoutHorizontalScrollers = NULL;
static CFMutableSetRef scrollViewsWithVerticalScrollers = NULL;
static CFMutableSetRef scrollViewsWithoutVerticalScrollers = NULL;
-static CFMutableDictionaryRef scrollViewSubcontrols = NULL;
+static CFMutableDictionaryRef scrollViewPlacards = NULL;
- (void)replacementDealloc;
{
@@ -62,7 +62,7 @@
CFSetRemoveValue(scrollViewsWithoutHorizontalScrollers, self);
CFSetRemoveValue(scrollViewsWithVerticalScrollers, self);
CFSetRemoveValue(scrollViewsWithoutVerticalScrollers, self);
- CFDictionaryRemoveValue(scrollViewSubcontrols, self);
+ CFDictionaryRemoveValue(scrollViewPlacards, self);
originalDealloc(self, _cmd);
}
@@ -151,15 +151,15 @@
- (void)replacementTile {
originalTile(self, _cmd);
- NSArray *subcontrols = [self subcontrols];
+ NSArray *placards = [self placards];
- if ([subcontrols count]) {
- NSEnumerator *viewEnum = [subcontrols objectEnumerator];
+ if ([placards count]) {
+ NSEnumerator *viewEnum = [placards objectEnumerator];
NSView *view;
NSScroller *horizScroller = [self horizontalScroller];
NSRect viewFrame, horizScrollerFrame = [horizScroller frame];
float height = NSHeight(horizScrollerFrame) - 1.0, totalWidth = 0.0;
- BDSKEdgeView *edgeView = (BDSKEdgeView *)[[[subcontrols lastObject]
superview] superview];
+ BDSKEdgeView *edgeView = (BDSKEdgeView *)[[[placards lastObject]
superview] superview];
if ([edgeView isDescendantOf:self] == NO) {
edgeView = [[[BDSKEdgeView alloc] init] autorelease];
@@ -195,29 +195,29 @@
scrollViewsWithoutHorizontalScrollers =
CFSetCreateMutable(CFAllocatorGetDefault(), 0, NULL);
scrollViewsWithVerticalScrollers =
CFSetCreateMutable(CFAllocatorGetDefault(), 0, NULL);
scrollViewsWithoutVerticalScrollers =
CFSetCreateMutable(CFAllocatorGetDefault(), 0, NULL);
- scrollViewSubcontrols = CFDictionaryCreateMutable(CFAllocatorGetDefault(),
0, NULL, &kCFTypeDictionaryValueCallBacks);
+ scrollViewPlacards = CFDictionaryCreateMutable(CFAllocatorGetDefault(), 0,
NULL, &kCFTypeDictionaryValueCallBacks);
}
-- (NSArray *)subcontrols {
- return (NSArray *)CFDictionaryGetValue(scrollViewSubcontrols, self);
+- (NSArray *)placards {
+ return (NSArray *)CFDictionaryGetValue(scrollViewPlacards, self);
}
-- (void)setSubcontrols:(NSArray *)newSubControls {
- NSMutableArray *subcontrols = (NSMutableArray
*)CFDictionaryGetValue(scrollViewSubcontrols, self);
- if (subcontrols == nil && [newSubControls count]) {
- subcontrols = [NSMutableArray array];
- CFDictionarySetValue(scrollViewSubcontrols, self, subcontrols);
+- (void)setPlacards:(NSArray *)newPlacards {
+ NSMutableArray *placards = (NSMutableArray
*)CFDictionaryGetValue(scrollViewPlacards, self);
+ if (placards == nil && [newPlacards count]) {
+ placards = [NSMutableArray array];
+ CFDictionarySetValue(scrollViewPlacards, self, placards);
}
- [[[[subcontrols lastObject] superview] superview] removeFromSuperview];
- [subcontrols setArray:newSubControls];
+ [[[[placards lastObject] superview] superview] removeFromSuperview];
+ [placards setArray:newPlacards];
- if ([subcontrols count] == 0 && subcontrols) {
- CFDictionaryRemoveValue(scrollViewSubcontrols, self);
- subcontrols = nil;
+ if ([placards count] == 0 && placards) {
+ CFDictionaryRemoveValue(scrollViewPlacards, self);
+ placards = nil;
}
- [self setAlwaysHasHorizontalScroller:[subcontrols count] != 0];
+ [self setAlwaysHasHorizontalScroller:[placards count] != 0];
[self tile];
}
Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m 2008-05-28 13:17:32 UTC (rev 3926)
+++ trunk/SKSecondaryPDFView.m 2008-05-28 15:28:33 UTC (rev 3927)
@@ -230,7 +230,7 @@
[pagePopUpButton setAction:@selector(pagePopUpAction:)];
// put it in the scrollview
- [scrollView setSubcontrols:[NSArray arrayWithObjects:pagePopUpButton,
scalePopUpButton, nil]];
+ [scrollView setPlacards:[NSArray arrayWithObjects:pagePopUpButton,
scalePopUpButton, nil]];
[scalePopUpButton release];
[pagePopUpButton release];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit