* Source/NSApplication.m (-setApplicationIconImage:,

-finishLaunching): Move the set name code to finishLaunching, as
  the image called NSApplicationIcon should stay the same all the time.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28741 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-09-26 19:28:29 +00:00
parent 05988a592b
commit 0e840e13bb
2 changed files with 18 additions and 8 deletions

View file

@ -1,3 +1,9 @@
2009-09-26 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSApplication.m (-setApplicationIconImage:,
-finishLaunching): Move the set name code to finishLaunching, as
the image called NSApplicationIcon should stay the same all the time.
2009-09-26 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextContainer.m (init): Add this method as suggested

View file

@ -972,6 +972,17 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
{
image = [NSImage imageNamed: @"GNUstep"];
}
else
{
/* Set the new image to be named 'NSApplicationIcon' ... to do that we
* must first check that any existing image of the same name has its
* name removed.
*/
[(NSImage*)[NSImage imageNamed: @"NSApplicationIcon"] setName: nil];
// We need to copy the image as we may have a proxy here
image = AUTORELEASE([image copy]);
[image setName: @"NSApplicationIcon"];
}
[self setApplicationIconImage: image];
@ -2214,13 +2225,6 @@ image.</p><p>See Also: -applicationIconImage</p>
// Use a copy as we change the name and size
ASSIGNCOPY(_app_icon, anImage);
/* Set the new image to be named 'NSApplicationIcon' ... to do that we
* must first check that any existing eimage of the same name has their
* name removed.
*/
[(NSImage*)[NSImage imageNamed: @"NSApplicationIcon"] setName: nil];
[_app_icon setName: @"NSApplicationIcon"];
[_app_icon setScalesWhenResized: YES];
if (miniWindowSize.width <= 0 || miniWindowSize.height <= 0)
@ -2235,7 +2239,7 @@ image.</p><p>See Also: -applicationIconImage</p>
[_app_icon setSize: miniWindowSize];
}
// Let horizontal menu change icon
// Let horizontal menu change icon
[_main_menu _organizeMenu];
if (_app_icon_window != nil)