Revision: 18305
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18305&view=rev
Author:   hofman
Date:     2011-12-09 18:01:27 +0000 (Fri, 09 Dec 2011)
Log Message:
-----------
rename method

Modified Paths:
--------------
    trunk/bibdesk/BDSKAddressTextField.m
    trunk/bibdesk/BDSKAddressTextFieldCell.h
    trunk/bibdesk/BDSKAddressTextFieldCell.m

Modified: trunk/bibdesk/BDSKAddressTextField.m
===================================================================
--- trunk/bibdesk/BDSKAddressTextField.m        2011-12-09 12:57:08 UTC (rev 
18304)
+++ trunk/bibdesk/BDSKAddressTextField.m        2011-12-09 18:01:27 UTC (rev 
18305)
@@ -146,7 +146,7 @@
 
 - (void)mouseDown:(NSEvent *)theEvent {
     if ([[self delegate] 
respondsToSelector:@selector(addressTextField:writeDataToPasteboard:)]) {
-        NSRect iconRect = [[self cell] iconRectForBounds:[[self cell] 
layoutRectForBounds:[self bounds] inView:self]];
+        NSRect iconRect = [[self cell] iconRectForBounds:[[self cell] 
adjustedFrame:[self bounds] inView:self]];
         NSPoint mouseLoc = [self convertPoint:[theEvent locationInWindow] 
fromView:nil];
         if (NSMouseInRect(mouseLoc, iconRect, [self isFlipped])) {
             NSEvent *nextEvent = [[self window] nextEventMatchingMask: 
NSLeftMouseUpMask | NSLeftMouseDraggedMask];

Modified: trunk/bibdesk/BDSKAddressTextFieldCell.h
===================================================================
--- trunk/bibdesk/BDSKAddressTextFieldCell.h    2011-12-09 12:57:08 UTC (rev 
18304)
+++ trunk/bibdesk/BDSKAddressTextFieldCell.h    2011-12-09 18:01:27 UTC (rev 
18305)
@@ -41,5 +41,5 @@
 
 
 @interface BDSKAddressTextFieldCell : BDSKTextWithIconCell
-- (NSRect)layoutRectForBounds:(NSRect)aRect inView:(NSView *)controlView;
+- (NSRect)adjustedFrame:(NSRect)aRect inView:(NSView *)controlView;
 @end

Modified: trunk/bibdesk/BDSKAddressTextFieldCell.m
===================================================================
--- trunk/bibdesk/BDSKAddressTextFieldCell.m    2011-12-09 12:57:08 UTC (rev 
18304)
+++ trunk/bibdesk/BDSKAddressTextFieldCell.m    2011-12-09 18:01:27 UTC (rev 
18305)
@@ -43,8 +43,20 @@
 
 + (Class)formatterClass { return Nil; }
 
+- (NSRect)textRectForBounds:(NSRect)aRect {
+    NSRect ignored, rect = [super textRectForBounds:aRect];
+    NSDivideRect(rect, &ignored, &rect, 17.0, NSMaxXEdge);
+    return rect;
+}
+
+- (NSRect)adjustedFrame:(NSRect)aRect inView:(NSView *)controlView {
+       NSRect ignored;
+    NSDivideRect(aRect, &ignored, &aRect, 1.0, [controlView isFlipped] ? 
NSMaxYEdge : NSMinYEdge);
+    return aRect;
+}
+
 - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
-       NSRect outlineRect = [self layoutRectForBounds:cellFrame 
inView:controlView];
+       NSRect outlineRect = [self adjustedFrame:cellFrame inView:controlView];
     NSRect outerShadowRect, innerShadowRect, ignored;
        NSGradient *gradient = nil;
     
@@ -77,28 +89,16 @@
        }
 }
 
-- (NSRect)textRectForBounds:(NSRect)aRect {
-    NSRect ignored, rect = [super textRectForBounds:aRect];
-    NSDivideRect(rect, &ignored, &rect, 17.0, NSMaxXEdge);
-    return rect;
-}
-
-- (NSRect)layoutRectForBounds:(NSRect)aRect inView:(NSView *)controlView {
-       NSRect ignored;
-    NSDivideRect(aRect, &ignored, &aRect, 1.0, [controlView isFlipped] ? 
NSMaxYEdge : NSMinYEdge);
-    return aRect;
-}
-
 - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
-    [super drawInteriorWithFrame:[self layoutRectForBounds:cellFrame 
inView:controlView] inView:controlView];
+    [super drawInteriorWithFrame:[self adjustedFrame:cellFrame 
inView:controlView] inView:controlView];
 }
 
 - (void)editWithFrame:(NSRect)aRect inView:(NSView *)controlView 
editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)theEvent {
-    [super editWithFrame:[self layoutRectForBounds:aRect inView:controlView] 
inView:controlView editor:textObj delegate:anObject event:theEvent];
+    [super editWithFrame:[self adjustedFrame:aRect inView:controlView] 
inView:controlView editor:textObj delegate:anObject event:theEvent];
 }
 
 - (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView 
editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart 
length:(NSInteger)selLength {
-    [super selectWithFrame:[self layoutRectForBounds:aRect inView:controlView] 
inView:controlView editor:textObj delegate:anObject start:selStart 
length:selLength];
+    [super selectWithFrame:[self adjustedFrame:aRect inView:controlView] 
inView:controlView editor:textObj delegate:anObject start:selStart 
length:selLength];
 }
 
 @end

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to