mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:00:47 +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
a57d14d144
commit
2d2b5d17e0
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>
|
2008-12-20 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSTextView.m (-shouldChangeTextInRange:replacementString:):
|
* Source/NSTextView.m (-shouldChangeTextInRange:replacementString:):
|
||||||
|
@ -25,6 +36,7 @@
|
||||||
* GNUmakefile: Export GNUSTEP_CORE_SOFTWARE to reduce chances of a
|
* GNUmakefile: Export GNUSTEP_CORE_SOFTWARE to reduce chances of a
|
||||||
problem if a GNUmakefile in a subdirectory is missing it.
|
problem if a GNUmakefile in a subdirectory is missing it.
|
||||||
|
|
||||||
|
>>>>>>> .r27362
|
||||||
2008-12-17 21:20-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
2008-12-17 21:20-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Source/GSNibLoading.m: Remove change which resets the bounds
|
* Source/GSNibLoading.m: Remove change which resets the bounds
|
||||||
|
|
|
@ -1414,6 +1414,12 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
NSArray *nameValues = nil;
|
NSArray *nameValues = nil;
|
||||||
NSArray *classKeys = nil;
|
NSArray *classKeys = nil;
|
||||||
NSArray *classValues = 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(_root, [coder decodeObjectForKey: @"NSRoot"]);
|
||||||
ASSIGN(_visibleWindows,
|
ASSIGN(_visibleWindows,
|
||||||
|
@ -1424,33 +1430,32 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
ASSIGN(_framework, [coder decodeObjectForKey: @"NSFramework"]);
|
ASSIGN(_framework, [coder decodeObjectForKey: @"NSFramework"]);
|
||||||
_nextOid = [coder decodeIntForKey: @"NSNextOid"];
|
_nextOid = [coder decodeIntForKey: @"NSNextOid"];
|
||||||
|
|
||||||
/*
|
|
||||||
objectsKeys = (NSArray *)
|
|
||||||
[coder decodeObjectForKey: @"NSObjectsKeys"];
|
|
||||||
objectsValues = (NSArray *)
|
|
||||||
[coder decodeObjectForKey: @"NSObjectsValues"];
|
|
||||||
*/
|
|
||||||
nameKeys = (NSArray *)
|
nameKeys = (NSArray *)
|
||||||
[coder decodeObjectForKey: @"NSNamesKeys"];
|
[coder decodeObjectForKey: @"NSNamesKeys"];
|
||||||
nameValues = (NSArray *)
|
nameValues = (NSArray *)
|
||||||
[coder decodeObjectForKey: @"NSNamesValues"];
|
[coder decodeObjectForKey: @"NSNamesValues"];
|
||||||
/*
|
|
||||||
oidsKeys = (NSArray *)
|
|
||||||
[coder decodeObjectForKey: @"NSOidsKeys"];
|
|
||||||
oidsValues = (NSArray *)
|
|
||||||
[coder decodeObjectForKey: @"NSOidsValues"];
|
|
||||||
*/
|
|
||||||
classKeys = (NSArray *)
|
classKeys = (NSArray *)
|
||||||
[coder decodeObjectForKey: @"NSClassesKeys"];
|
[coder decodeObjectForKey: @"NSClassesKeys"];
|
||||||
classValues = (NSArray *)
|
classValues = (NSArray *)
|
||||||
[coder decodeObjectForKey: @"NSClassesValues"];
|
[coder decodeObjectForKey: @"NSClassesValues"];
|
||||||
/*
|
|
||||||
accessibilityOidsKeys = (NSArray *)
|
// Only get this when in the editor...
|
||||||
[coder decodeObjectForKey: @"NSAccessibilityOidsKeys"];
|
if([NSClassSwapper isInInterfaceBuilder])
|
||||||
accessibilityOidsValues = (NSArray *)
|
{
|
||||||
[coder decodeObjectForKey: @"NSAccessibilityOidsValues"];
|
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..
|
// instantiate the maps..
|
||||||
_objects = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
_objects = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
||||||
NSObjectMapValueCallBacks, 2);
|
NSObjectMapValueCallBacks, 2);
|
||||||
|
@ -1465,9 +1470,6 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
|
|
||||||
// Fill in the maps...
|
// Fill in the maps...
|
||||||
/*
|
/*
|
||||||
[self _buildMap: _accessibilityOids
|
|
||||||
withKeys: accessibilityOidsKeys
|
|
||||||
andValues: accessibilityOidsValues];
|
|
||||||
*/
|
*/
|
||||||
[self _buildMap: _classes
|
[self _buildMap: _classes
|
||||||
withKeys: classKeys
|
withKeys: classKeys
|
||||||
|
@ -1475,14 +1477,21 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
[self _buildMap: _names
|
[self _buildMap: _names
|
||||||
withKeys: nameKeys
|
withKeys: nameKeys
|
||||||
andValues: nameValues];
|
andValues: nameValues];
|
||||||
/*
|
|
||||||
[self _buildMap: _objects
|
// Only get this when in the editor.
|
||||||
withKeys: objectsKeys
|
if([NSClassSwapper isInInterfaceBuilder])
|
||||||
andValues: objectsValues];
|
{
|
||||||
[self _buildMap: _oids
|
[self _buildMap: _accessibilityOids
|
||||||
withKeys: oidsKeys
|
withKeys: accessibilityOidsKeys
|
||||||
andValues: oidsValues];
|
andValues: accessibilityOidsValues];
|
||||||
*/
|
[self _buildMap: _objects
|
||||||
|
withKeys: objectsKeys
|
||||||
|
andValues: objectsValues];
|
||||||
|
[self _buildMap: _oids
|
||||||
|
withKeys: oidsKeys
|
||||||
|
andValues: oidsValues];
|
||||||
|
}
|
||||||
|
|
||||||
ASSIGN(_connections, [[coder decodeObjectForKey: @"NSConnections"] mutableCopy]);
|
ASSIGN(_connections, [[coder decodeObjectForKey: @"NSConnections"] mutableCopy]);
|
||||||
|
|
||||||
// instantiate...
|
// instantiate...
|
||||||
|
|
|
@ -318,8 +318,14 @@ static Class controlClass;
|
||||||
if ([aCoder allowsKeyedCoding])
|
if ([aCoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
[aCoder encodeInt: [self tag] forKey: @"NSTag"];
|
[aCoder encodeInt: [self tag] forKey: @"NSTag"];
|
||||||
[aCoder encodeObject: [self target] forKey: @"NSTarget"];
|
if([self target] != nil)
|
||||||
[aCoder encodeObject: NSStringFromSelector([self action]) forKey: @"NSAction"];
|
{
|
||||||
|
[aCoder encodeObject: [self target] forKey: @"NSTarget"];
|
||||||
|
}
|
||||||
|
if([self action] != NULL)
|
||||||
|
{
|
||||||
|
[aCoder encodeObject: NSStringFromSelector([self action]) forKey: @"NSAction"];
|
||||||
|
}
|
||||||
[aCoder encodeObject: _control_view forKey: @"NSControlView"];
|
[aCoder encodeObject: _control_view forKey: @"NSControlView"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1384,7 +1384,7 @@ static BOOL menuBarVisible = YES;
|
||||||
[encoder encodeObject: _items forKey: @"NSMenuItems"];
|
[encoder encodeObject: _items forKey: @"NSMenuItems"];
|
||||||
|
|
||||||
// if there is no supermenu, make it the main menu.
|
// 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"];
|
[encoder encodeObject: @"_NSMainMenu" forKey: @"NSName"];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1058,6 +1058,11 @@ static NSImage *_pbc_image[5];
|
||||||
{
|
{
|
||||||
[aCoder encodeObject: _menu forKey: @"NSMenu"];
|
[aCoder encodeObject: _menu forKey: @"NSMenu"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_menuItem != nil)
|
||||||
|
{
|
||||||
|
[aCoder encodeObject: _menuItem forKey: @"NSMenuItem"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue