fix unable to change mainWindow's title

This commit is contained in:
Antoine Mercadal committed 2011-09-02 14:00:49 +02:00
1 parent be10bcf27a
commit afa691376e
2 files changed
+4 -5

No files matched your search

+2 -2
View File
@@ -480,7 +480,7 @@ CPTexturedBackgroundWindowMask
[self close];
_platformWindow = aPlatformWindow;
[_platformWindow setTitle:_title];
[_platformWindow _setTitle:_title window:self];
if (wasVisible)
[self orderFront:self];
@@ -1360,7 +1360,7 @@ CPTexturedBackgroundWindowMask
_title = aTitle;
[_windowView setTitle:aTitle];
[_platformWindow setTitle:_title];
[_platformWindow _setTitle:_title window:self];
[self _synchronizeMenuBarTitleWithWindowTitle];
}
+2 -3
View File
@@ -259,13 +259,12 @@ var PrimaryPlatformWindow = NULL;
return [CPPlatform isBrowser];
}
- (void)setTitle:(CPString)aTitle
- (void)_setTitle:(CPString)aTitle window:(CPWindow)aWindow
{
_title = aTitle;
#if PLATFORM(DOM)
if (_DOMWindow && _DOMWindow.document
&& (self != [CPPlatformWindow primaryPlatformWindow]))
if (_DOMWindow && _DOMWindow.document && (aWindow === [CPApp mainWindow]))
_DOMWindow.document.title = _title;
#endif
}