From f83a371d2f448572d0ac076aec4d3d593e77a7ce Mon Sep 17 00:00:00 2001 From: CaS Date: Tue, 29 Mar 2005 10:08:50 +0000 Subject: [PATCH] Tweaks for subclassing git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20998 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 +++++++- Headers/Additions/GNUstepGUI/GSDragView.h | 4 ++-- Source/GSDragView.m | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0712efc0..5a5b9fbbd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,15 @@ +2005-03-29 Richard Frith-Macdonald + + * Source/GSDragView.m: + * Headers/Additions/GNUstepGUI/GSDragView.h: Minor tweaks to ease + subclassing. + 2005-03-28 Richard Frith-Macdonald * Source/GSDragView.m: Fix a few bugs exposed by windows port and tidy/add comments to clarify operation. When initiating DnD session, take offset argument into account rather than ignoring it. - * Headers/Additions/GNUstepGUI/GSDrafView.h: Improve comments and + * Headers/Additions/GNUstepGUI/GSDragView.h: Improve comments and change offset to be NSSize rather thgan NSPoint. 2005-03-21 Adam Fedor diff --git a/Headers/Additions/GNUstepGUI/GSDragView.h b/Headers/Additions/GNUstepGUI/GSDragView.h index 39a8a8db7..4969045bb 100644 --- a/Headers/Additions/GNUstepGUI/GSDragView.h +++ b/Headers/Additions/GNUstepGUI/GSDragView.h @@ -104,7 +104,7 @@ NSMutableDictionary *cursors; } -+ (GSDragView*) sharedDragView; ++ (id) sharedDragView; - (void) dragImage: (NSImage*)anImage at: (NSPoint)screenLocation offset: (NSSize)initialOffset @@ -112,6 +112,6 @@ pasteboard: (NSPasteboard*)pboard source: (id)sourceObject slideBack: (BOOL)slideFlag; -- (void) postDragEvent: (NSEvent *)theEvent; +- (void) postDragEvent: (NSEvent*)theEvent; @end diff --git a/Source/GSDragView.m b/Source/GSDragView.m index c106e9ffe..c4f0e6cce 100644 --- a/Source/GSDragView.m +++ b/Source/GSDragView.m @@ -234,6 +234,7 @@ static GSDragView *sharedDragView = nil; slideBack: (BOOL)slideFlag { NSPoint eventPoint; + ASSIGN(dragPasteboard, pboard); ASSIGN(dragSource, sourceObject); dragSequence = [event timestamp]; @@ -274,7 +275,7 @@ static GSDragView *sharedDragView = nil; * Convert point from coordinates of image to coordinates of mouse * cursor for internal use. */ - point.y += offset.height; + point.x += offset.width; point.y += offset.height; [self _slideDraggedImageTo: point numberOfSteps: SLIDE_NR_OF_STEPS