mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Clean up the toolbar view of the old toolbar.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27482 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
326aaadef2
commit
04a95231a9
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-12-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSWindow+Toolbar.m (-setToolbar:): Clean up the toolbar
|
||||
view of the old toolbar.
|
||||
|
||||
2008-12-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSMenu.m
|
||||
|
|
|
@ -123,19 +123,21 @@
|
|||
|
||||
- (void) setToolbar: (NSToolbar*)toolbar
|
||||
{
|
||||
NSToolbar *lastToolbar = [self toolbar];
|
||||
|
||||
if (toolbar == lastToolbar)
|
||||
if (toolbar == _toolbar)
|
||||
return;
|
||||
|
||||
if (lastToolbar != nil)
|
||||
if (_toolbar != nil)
|
||||
{
|
||||
GSToolbarView *toolbarView = [_toolbar _toolbarView];
|
||||
|
||||
// We throw the last toolbar out
|
||||
if ([lastToolbar isVisible])
|
||||
if ([_toolbar isVisible])
|
||||
{
|
||||
[self _toggleToolbarView];
|
||||
}
|
||||
// FIXME: Should release the toolbarView
|
||||
[toolbarView _setToolbar: nil];
|
||||
// Release the toolbarView, this will release the toolbar
|
||||
RELEASE(toolbarView);
|
||||
}
|
||||
|
||||
ASSIGN(_toolbar, toolbar);
|
||||
|
|
Loading…
Reference in a new issue