mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 09:50:48 +00:00
* Source/NSMenuItem.m: Retain the GSMenuSeparator instance if
the menu item is a separator since we want to make sure the object isn't prematurely released. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27611 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b1a66b9002
commit
2800af404c
2 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2009-01-16 12:04-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* Source/NSMenuItem.m: Retain the GSMenuSeparator instance if
|
||||||
|
the menu item is a separator since we want to make sure the
|
||||||
|
object isn't prematurely released.
|
||||||
|
|
||||||
2009-01-16 Richard Frith-Macdonald <rfm@gnu.org>
|
2009-01-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSAnimation.m: _gs_startAnimationInOwnLoop hopefully fixed
|
* Source/NSAnimation.m: _gs_startAnimationInOwnLoop hopefully fixed
|
||||||
|
|
|
@ -561,9 +561,19 @@ static Class imageClass;
|
||||||
if (isSeparator)
|
if (isSeparator)
|
||||||
{
|
{
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
return [NSMenuItem separatorItem];
|
|
||||||
|
//
|
||||||
|
// An object returned from initWithCoder:
|
||||||
|
// should not be autoreleased. Do a retain
|
||||||
|
// to prevent it from being released automatically.
|
||||||
|
//
|
||||||
|
return RETAIN([NSMenuItem separatorItem]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Not retained, because we're calling the designated init with
|
||||||
|
// the values.
|
||||||
|
//
|
||||||
title = [aDecoder decodeObjectForKey: @"NSTitle"];
|
title = [aDecoder decodeObjectForKey: @"NSTitle"];
|
||||||
action = [aDecoder decodeObjectForKey: @"NSAction"];
|
action = [aDecoder decodeObjectForKey: @"NSAction"];
|
||||||
key = [aDecoder decodeObjectForKey: @"NSKeyEquiv"];
|
key = [aDecoder decodeObjectForKey: @"NSKeyEquiv"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue