mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-23 19:00:41 +00:00
Merge branch 'integration' of git@github.com:280north/cappuccino into integration
This commit is contained in:
@@ -135,19 +135,19 @@ CPRunContinuesResponse = -1002;
|
||||
[_mainMenu addItem:openMenuItem];
|
||||
|
||||
var saveMenu = [[CPMenu alloc] initWithTitle:@"Save"],
|
||||
saveMenuItem = [[CPMenuItem alloc] initWithTitle:@"Save" action:@selector(saveDocument:) keyEquivalent:@""];
|
||||
saveMenuItem = [[CPMenuItem alloc] initWithTitle:@"Save" action:@selector(saveDocument:) keyEquivalent:nil];
|
||||
|
||||
[saveMenuItem setImage:[[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPApplication/Save.png"] size:CGSizeMake(16.0, 16.0)]];
|
||||
[saveMenuItem setAlternateImage:[[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPApplication/SaveHighlighted.png"] size:CGSizeMake(16.0, 16.0)]];
|
||||
|
||||
[saveMenu addItem:[[CPMenuItem alloc] initWithTitle:@"Save" action:@selector(saveDocument:) keyEquivalent:@"S"]];
|
||||
[saveMenu addItem:[[CPMenuItem alloc] initWithTitle:@"Save As" action:@selector(saveDocumentAs:) keyEquivalent:@""]];
|
||||
[saveMenu addItem:[[CPMenuItem alloc] initWithTitle:@"Save As" action:@selector(saveDocumentAs:) keyEquivalent:nil]];
|
||||
|
||||
[saveMenuItem setSubmenu:saveMenu];
|
||||
|
||||
[_mainMenu addItem:saveMenuItem];
|
||||
|
||||
var editMenuItem = [[CPMenuItem alloc] initWithTitle:@"Edit" action:nil keyEquivalent:@""],
|
||||
var editMenuItem = [[CPMenuItem alloc] initWithTitle:@"Edit" action:nil keyEquivalent:nil],
|
||||
editMenu = [[CPMenu alloc] initWithTitle:@"Edit"],
|
||||
|
||||
undoMenuItem = [[CPMenuItem alloc] initWithTitle:@"Undo" action:@selector(undo:) keyEquivalent:CPUndoKeyEquivalent],
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
_DOMEmbedElement = document.createElement("embed");
|
||||
|
||||
_DOMEmbedElement.type = "application/x-shockwave-flash";
|
||||
_DOMEmbedElement.wmode = "transparent";
|
||||
_DOMEmbedElement.setAttribute("wmode", "transparent");
|
||||
_DOMEmbedElement.width = "100%";
|
||||
_DOMEmbedElement.height = "100%";
|
||||
|
||||
|
||||
+7
-1
@@ -179,6 +179,11 @@ var _CPMenuBarVisible = NO,
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
+ (float)menuBarHeight
|
||||
{
|
||||
return MENUBAR_HEIGHT;
|
||||
}
|
||||
|
||||
// Creating a CPMenu Object
|
||||
/*!
|
||||
Initializes the menu with a specified title.
|
||||
@@ -643,7 +648,8 @@ var _CPMenuBarVisible = NO,
|
||||
else
|
||||
target = [aMenuItem target];
|
||||
|
||||
[CPApp sendAction:action to:target from:nil];
|
||||
if([aMenuItem isEnabled])
|
||||
[CPApp sendAction:action to:target from:nil];
|
||||
}
|
||||
|
||||
// Managing Display of State Column
|
||||
|
||||
+36
-15
@@ -727,7 +727,14 @@ CPControlKeyMask
|
||||
|
||||
- (id)init
|
||||
{
|
||||
return [super initWithTitle:@"" action:nil keyEquivalent:@""];
|
||||
self = [super initWithTitle:@"" action:nil keyEquivalent:nil];
|
||||
|
||||
if (self)
|
||||
{
|
||||
[self setEnabled:NO];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)isSeparatorItem
|
||||
@@ -920,6 +927,17 @@ var _CPMenuItemSelectionColor = nil,
|
||||
|
||||
var view = [_menuItem view];
|
||||
|
||||
if ([_menuItem isSeparatorItem])
|
||||
{
|
||||
var line = [[CPView alloc] initWithFrame:CGRectMake(0.0, 8.0, 1000.0, 1.3)];
|
||||
view = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, 0.0, 20.0)];
|
||||
|
||||
[view setAutoresizingMask:CPViewWidthSizable];
|
||||
[line setBackgroundColor:[CPColor lightGrayColor]];
|
||||
|
||||
[view addSubview:line];
|
||||
}
|
||||
|
||||
if (view)
|
||||
{
|
||||
[_imageAndTitleView removeFromSuperview];
|
||||
@@ -1054,23 +1072,26 @@ var _CPMenuItemSelectionColor = nil,
|
||||
|
||||
else
|
||||
{
|
||||
[_imageAndTitleView setTextColor:shouldHighlight ? [CPColor whiteColor] : [self textColor]];
|
||||
|
||||
if (shouldHighlight)
|
||||
[self setBackgroundColor:_CPMenuItemSelectionColor];
|
||||
else
|
||||
[self setBackgroundColor:nil];
|
||||
|
||||
var state = [_menuItem state];
|
||||
|
||||
switch (state)
|
||||
if([_menuItem isEnabled])
|
||||
{
|
||||
case CPOffState:
|
||||
case CPOnState:
|
||||
case CPMixedState: [_stateView setImage:shouldHighlight ? _CPMenuItemDefaultStateHighlightedImages[state] : _CPMenuItemDefaultStateImages[state]];
|
||||
[_imageAndTitleView setTextColor:shouldHighlight ? [CPColor whiteColor] : [self textColor]];
|
||||
|
||||
if (shouldHighlight)
|
||||
[self setBackgroundColor:_CPMenuItemSelectionColor];
|
||||
else
|
||||
[self setBackgroundColor:nil];
|
||||
|
||||
var state = [_menuItem state];
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case CPOffState:
|
||||
case CPOnState:
|
||||
case CPMixedState: [_stateView setImage:shouldHighlight ? _CPMenuItemDefaultStateHighlightedImages[state] : _CPMenuItemDefaultStateImages[state]];
|
||||
break;
|
||||
|
||||
default: [_stateView setImage:nil];
|
||||
default: [_stateView setImage:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ var CPPopUpButtonArrowsImage = nil;
|
||||
*/
|
||||
- (void)addItemWithTitle:(CPString)aTitle
|
||||
{
|
||||
[_menu addItemWithTitle:aTitle action:NULL keyEquivalent:NULL];
|
||||
[_menu addItemWithTitle:aTitle action:NULL keyEquivalent:nil];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -173,7 +173,7 @@ var CPPopUpButtonArrowsImage = nil;
|
||||
if ([items[count] title] == aTitle)
|
||||
[self removeItemAtIndex:count];
|
||||
|
||||
[_menu insertItemWithTitle:aTitle action:NULL keyEquivalent:NULL atIndex:anIndex];
|
||||
[_menu insertItemWithTitle:aTitle action:NULL keyEquivalent:nil atIndex:anIndex];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user