mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:11:18 +00:00
* Source/NSApplication.m (-setApplicationIconImage): Ignore this
call when the image is nil. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33801 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1b780e1bc7
commit
046bc43c63
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-08-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSApplication.m (-setApplicationIconImage): Ignore this
|
||||
call when the image is nil.
|
||||
|
||||
2011-08-29 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSCachedImageRep.m: Restore the implementation of -draw
|
||||
|
|
|
@ -2325,9 +2325,13 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
{
|
||||
NSEnumerator *iterator;
|
||||
NSWindow *current;
|
||||
NSImage *old_app_icon = _app_icon;
|
||||
NSSize miniWindowSize = [GSCurrentServer() iconSize];
|
||||
NSSize imageSize = [anImage size];
|
||||
NSImage *old_app_icon = _app_icon;
|
||||
NSSize miniWindowSize;
|
||||
NSSize imageSize;
|
||||
|
||||
// Ignore attempts to set nil as the icon image.
|
||||
if (nil == anImage)
|
||||
return;
|
||||
|
||||
RETAIN(old_app_icon);
|
||||
|
||||
|
@ -2336,12 +2340,14 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
|
||||
[_app_icon setScalesWhenResized: YES];
|
||||
|
||||
miniWindowSize = [GSCurrentServer() iconSize];
|
||||
if (miniWindowSize.width <= 0 || miniWindowSize.height <= 0)
|
||||
{
|
||||
miniWindowSize = NSMakeSize(48, 48);
|
||||
}
|
||||
|
||||
// restrict size when the icon is larger than the mini window.
|
||||
imageSize = [_app_icon size];
|
||||
if (imageSize.width > miniWindowSize.width
|
||||
|| imageSize.height > miniWindowSize.height)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue