mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 09:00:56 +00:00
another tweak for using pointer identity rather than object equality
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39123 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
95a6eb6766
commit
77bfc5d864
1 changed files with 13 additions and 7 deletions
|
@ -65,6 +65,7 @@
|
||||||
#import "GSGuiPrivate.h"
|
#import "GSGuiPrivate.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
static NSMapTableKeyCallBacks keyCallBacks;
|
||||||
static NSNotificationCenter *nc = nil;
|
static NSNotificationCenter *nc = nil;
|
||||||
static const int current_version = 1;
|
static const int current_version = 1;
|
||||||
|
|
||||||
|
@ -144,6 +145,11 @@ static NSImage *unexpandable = nil;
|
||||||
{
|
{
|
||||||
[self setVersion: current_version];
|
[self setVersion: current_version];
|
||||||
nc = [NSNotificationCenter defaultCenter];
|
nc = [NSNotificationCenter defaultCenter];
|
||||||
|
/* We need special map table callbacks, to check for identical
|
||||||
|
* objects rather than merely equal objects.
|
||||||
|
*/
|
||||||
|
keyCallBacks = NSObjectMapKeyCallBacks;
|
||||||
|
keyCallBacks.isEqual = NSOwnedPointerMapKeyCallBacks.isEqual;
|
||||||
#if 0
|
#if 0
|
||||||
/* Old Interface Builder style. */
|
/* Old Interface Builder style. */
|
||||||
collapsed = [NSImage imageNamed: @"common_outlineCollapsed"];
|
collapsed = [NSImage imageNamed: @"common_outlineCollapsed"];
|
||||||
|
@ -719,10 +725,10 @@ static NSImage *unexpandable = nil;
|
||||||
|
|
||||||
// create a new empty one
|
// create a new empty one
|
||||||
_items = [[NSMutableArray alloc] init];
|
_items = [[NSMutableArray alloc] init];
|
||||||
_itemDict = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
_itemDict = NSCreateMapTable(keyCallBacks,
|
||||||
NSObjectMapValueCallBacks,
|
NSObjectMapValueCallBacks,
|
||||||
64);
|
64);
|
||||||
_levelOfItems = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
_levelOfItems = NSCreateMapTable(keyCallBacks,
|
||||||
NSObjectMapValueCallBacks,
|
NSObjectMapValueCallBacks,
|
||||||
64);
|
64);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue