Small changes to prepare for merge of NSToolbar and GSToolbar.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27488 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-01-01 19:22:50 +00:00
parent 7219a2e126
commit 46af2db2df
6 changed files with 36 additions and 78 deletions

View file

@ -178,7 +178,6 @@ static void initSystemExtensionsColors(void)
- (void) _handleBackViewsFrame;
- (void) _handleViewsVisibility;
- (void) _reload;
- (void) _setToolbar: (GSToolbar *)toolbar;
- (void) _takeInAccountFlexibleSpaces;
- (int) _insertionIndexAtPoint: (NSPoint)location;
@ -659,13 +658,21 @@ static void initSystemExtensionsColors(void)
- (void) setToolbar: (GSToolbar *)toolbar
{
if ([toolbar isKindOfClass: NSClassFromString(@"NSToolbar")])
[NSException raise: NSInvalidArgumentException
format: @"NSToolbar instance can't be attached directly to a \
toolbar view, setToolbar: from the NSWindow toolbar \
category must be used."];
[self _setToolbar: toolbar];
if ([toolbar sizeMode] != _sizeMode)
; // FIXME: Raise exception here
if (_toolbar == toolbar)
return;
// We unset the toolbar view from the previous toolbar
[_toolbar _setToolbarView: nil];
ASSIGN(_toolbar, toolbar);
// We set the toolbar view on the new toolbar
[_toolbar _setToolbarView: self];
[_clippedItemsMark setToolbar: _toolbar];
// Load the toolbar in the toolbar view
[self _reload];
}
- (NSColor *) standardBackgroundColor
@ -821,21 +828,6 @@ static void initSystemExtensionsColors(void)
[self setNeedsDisplay: YES];
}
- (void) _setToolbar: (GSToolbar *)toolbar
{
if ([toolbar sizeMode] != _sizeMode)
; // FIXME: Raise exception here
[toolbar _setToolbarView: self]; // We set the toolbar view on the new toolbar
[_toolbar _setToolbarView: nil]; // We unset the toolbar view from the previous toolbar
ASSIGN(_toolbar, toolbar);
[_clippedItemsMark setToolbar: _toolbar];
[self _reload]; // Load the toolbar in the toolbar view
}
- (void) _takeInAccountFlexibleSpaces
{
NSArray *items = [_toolbar items];