mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-28 14:37:04 +00:00
This is a regression from 73b4c33f05.
Because we were only tracking wether the left mouse button went up after a contextual menu (which is opened with the right mouse)
would only close after the second left mouse up.
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
/*
|
|
* AppController.j
|
|
* CPMenuTest
|
|
*
|
|
* Created by Alexander Ljungberg on August 31, 2010.
|
|
* Copyright 2010, WireLoad, LLC All rights reserved.
|
|
*/
|
|
|
|
@import <Foundation/CPObject.j>
|
|
|
|
@import "MyView.j"
|
|
|
|
@implementation AppController : CPObject
|
|
{
|
|
}
|
|
|
|
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
|
{
|
|
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
|
|
contentView = [[MyView alloc] initWithFrame:CGRectMakeZero()];
|
|
|
|
[contentView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
|
|
[theWindow setContentView:contentView];
|
|
|
|
var popupButton = [[CPPopUpButton alloc] initWithFrame:CGRectMakeZero()];
|
|
|
|
[popupButton addItemWithTitle:@"Item 1"];
|
|
[popupButton addItemWithTitle:@"Item 2"];
|
|
[popupButton addItemWithTitle:@"Item 3"];
|
|
[popupButton sizeToFit];
|
|
|
|
[popupButton setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin];
|
|
[popupButton setCenter:[contentView center]];
|
|
|
|
[contentView addSubview:popupButton];
|
|
|
|
[theWindow orderFront:self];
|
|
|
|
// Uncomment the following line to turn on the standard menu bar.
|
|
[CPMenu setMenuBarVisible:YES];
|
|
}
|
|
|
|
@end
|