Don't show a toolbar customization palette for a toolbar when user

customization is disabled.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31799 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2010-12-30 18:58:12 +00:00
parent 62a8ead182
commit fb66e35ad6
3 changed files with 24 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2010-12-30 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSToolbar.m (-runCustomizationPalette:):
* Source/NSWindow.m (-validateUserInterfaceItem:):
Don't show the customization palette if user customization is
disabled.
2010-12-30 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSLayoutManager.m: Add code to handle temporary

View file

@ -599,6 +599,10 @@ static GSValidationCenter *vc = nil;
{
GSToolbarCustomizationPalette *palette;
if (![self allowsUserCustomization])
{
return;
}
if (_customizationPaletteIsRunning)
{
NSLog(@"Customization palette is already running for toolbar: %@", self);

View file

@ -5048,6 +5048,19 @@ current key view.<br />
}
}
}
else if (sel_isEqual(action, @selector(runToolbarCustomizationPalette:)))
{
NSToolbar *toolbar = [self toolbar];
if (toolbar == nil)
{
result = NO;
}
else
{
result = [toolbar allowsUserCustomization];
}
}
return result;
}