mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Encode item and title of menu, so that it will show in the nib.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23206 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fb8609cf7a
commit
3db08e83f6
2 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-08-05 09:08-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSMenu.m: encodeWithCoder: encode items and title of
|
||||
menu.
|
||||
|
||||
2006-08-05 08:43-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSNibCompatibility.h
|
||||
|
|
|
@ -1213,9 +1213,17 @@ static NSNotificationCenter *nc;
|
|||
*/
|
||||
- (void) encodeWithCoder: (NSCoder*)encoder
|
||||
{
|
||||
[encoder encodeObject: _title];
|
||||
[encoder encodeObject: _items];
|
||||
[encoder encodeValueOfObjCType: @encode(BOOL) at: &_autoenable];
|
||||
if([encoder allowsKeyedCoding])
|
||||
{
|
||||
[encoder encodeObject: _title forKey: @"NSTitle"];
|
||||
[encoder encodeObject: _items forKey: @"NSMenuItems"];
|
||||
}
|
||||
else
|
||||
{
|
||||
[encoder encodeObject: _title];
|
||||
[encoder encodeObject: _items];
|
||||
[encoder encodeValueOfObjCType: @encode(BOOL) at: &_autoenable];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
|
|
Loading…
Reference in a new issue