a double-click to dismiss a menu on a folder would cause us to popup

the menu again. check for that case (bug 162367)
This commit is contained in:
pinkerton%netscape.com 2002-08-14 14:20:09 +00:00
parent 768c965b07
commit 77c7cd9bd1
4 changed files with 20 additions and 8 deletions

View File

@ -186,11 +186,14 @@
-(void)mouseDown:(NSEvent*)aEvent
{
if (mIsFolder) {
// pop up a "context menu" on folders showing their contents. we check
// for single click to fix issues with dblclicks (bug 162367)
if (mIsFolder && [aEvent clickCount] == 1) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mElement));
NSMenu* menu = BookmarksService::LocateMenu(content);
[NSMenu popUpContextMenu: menu withEvent: aEvent forView: self];
} else
}
else
[super mouseDown:aEvent];
}

View File

@ -186,11 +186,14 @@
-(void)mouseDown:(NSEvent*)aEvent
{
if (mIsFolder) {
// pop up a "context menu" on folders showing their contents. we check
// for single click to fix issues with dblclicks (bug 162367)
if (mIsFolder && [aEvent clickCount] == 1) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mElement));
NSMenu* menu = BookmarksService::LocateMenu(content);
[NSMenu popUpContextMenu: menu withEvent: aEvent forView: self];
} else
}
else
[super mouseDown:aEvent];
}

View File

@ -186,11 +186,14 @@
-(void)mouseDown:(NSEvent*)aEvent
{
if (mIsFolder) {
// pop up a "context menu" on folders showing their contents. we check
// for single click to fix issues with dblclicks (bug 162367)
if (mIsFolder && [aEvent clickCount] == 1) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mElement));
NSMenu* menu = BookmarksService::LocateMenu(content);
[NSMenu popUpContextMenu: menu withEvent: aEvent forView: self];
} else
}
else
[super mouseDown:aEvent];
}

View File

@ -186,11 +186,14 @@
-(void)mouseDown:(NSEvent*)aEvent
{
if (mIsFolder) {
// pop up a "context menu" on folders showing their contents. we check
// for single click to fix issues with dblclicks (bug 162367)
if (mIsFolder && [aEvent clickCount] == 1) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mElement));
NSMenu* menu = BookmarksService::LocateMenu(content);
[NSMenu popUpContextMenu: menu withEvent: aEvent forView: self];
} else
}
else
[super mouseDown:aEvent];
}