display the action menu on mouse down, not mouse up
This commit is contained in:
parent
377c00a826
commit
8e993f80ef
|
@ -25,10 +25,8 @@
|
||||||
#import "BadgeView.h"
|
#import "BadgeView.h"
|
||||||
#import "NSStringAdditions.h"
|
#import "NSStringAdditions.h"
|
||||||
|
|
||||||
#define BOTTOM_PADDING 2.0
|
|
||||||
#define BETWEEN_PADDING 2.0
|
|
||||||
|
|
||||||
#define BADGE_HEIGHT 30.0
|
#define BADGE_HEIGHT 30.0
|
||||||
|
#define BETWEEN_PADDING 2.0
|
||||||
|
|
||||||
@interface BadgeView (Private)
|
@interface BadgeView (Private)
|
||||||
|
|
||||||
|
|
|
@ -226,16 +226,6 @@
|
||||||
{
|
{
|
||||||
NSPoint point = [self convertPoint: [event locationInWindow] fromView: nil];
|
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])
|
if ([self pointInActionRect: point])
|
||||||
{
|
{
|
||||||
int row = [self rowAtPoint: point];
|
int row = [self rowAtPoint: point];
|
||||||
|
@ -248,8 +238,17 @@
|
||||||
fActionPushedRow = -1;
|
fActionPushedRow = -1;
|
||||||
[self setNeedsDisplayInRect: [self rectOfRow: row]];
|
[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"];
|
[fDefaults setBool: ![fDefaults boolForKey: @"DisplaySmallStatusRegular"] forKey: @"DisplaySmallStatusRegular"];
|
||||||
|
@ -267,7 +266,6 @@
|
||||||
[fController showInfo: nil];
|
[fController showInfo: nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
- (NSMenu *) menuForEvent: (NSEvent *) event
|
- (NSMenu *) menuForEvent: (NSEvent *) event
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue