display the action menu on mouse down, not mouse up

This commit is contained in:
Mitchell Livingston 2008-01-16 20:53:24 +00:00
parent 377c00a826
commit 8e993f80ef
2 changed files with 23 additions and 27 deletions

View File

@ -25,10 +25,8 @@
#import "BadgeView.h"
#import "NSStringAdditions.h"
#define BOTTOM_PADDING 2.0
#define BETWEEN_PADDING 2.0
#define BADGE_HEIGHT 30.0
#define BETWEEN_PADDING 2.0
@interface BadgeView (Private)

View File

@ -226,16 +226,6 @@
{
NSPoint point = [self convertPoint: [event locationInWindow] fromView: nil];
//if pushing a button, don't change the selected rows
if ([NSApp isOnLeopardOrBetter] && ([self pointInControlRect: point] || [self pointInRevealRect: point]
|| [self pointInActionRect: point]))
fSelectedIndexes = [[self selectedRowIndexes] retain];
[super mouseDown: event];
[fSelectedIndexes release];
fSelectedIndexes = nil;
if ([self pointInActionRect: point])
{
int row = [self rowAtPoint: point];
@ -248,24 +238,32 @@
fActionPushedRow = -1;
[self setNeedsDisplayInRect: [self rectOfRow: row]];
}
else
//if pushing a button, don't change the selected rows
if ([NSApp isOnLeopardOrBetter] && ([self pointInControlRect: point] || [self pointInRevealRect: point]
|| [self pointInActionRect: point]))
fSelectedIndexes = [[self selectedRowIndexes] retain];
[super mouseDown: event];
[fSelectedIndexes release];
fSelectedIndexes = nil;
if ([self pointInMinimalStatusRect: point])
{
if ([self pointInMinimalStatusRect: point])
[fDefaults setBool: ![fDefaults boolForKey: @"DisplaySmallStatusRegular"] forKey: @"DisplaySmallStatusRegular"];
[self reloadData];
}
if ([event clickCount] == 2) //double click
{
if ([self pointInProgressRect: point])
{
[fDefaults setBool: ![fDefaults boolForKey: @"DisplaySmallStatusRegular"] forKey: @"DisplaySmallStatusRegular"];
[fDefaults setBool: ![fDefaults boolForKey: @"DisplayStatusProgressSelected"] forKey: @"DisplayStatusProgressSelected"];
[self reloadData];
}
if ([event clickCount] == 2) //double click
{
if ([self pointInProgressRect: point])
{
[fDefaults setBool: ![fDefaults boolForKey: @"DisplayStatusProgressSelected"] forKey: @"DisplayStatusProgressSelected"];
[self reloadData];
}
else
[fController showInfo: nil];
}
else
[fController showInfo: nil];
}
}