mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-21 01:40:41 +00:00
Workaround for terminate: warning when using cibs.
Reviewed by me.
This commit is contained in:
+12
-1
@@ -293,6 +293,11 @@ CPRunContinuesResponse = -1002;
|
||||
_finishedLaunching = YES;
|
||||
}
|
||||
|
||||
- (void)terminate:(id)aSender
|
||||
{
|
||||
[CPPlatform terminateApplication];
|
||||
}
|
||||
|
||||
/*!
|
||||
Calls \c -finishLaunching method which results in starting
|
||||
the main event loop.
|
||||
@@ -407,7 +412,7 @@ CPRunContinuesResponse = -1002;
|
||||
{
|
||||
if ([_mainMenu performKeyEquivalent:anEvent])
|
||||
return YES;
|
||||
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@@ -492,7 +497,13 @@ CPRunContinuesResponse = -1002;
|
||||
*/
|
||||
- (void)setMainMenu:(CPMenu)aMenu
|
||||
{
|
||||
if (_mainMenu === aMenu)
|
||||
return;
|
||||
|
||||
_mainMenu = aMenu;
|
||||
|
||||
if ([CPPlatform supportsNativeMainMenu])
|
||||
window.cpSetMainMenu(_mainMenu);
|
||||
}
|
||||
|
||||
- (void)orderFrontColorPanel:(id)aSender
|
||||
|
||||
+4
-1
@@ -91,7 +91,10 @@ var _CPMenuBarVisible = NO,
|
||||
return;
|
||||
|
||||
_CPMenuBarVisible = menuBarShouldBeVisible;
|
||||
|
||||
|
||||
if ([CPPlatform supportsNativeMainMenu])
|
||||
return;
|
||||
|
||||
if (menuBarShouldBeVisible)
|
||||
{
|
||||
if (!_CPMenuBarSharedWindow)
|
||||
|
||||
@@ -34,4 +34,15 @@
|
||||
return CPFeatureIsCompatible(CPHTMLDragAndDropFeature);
|
||||
}
|
||||
|
||||
+ (BOOL)supportsNativeMainMenu
|
||||
{
|
||||
return (typeof window["cpSetMainMenu"] === "function");
|
||||
}
|
||||
|
||||
+ (void)terminateApplication
|
||||
{
|
||||
if (typeof window["cpTerminate"] === "function")
|
||||
window.cpTerminate();
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user