mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
(-mouseDown:): Don't call -containsAttachments.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19834 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d3e66437f3
commit
d4818d3966
2 changed files with 31 additions and 29 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-08-07 13:18 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSTextView.m (-mouseDown:): Remove -containsAttachments
|
||||
call.
|
||||
|
||||
2004-08-06 14:13 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSPasteboard.m (-pasteboard:provideDataForType:): Print
|
||||
|
|
|
@ -4088,41 +4088,38 @@ other than copy/paste or dragging. */
|
|||
word/paragraph as usual. */
|
||||
if (granularity == NSSelectByCharacter)
|
||||
{
|
||||
if ([_textStorage containsAttachments])
|
||||
{
|
||||
NSTextAttachment *attachment;
|
||||
|
||||
/* Check if the click was on an attachment cell. */
|
||||
attachment = [_textStorage attribute: NSAttachmentAttributeName
|
||||
atIndex: startIndex
|
||||
effectiveRange: NULL];
|
||||
|
||||
if (attachment != nil)
|
||||
{
|
||||
id <NSTextAttachmentCell> cell = [attachment attachmentCell];
|
||||
|
||||
if (cell != nil)
|
||||
{
|
||||
/* TODO: Where to get the cellFrame? */
|
||||
NSRect cellFrame = NSMakeRect(0, 0, 0, 0);
|
||||
NSTextAttachment *attachment;
|
||||
|
||||
/* TODO: What about the insertion point ? */
|
||||
if ([cell wantsToTrackMouseForEvent: theEvent
|
||||
inRect: cellFrame
|
||||
ofView: self
|
||||
atCharacterIndex: startIndex]
|
||||
&& [cell trackMouse: theEvent
|
||||
/* Check if the click was on an attachment cell. */
|
||||
attachment = [_textStorage attribute: NSAttachmentAttributeName
|
||||
atIndex: startIndex
|
||||
effectiveRange: NULL];
|
||||
|
||||
if (attachment != nil)
|
||||
{
|
||||
id <NSTextAttachmentCell> cell = [attachment attachmentCell];
|
||||
|
||||
if (cell != nil)
|
||||
{
|
||||
/* TODO: Where to get the cellFrame? */
|
||||
NSRect cellFrame = NSMakeRect(0, 0, 0, 0);
|
||||
|
||||
/* TODO: What about the insertion point ? */
|
||||
if ([cell wantsToTrackMouseForEvent: theEvent
|
||||
inRect: cellFrame
|
||||
ofView: self
|
||||
atCharacterIndex: startIndex]
|
||||
&& [cell trackMouse: theEvent
|
||||
inRect: cellFrame
|
||||
ofView: self
|
||||
atCharacterIndex: startIndex
|
||||
untilMouseUp: NO])
|
||||
{
|
||||
return;
|
||||
}
|
||||
atCharacterIndex: startIndex
|
||||
untilMouseUp: NO])
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* This is the code for handling click event on a link (a link
|
||||
is some chars with the NSLinkAttributeName set to something
|
||||
which is not-null, a NSURL object usually). */
|
||||
|
|
Loading…
Reference in a new issue