mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 13:07:02 +00:00
nib2cib support for CPWindow autorecalculatesKeyViewLoop.
This commit is contained in:
@@ -125,14 +125,13 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemp
|
||||
|
||||
- (id)_cibInstantiate
|
||||
{
|
||||
var windowClass = CPClassFromString([self windowClass]);
|
||||
var windowClass = CPClassFromString([self windowClass]),
|
||||
theWindow = [[windowClass alloc] initWithContentRect:_windowRect styleMask:_windowStyleMask];
|
||||
|
||||
/* if (!windowClass)
|
||||
[NSException raise:NSInvalidArgumentException format:@"Unable to locate NSWindow class %@, using NSWindow",_windowClass];
|
||||
class=[NSWindow class];*/
|
||||
|
||||
var theWindow = [[windowClass alloc] initWithContentRect:_windowRect styleMask:_windowStyleMask];
|
||||
|
||||
if (_minSize)
|
||||
[theWindow setMinSize:_minSize];
|
||||
if (_maxSize)
|
||||
|
||||
@@ -31,7 +31,9 @@ var NSBorderlessWindowMask = 0x00,
|
||||
NSUtilityWindowMask = 0x10,
|
||||
NSDocModalWindowMask = 0x40,
|
||||
NSTexturedBackgroundWindowMask = 0x100,
|
||||
NSHUDBackgroundWindowMask = 0x2000;
|
||||
NSHUDBackgroundWindowMask = 0x2000,
|
||||
|
||||
NSAutorecalculatesKeyViewLoopWTFlag = 0x800;
|
||||
|
||||
@implementation _CPCibWindowTemplate (NSCoding)
|
||||
|
||||
@@ -50,6 +52,7 @@ var NSBorderlessWindowMask = 0x00,
|
||||
_screenRect = [aCoder decodeRectForKey:@"NSScreenRect"]; // screen created on
|
||||
_viewClass = [aCoder decodeObjectForKey:@"NSViewClass"]; // references the toolbar if present (anything else?)
|
||||
_wtFlags = [aCoder decodeIntForKey:@"NSWTFlags"];
|
||||
_windowAutorecalculatesKeyViewLoop = !!(_wtFlags & NSAutorecalculatesKeyViewLoopWTFlag);
|
||||
_windowBacking = [aCoder decodeIntForKey:@"NSWindowBacking"];
|
||||
|
||||
// Convert NSWindows to CPWindows.
|
||||
|
||||
Reference in New Issue
Block a user