mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 04:30:37 +00:00
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:
parent
62a8ead182
commit
fb66e35ad6
3 changed files with 24 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue