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,8 +238,17 @@
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])
{
[fDefaults setBool: ![fDefaults boolForKey: @"DisplaySmallStatusRegular"] forKey: @"DisplaySmallStatusRegular"];
@ -266,7 +265,6 @@
else
[fController showInfo: nil];
}
}
}
- (NSMenu *) menuForEvent: (NSEvent *) event