mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
Call the deprecated OpenStep delegate methods if the delegate of a
text attachment does not implement the new Mac OS X methods. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31816 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
043ca66dd9
commit
f107c5484a
2 changed files with 46 additions and 18 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-01-01 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSTextAttachment.m (-trackMouse:inRect:ofView:...): Call
|
||||
the deprecated OpenStep delegate methods if the delegate does not
|
||||
implement the new Mac OS X methods.
|
||||
|
||||
2011-01-01 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSTextView.m (-mouseDown:): Add missing conversion from
|
||||
|
|
|
@ -167,27 +167,49 @@
|
|||
{
|
||||
if ([theEvent clickCount] == 2)
|
||||
{
|
||||
if (delegate != nil && [delegate respondsToSelector:
|
||||
@selector(textView:doubleClickedOnCell:inRect:atIndex:)])
|
||||
{
|
||||
[delegate textView: textView
|
||||
doubleClickedOnCell: self
|
||||
inRect: cellFrame
|
||||
atIndex: charIndex];
|
||||
return YES;
|
||||
}
|
||||
if (delegate != nil)
|
||||
{
|
||||
if ([delegate respondsToSelector:
|
||||
@selector(textView:doubleClickedOnCell:inRect:atIndex:)])
|
||||
{
|
||||
[delegate textView: textView
|
||||
doubleClickedOnCell: self
|
||||
inRect: cellFrame
|
||||
atIndex: charIndex];
|
||||
return YES;
|
||||
}
|
||||
else if ([delegate respondsToSelector:
|
||||
@selector(textView:doubleClickedOnCell:inRect:)])
|
||||
{
|
||||
[delegate textView: textView
|
||||
doubleClickedOnCell: self
|
||||
inRect: cellFrame];
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (delegate != nil && [delegate respondsToSelector:
|
||||
@selector(textView:clickedOnCell:inRect:atIndex:)])
|
||||
{
|
||||
[delegate textView: textView
|
||||
clickedOnCell: self
|
||||
inRect: cellFrame
|
||||
atIndex: charIndex];
|
||||
return YES;
|
||||
}
|
||||
if (delegate != nil)
|
||||
{
|
||||
if ([delegate respondsToSelector:
|
||||
@selector(textView:clickedOnCell:inRect:atIndex:)])
|
||||
{
|
||||
[delegate textView: textView
|
||||
clickedOnCell: self
|
||||
inRect: cellFrame
|
||||
atIndex: charIndex];
|
||||
return YES;
|
||||
}
|
||||
else if ([delegate respondsToSelector:
|
||||
@selector(textView:clickedOnCell:inRect:)])
|
||||
{
|
||||
[delegate textView: textView
|
||||
clickedOnCell: self
|
||||
inRect: cellFrame];
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (type == NSLeftMouseDragged)
|
||||
|
|
Loading…
Reference in a new issue