From d892dfadf2a9afcd7ad751c41d48ea126644fbe4 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 20 Aug 2009 15:20:31 +0000 Subject: =?UTF-8?q?=E2=80=A2=20quick=20fix=20-=20disabled=20tooltips=20in?= =?UTF-8?q?=20Content=20and=20Query=20tables=20due=20to=20crashes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CustomQuery.m | 62 +++++++++++++++++++++++++-------------------------- Source/TableContent.m | 60 ++++++++++++++++++++++++------------------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index faa86221..a45cc972 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -1693,37 +1693,37 @@ * - if blob data can be interpret as image data display the image as transparent thumbnail * (up to now using base64 encoded HTML data) */ -- (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:(SPTextAndLinkCell *)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation -{ - - - NSImage *image; - - if([[aCell stringValue] length] < 1) return nil; - - NSPoint pos = [NSEvent mouseLocation]; - pos.y -= 20; - - // Get the original data for trying to display the blob data as an image - id theValue = NSArrayObjectAtIndex(NSArrayObjectAtIndex(fullResult, row), [[aTableColumn identifier] intValue]); - if ([theValue isKindOfClass:[NSData class]]) { - image = [[NSImage alloc] initWithData:theValue]; - if(image) { - [SPTooltip showWithObject:image atLocation:pos ofType:@"image"]; - [image release]; - theValue = nil; - return nil; - } - } - - if(image) [image release]; - - // Show the cell string value as tooltip (including line breaks and tabs) - if([[aCell stringValue] length] > 1) - [SPTooltip showWithObject:[aCell stringValue] atLocation:pos]; - - return nil; -} +// - (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:(SPTextAndLinkCell *)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation +// { +// +// +// NSImage *image; +// +// if([[aCell stringValue] length] < 1) return nil; +// +// NSPoint pos = [NSEvent mouseLocation]; +// pos.y -= 20; +// +// // Get the original data for trying to display the blob data as an image +// id theValue = NSArrayObjectAtIndex(NSArrayObjectAtIndex(fullResult, row), [[aTableColumn identifier] intValue]); +// if ([theValue isKindOfClass:[NSData class]]) { +// image = [[NSImage alloc] initWithData:theValue]; +// if(image) { +// [SPTooltip showWithObject:image atLocation:pos ofType:@"image"]; +// [image release]; +// theValue = nil; +// return nil; +// } +// } +// +// if(image) [image release]; +// +// // Show the cell string value as tooltip (including line breaks and tabs) +// if([[aCell stringValue] length] > 1) +// [SPTooltip showWithObject:[aCell stringValue] atLocation:pos]; +// +// return nil; +// } /* diff --git a/Source/TableContent.m b/Source/TableContent.m index 3ac60e29..f4e3d01b 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1796,36 +1796,36 @@ * - if blob data can be interpret as image data display the image as transparent thumbnail * (up to now using base64 encoded HTML data) */ -- (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:(SPTextAndLinkCell *)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation -{ - - NSImage *image; - - if([[aCell stringValue] length] < 1) return nil; - - NSPoint pos = [NSEvent mouseLocation]; - pos.y -= 20; - - // Get the original data for trying to display the blob data as an image - id theValue = NSArrayObjectAtIndex(NSArrayObjectAtIndex(tableValues, row), [[aTableColumn identifier] intValue]); - if ([theValue isKindOfClass:[NSData class]]) { - image = [[NSImage alloc] initWithData:theValue]; - if(image) { - [SPTooltip showWithObject:image atLocation:pos ofType:@"image"]; - [image release]; - theValue = nil; - return nil; - } - } - - if(image) [image release]; - - // Show the cell string value as tooltip (including line breaks and tabs) - if([[aCell stringValue] length] > 1) - [SPTooltip showWithObject:[aCell stringValue] atLocation:pos]; - - return nil; -} +// - (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:(SPTextAndLinkCell *)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation +// { +// +// NSImage *image; +// +// if([[aCell stringValue] length] < 1) return nil; +// +// NSPoint pos = [NSEvent mouseLocation]; +// pos.y -= 20; +// +// // Get the original data for trying to display the blob data as an image +// id theValue = NSArrayObjectAtIndex(NSArrayObjectAtIndex(tableValues, row), [[aTableColumn identifier] intValue]); +// if ([theValue isKindOfClass:[NSData class]]) { +// image = [[NSImage alloc] initWithData:theValue]; +// if(image) { +// [SPTooltip showWithObject:image atLocation:pos ofType:@"image"]; +// [image release]; +// theValue = nil; +// return nil; +// } +// } +// +// if(image) [image release]; +// +// // Show the cell string value as tooltip (including line breaks and tabs) +// if([[aCell stringValue] length] > 1) +// [SPTooltip showWithObject:[aCell stringValue] atLocation:pos]; +// +// return nil; +// } - (int)numberOfRowsInTableView:(NSTableView *)aTableView { -- cgit v1.2.3