mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-27 00:45:52 +00:00
remove useless usage of self. in NSWindowTemplate.j
This commit is contained in:
1 parent
86e0282011
commit
6b172cd3a6
1 file changed
+21
-21
@@ -55,36 +55,36 @@ var NSBorderlessWindowMask = 0x00,
|
||||
if ([aCoder containsValueForKey:@"NSMaxSize"])
|
||||
_maxSize = [aCoder decodeSizeForKey:@"NSMaxSize"];
|
||||
|
||||
self._screenRect = [aCoder decodeRectForKey:@"NSScreenRect"]; // screen created on
|
||||
self._viewClass = [aCoder decodeObjectForKey:@"NSViewClass"]; // references the toolbar if present (anything else?)
|
||||
self._wtFlags = [aCoder decodeIntForKey:@"NSWTFlags"];
|
||||
self._windowAutorecalculatesKeyViewLoop = !!(_wtFlags & NSAutorecalculatesKeyViewLoopWTFlag);
|
||||
self._windowBacking = [aCoder decodeIntForKey:@"NSWindowBacking"];
|
||||
_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.
|
||||
self._windowClass = CP_NSMapClassName([aCoder decodeObjectForKey:@"NSWindowClass"]);
|
||||
_windowClass = CP_NSMapClassName([aCoder decodeObjectForKey:@"NSWindowClass"]);
|
||||
|
||||
self._windowRect = [aCoder decodeRectForKey:@"NSWindowRect"];
|
||||
self._windowStyleMask = [aCoder decodeIntForKey:@"NSWindowStyleMask"];
|
||||
self._windowTitle = [aCoder decodeObjectForKey:@"NSWindowTitle"];
|
||||
self._windowView = [aCoder decodeObjectForKey:@"NSWindowView"];
|
||||
_windowRect = [aCoder decodeRectForKey:@"NSWindowRect"];
|
||||
_windowStyleMask = [aCoder decodeIntForKey:@"NSWindowStyleMask"];
|
||||
_windowTitle = [aCoder decodeObjectForKey:@"NSWindowTitle"];
|
||||
_windowView = [aCoder decodeObjectForKey:@"NSWindowView"];
|
||||
|
||||
// Flip Y coordinate
|
||||
self._windowRect.origin.y = self._screenRect.size.height - self._windowRect.origin.y - self._windowRect.size.height;
|
||||
_windowRect.origin.y = _screenRect.size.height - _windowRect.origin.y - _windowRect.size.height;
|
||||
|
||||
if (self._windowStyleMask === NSBorderlessWindowMask)
|
||||
self._windowStyleMask = CPBorderlessWindowMask;
|
||||
if (_windowStyleMask === NSBorderlessWindowMask)
|
||||
_windowStyleMask = CPBorderlessWindowMask;
|
||||
|
||||
else
|
||||
self._windowStyleMask = (self._windowStyleMask & NSTitledWindowMask ? CPTitledWindowMask : 0) |
|
||||
(self._windowStyleMask & NSClosableWindowMask ? CPClosableWindowMask : 0) |
|
||||
(self._windowStyleMask & NSMiniaturizableWindowMask ? CPMiniaturizableWindowMask : 0) |
|
||||
(self._windowStyleMask & NSResizableWindowMask ? CPResizableWindowMask : 0) |
|
||||
(self._windowStyleMask & NSTexturedBackgroundWindowMask ? NSTexturedBackgroundWindowMask : 0) |
|
||||
(self._windowStyleMask & NSDocModalWindowMask ? CPDocModalWindowMask : 0) |
|
||||
(self._windowStyleMask & NSHUDBackgroundWindowMask ? CPHUDBackgroundWindowMask : 0);
|
||||
_windowStyleMask = (_windowStyleMask & NSTitledWindowMask ? CPTitledWindowMask : 0) |
|
||||
(_windowStyleMask & NSClosableWindowMask ? CPClosableWindowMask : 0) |
|
||||
(_windowStyleMask & NSMiniaturizableWindowMask ? CPMiniaturizableWindowMask : 0) |
|
||||
(_windowStyleMask & NSResizableWindowMask ? CPResizableWindowMask : 0) |
|
||||
(_windowStyleMask & NSTexturedBackgroundWindowMask ? NSTexturedBackgroundWindowMask : 0) |
|
||||
(_windowStyleMask & NSDocModalWindowMask ? CPDocModalWindowMask : 0) |
|
||||
(_windowStyleMask & NSHUDBackgroundWindowMask ? CPHUDBackgroundWindowMask : 0);
|
||||
|
||||
self._windowIsFullBridge = [aCoder decodeObjectForKey:"NSFrameAutosaveName"] === "CPBorderlessBridgeWindowMask";
|
||||
_windowIsFullBridge = [aCoder decodeObjectForKey:"NSFrameAutosaveName"] === "CPBorderlessBridgeWindowMask";
|
||||
|
||||
/*if (![_windowClass isEqualToString:@"NSPanel"])
|
||||
_windowRect.origin.y -= [NSMainMenuView menuHeight]; // compensation for the additional menu bar
|
||||
|
||||
Reference in new issue
Block a user