mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
* Source/GSNibLoading.m: Read objects/accessibility and oids
maps if we are in a gui builder so that data is accessible. * Source/NSActionCell.m: Don't archive target/action if they have no values. * Source/NSMenu.m: Only archive as "_NSMainMenu" if it has no parent and is not owner by a popup. * Source/NSPopUpButtonCell.m: Archive the default menu item which will show when this popup is displayed. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27363 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
232de18e5e
commit
555fc13e2e
5 changed files with 65 additions and 33 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2008-12-20 22:13-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/GSNibLoading.m: Read objects/accessibility and oids
|
||||
maps if we are in a gui builder so that data is accessible.
|
||||
* Source/NSActionCell.m: Don't archive target/action if they
|
||||
have no values.
|
||||
* Source/NSMenu.m: Only archive as "_NSMainMenu" if it has
|
||||
no parent and is not owner by a popup.
|
||||
* Source/NSPopUpButtonCell.m: Archive the default menu item
|
||||
which will show when this popup is displayed.
|
||||
|
||||
2008-12-20 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSTextView.m (-shouldChangeTextInRange:replacementString:):
|
||||
|
@ -25,6 +36,7 @@
|
|||
* GNUmakefile: Export GNUSTEP_CORE_SOFTWARE to reduce chances of a
|
||||
problem if a GNUmakefile in a subdirectory is missing it.
|
||||
|
||||
>>>>>>> .r27362
|
||||
2008-12-17 21:20-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/GSNibLoading.m: Remove change which resets the bounds
|
||||
|
|
|
@ -1414,6 +1414,12 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
NSArray *nameValues = nil;
|
||||
NSArray *classKeys = nil;
|
||||
NSArray *classValues = nil;
|
||||
NSArray *objectsKeys = nil;
|
||||
NSArray *objectsValues = nil;
|
||||
NSArray *oidsKeys = nil;
|
||||
NSArray *oidsValues = nil;
|
||||
NSArray *accessibilityOidsKeys = nil;
|
||||
NSArray *accessibilityOidsValues = nil;
|
||||
|
||||
ASSIGN(_root, [coder decodeObjectForKey: @"NSRoot"]);
|
||||
ASSIGN(_visibleWindows,
|
||||
|
@ -1424,33 +1430,32 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
ASSIGN(_framework, [coder decodeObjectForKey: @"NSFramework"]);
|
||||
_nextOid = [coder decodeIntForKey: @"NSNextOid"];
|
||||
|
||||
/*
|
||||
objectsKeys = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSObjectsKeys"];
|
||||
objectsValues = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSObjectsValues"];
|
||||
*/
|
||||
nameKeys = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSNamesKeys"];
|
||||
nameValues = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSNamesValues"];
|
||||
/*
|
||||
oidsKeys = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSOidsKeys"];
|
||||
oidsValues = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSOidsValues"];
|
||||
*/
|
||||
classKeys = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSClassesKeys"];
|
||||
classValues = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSClassesValues"];
|
||||
/*
|
||||
accessibilityOidsKeys = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSAccessibilityOidsKeys"];
|
||||
accessibilityOidsValues = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSAccessibilityOidsValues"];
|
||||
*/
|
||||
|
||||
|
||||
// Only get this when in the editor...
|
||||
if([NSClassSwapper isInInterfaceBuilder])
|
||||
{
|
||||
objectsKeys = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSObjectsKeys"];
|
||||
objectsValues = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSObjectsValues"];
|
||||
oidsKeys = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSOidsKeys"];
|
||||
oidsValues = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSOidsValues"];
|
||||
accessibilityOidsKeys = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSAccessibilityOidsKeys"];
|
||||
accessibilityOidsValues = (NSArray *)
|
||||
[coder decodeObjectForKey: @"NSAccessibilityOidsValues"];
|
||||
}
|
||||
|
||||
// instantiate the maps..
|
||||
_objects = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
||||
NSObjectMapValueCallBacks, 2);
|
||||
|
@ -1465,9 +1470,6 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
// Fill in the maps...
|
||||
/*
|
||||
[self _buildMap: _accessibilityOids
|
||||
withKeys: accessibilityOidsKeys
|
||||
andValues: accessibilityOidsValues];
|
||||
*/
|
||||
[self _buildMap: _classes
|
||||
withKeys: classKeys
|
||||
|
@ -1475,14 +1477,21 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
[self _buildMap: _names
|
||||
withKeys: nameKeys
|
||||
andValues: nameValues];
|
||||
/*
|
||||
[self _buildMap: _objects
|
||||
withKeys: objectsKeys
|
||||
andValues: objectsValues];
|
||||
[self _buildMap: _oids
|
||||
withKeys: oidsKeys
|
||||
andValues: oidsValues];
|
||||
*/
|
||||
|
||||
// Only get this when in the editor.
|
||||
if([NSClassSwapper isInInterfaceBuilder])
|
||||
{
|
||||
[self _buildMap: _accessibilityOids
|
||||
withKeys: accessibilityOidsKeys
|
||||
andValues: accessibilityOidsValues];
|
||||
[self _buildMap: _objects
|
||||
withKeys: objectsKeys
|
||||
andValues: objectsValues];
|
||||
[self _buildMap: _oids
|
||||
withKeys: oidsKeys
|
||||
andValues: oidsValues];
|
||||
}
|
||||
|
||||
ASSIGN(_connections, [[coder decodeObjectForKey: @"NSConnections"] mutableCopy]);
|
||||
|
||||
// instantiate...
|
||||
|
|
|
@ -318,8 +318,14 @@ static Class controlClass;
|
|||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeInt: [self tag] forKey: @"NSTag"];
|
||||
[aCoder encodeObject: [self target] forKey: @"NSTarget"];
|
||||
[aCoder encodeObject: NSStringFromSelector([self action]) forKey: @"NSAction"];
|
||||
if([self target] != nil)
|
||||
{
|
||||
[aCoder encodeObject: [self target] forKey: @"NSTarget"];
|
||||
}
|
||||
if([self action] != NULL)
|
||||
{
|
||||
[aCoder encodeObject: NSStringFromSelector([self action]) forKey: @"NSAction"];
|
||||
}
|
||||
[aCoder encodeObject: _control_view forKey: @"NSControlView"];
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1384,7 +1384,7 @@ static BOOL menuBarVisible = YES;
|
|||
[encoder encodeObject: _items forKey: @"NSMenuItems"];
|
||||
|
||||
// if there is no supermenu, make it the main menu.
|
||||
if ([self supermenu] == nil)
|
||||
if ([self supermenu] == nil && ![self _ownedByPopUp])
|
||||
{
|
||||
[encoder encodeObject: @"_NSMainMenu" forKey: @"NSName"];
|
||||
}
|
||||
|
|
|
@ -1058,6 +1058,11 @@ static NSImage *_pbc_image[5];
|
|||
{
|
||||
[aCoder encodeObject: _menu forKey: @"NSMenu"];
|
||||
}
|
||||
|
||||
if (_menuItem != nil)
|
||||
{
|
||||
[aCoder encodeObject: _menuItem forKey: @"NSMenuItem"];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue