fix tooltips in the main table
This commit is contained in:
parent
803cbc6808
commit
804d0193d0
|
@ -56,8 +56,6 @@
|
||||||
|
|
||||||
- (void) addTrackingAreasForView: (NSView *) controlView inRect: (NSRect) cellFrame withUserInfo: (NSDictionary *) userInfo
|
- (void) addTrackingAreasForView: (NSView *) controlView inRect: (NSRect) cellFrame withUserInfo: (NSDictionary *) userInfo
|
||||||
mouseLocation: (NSPoint) mouseLocation;
|
mouseLocation: (NSPoint) mouseLocation;
|
||||||
/*- (void) mouseEntered: (NSEvent *) event;
|
|
||||||
- (void) mouseExited: (NSEvent *) event;*/
|
|
||||||
- (void) setControlHover: (BOOL) hover;
|
- (void) setControlHover: (BOOL) hover;
|
||||||
- (void) setRevealHover: (BOOL) hover;
|
- (void) setRevealHover: (BOOL) hover;
|
||||||
|
|
||||||
|
|
|
@ -388,26 +388,6 @@
|
||||||
[area release];
|
[area release];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*- (void) mouseEntered: (NSEvent *) event
|
|
||||||
{
|
|
||||||
NSDictionary * userInfo = [event userData];
|
|
||||||
|
|
||||||
if ([[userInfo objectForKey: @"Type"] isEqualToString: @"Control"])
|
|
||||||
fHoverControl = YES;
|
|
||||||
else
|
|
||||||
fHoverReveal = YES;
|
|
||||||
|
|
||||||
[(NSControl *)[self controlView] updateCell: self];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) mouseExited: (NSEvent *) event
|
|
||||||
{
|
|
||||||
fHoverControl = NO;
|
|
||||||
fHoverReveal = NO;
|
|
||||||
|
|
||||||
[(NSControl *)[self controlView] updateCell: self];
|
|
||||||
}*/
|
|
||||||
|
|
||||||
- (void) setControlHover: (BOOL) hover
|
- (void) setControlHover: (BOOL) hover
|
||||||
{
|
{
|
||||||
fHoverControl = hover;
|
fHoverControl = hover;
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
//[fMouseCell release];
|
|
||||||
[fSelectedIndexes release];
|
[fSelectedIndexes release];
|
||||||
|
|
||||||
[fKeyStrokes release];
|
[fKeyStrokes release];
|
||||||
|
@ -129,19 +128,6 @@
|
||||||
if ((row = [dict objectForKey: @"Row"]))
|
if ((row = [dict objectForKey: @"Row"]))
|
||||||
{
|
{
|
||||||
int rowVal = [row intValue];
|
int rowVal = [row intValue];
|
||||||
/*TorrentCell * cell = (TorrentCell *)[self preparedCellAtColumn: [self columnWithIdentifier: @"Torrent"] row: rowVal];
|
|
||||||
if (fMouseCell != cell)
|
|
||||||
{
|
|
||||||
[fMouseCell release];
|
|
||||||
|
|
||||||
fMouseRow = rowVal;
|
|
||||||
fMouseCell = [cell copy];
|
|
||||||
|
|
||||||
[fMouseCell setRepresentedObject: [fTorrents objectAtIndex: rowVal]];
|
|
||||||
[fMouseCell setControlView: self];
|
|
||||||
[fMouseCell mouseEntered: event];
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if ([[dict objectForKey: @"Type"] isEqualToString: @"Control"])
|
if ([[dict objectForKey: @"Type"] isEqualToString: @"Control"])
|
||||||
fMouseControlRow = rowVal;
|
fMouseControlRow = rowVal;
|
||||||
else
|
else
|
||||||
|
@ -156,15 +142,6 @@
|
||||||
NSNumber * row;
|
NSNumber * row;
|
||||||
if ((row = [(NSDictionary *)[event userData] objectForKey: @"Row"]))
|
if ((row = [(NSDictionary *)[event userData] objectForKey: @"Row"]))
|
||||||
{
|
{
|
||||||
/*TorrentCell * cell = (TorrentCell *)[self preparedCellAtColumn: [self columnWithIdentifier: @"Torrent"]
|
|
||||||
row: [row intValue]];
|
|
||||||
[cell setControlView: self];
|
|
||||||
[cell mouseExited: event];
|
|
||||||
|
|
||||||
[fMouseCell release];
|
|
||||||
fMouseCell = nil;
|
|
||||||
fMouseRow = -1;*/
|
|
||||||
|
|
||||||
fMouseControlRow = -1;
|
fMouseControlRow = -1;
|
||||||
fMouseRevealRow = -1;
|
fMouseRevealRow = -1;
|
||||||
|
|
||||||
|
@ -172,22 +149,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*- (NSCell *) preparedCellAtColumn: (NSInteger) column row: (NSInteger) row
|
|
||||||
{
|
|
||||||
if (![self selectedCell] && row == fMouseRow && column == [self columnWithIdentifier: @"Torrent"])
|
|
||||||
return fMouseCell;
|
|
||||||
else
|
|
||||||
return [super preparedCellAtColumn: column row: row];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) updateCell: (NSCell *) cell
|
|
||||||
{
|
|
||||||
if (cell == fMouseCell)
|
|
||||||
[self setNeedsDisplayInRect: [self frameOfCellAtColumn: [self columnWithIdentifier: @"Torrent"] row: fMouseRow]];
|
|
||||||
else
|
|
||||||
[super updateCell: cell];
|
|
||||||
}*/
|
|
||||||
|
|
||||||
- (void) tableViewSelectionIsChanging: (NSNotification *) notification
|
- (void) tableViewSelectionIsChanging: (NSNotification *) notification
|
||||||
{
|
{
|
||||||
if (fSelectedIndexes)
|
if (fSelectedIndexes)
|
||||||
|
@ -224,7 +185,6 @@
|
||||||
[self reloadData];
|
[self reloadData];
|
||||||
}
|
}
|
||||||
|
|
||||||
//acts as if mouseUp:
|
|
||||||
if ([NSApp isOnLeopardOrBetter] && [event clickCount] == 2)
|
if ([NSApp isOnLeopardOrBetter] && [event clickCount] == 2)
|
||||||
{
|
{
|
||||||
if ([self pointInProgressRect: point])
|
if ([self pointInProgressRect: point])
|
||||||
|
@ -348,18 +308,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#warning get rect to actually change
|
#warning get rect to actually change
|
||||||
/*- (NSString *) tableView: (NSTableView *) tableView toolTipForCell: (NSCell *) cell rect: (NSRectPointer) rect
|
- (NSString *) tableView: (NSTableView *) tableView toolTipForCell: (NSCell *) cell rect: (NSRectPointer) rect
|
||||||
tableColumn: (NSTableColumn *) tableColumn row: (NSInteger) row mouseLocation: (NSPoint) mousePoint
|
tableColumn: (NSTableColumn *) tableColumn row: (NSInteger) row mouseLocation: (NSPoint) mousePoint
|
||||||
{
|
{
|
||||||
if ([self pointInActionRect: mousePoint])
|
if ([self pointInActionRect: mousePoint])
|
||||||
{
|
{
|
||||||
*rect = [self actionRectForRow: row];
|
*rect = [(TorrentCell *)cell actionButtonRectForBounds: [self frameOfCellAtColumn: 0 row: row]];
|
||||||
|
|
||||||
return NSLocalizedString(@"Shortcuts for changing transfer settings.", "Torrent Table -> tooltip");
|
return NSLocalizedString(@"Shortcuts for changing transfer settings.", "Torrent Table -> tooltip");
|
||||||
}
|
}
|
||||||
else if ([self pointInPauseRect: mousePoint])
|
else if ([self pointInControlRect: mousePoint])
|
||||||
{
|
{
|
||||||
*rect = [self pauseRectForRow: row];
|
*rect = *rect = [(TorrentCell *)cell controlButtonRectForBounds: [self frameOfCellAtColumn: 0 row: row]];
|
||||||
|
|
||||||
Torrent * torrent = [fTorrents objectAtIndex: row];
|
Torrent * torrent = [fTorrents objectAtIndex: row];
|
||||||
if ([torrent isActive])
|
if ([torrent isActive])
|
||||||
|
@ -376,13 +336,13 @@
|
||||||
}
|
}
|
||||||
else if ([self pointInRevealRect: mousePoint])
|
else if ([self pointInRevealRect: mousePoint])
|
||||||
{
|
{
|
||||||
*rect = [self revealRectForRow: row];
|
*rect = [(TorrentCell *)cell revealButtonRectForBounds: [self frameOfCellAtColumn: 0 row: row]];
|
||||||
|
|
||||||
return NSLocalizedString(@"Reveal the data file in Finder.", "Torrent Table -> tooltip");
|
return NSLocalizedString(@"Reveal the data file in Finder.", "Torrent Table -> tooltip");
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil;
|
return nil;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
- (void) toggleControlForTorrent: (Torrent *) torrent
|
- (void) toggleControlForTorrent: (Torrent *) torrent
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue