Remove useless KVB code. I hope to commit better code later on.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34097 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2011-10-31 17:12:39 +00:00
parent 2a5ee82d7c
commit 15bd7324f4
4 changed files with 48 additions and 60 deletions

View file

@ -83,11 +83,7 @@ static NSNotificationCenter *nc;
[self exposeBinding: NSAlignmentBinding];
[self exposeBinding: NSFontBinding];
[self exposeBinding: NSFontNameBinding];
[self setKeys: [NSArray arrayWithObject: NSFontBinding]
triggerChangeNotificationsForDependentKey: NSFontNameBinding];
[self exposeBinding: NSFontSizeBinding];
[self setKeys: [NSArray arrayWithObject: NSFontBinding]
triggerChangeNotificationsForDependentKey: NSFontSizeBinding];
}
}
@ -1057,8 +1053,6 @@ static NSNotificationCenter *nc;
GSKeyValueBinding *kvb;
[self unbind: binding];
// FIXME: We could also do the mapping via
// setKeys:triggerChangeNotificationsForDependentKey:
kvb = [[GSKeyValueBinding alloc] initWithBinding: @"objectValue"
withName: NSValueBinding
toObject: anObject

View file

@ -1196,7 +1196,6 @@ static SEL getSel;
- (void) _selectCell: (NSCell *)aCell atRow: (int)row column: (int)column
{
[self willChangeValueForKey: NSSelectedTagBinding];
if (aCell)
{
NSRect cellFrame;
@ -1242,7 +1241,6 @@ static SEL getSel;
_selectedCell = nil;
_selectedRow = _selectedColumn = -1;
}
[self didChangeValueForKey: NSSelectedTagBinding];
}
- (void) selectCell: (NSCell *)aCell

View file

@ -66,11 +66,7 @@ Class _nspopupbuttonCellClass = 0;
[self exposeBinding: NSSelectedIndexBinding];
[self exposeBinding: NSSelectedObjectBinding];
[self setKeys: [NSArray arrayWithObject: NSSelectedIndexBinding]
triggerChangeNotificationsForDependentKey: NSSelectedObjectBinding];
[self exposeBinding: NSSelectedTagBinding];
[self setKeys: [NSArray arrayWithObject: NSSelectedIndexBinding]
triggerChangeNotificationsForDependentKey: NSSelectedTagBinding];
}
}
@ -270,9 +266,7 @@ this to return nil to indicate that we have no context menu.
- (void) selectItem: (id <NSMenuItem>)anObject
{
[self willChangeValueForKey: NSSelectedIndexBinding];
[_cell selectItem: anObject];
[self didChangeValueForKey: NSSelectedIndexBinding];
[self synchronizeTitleAndSelectedItem];
}
@ -282,9 +276,7 @@ this to return nil to indicate that we have no context menu.
*/
- (void) selectItemAtIndex: (int)index
{
[self willChangeValueForKey: NSSelectedIndexBinding];
[_cell selectItemAtIndex: index];
[self didChangeValueForKey: NSSelectedIndexBinding];
[self synchronizeTitleAndSelectedItem];
}
@ -295,9 +287,7 @@ this to return nil to indicate that we have no context menu.
*/
- (void) selectItemWithTitle: (NSString*)title
{
[self willChangeValueForKey: NSSelectedIndexBinding];
[_cell selectItemWithTitle: title];
[self didChangeValueForKey: NSSelectedIndexBinding];
[self synchronizeTitleAndSelectedItem];
}