mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 16:20:46 +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
|
@ -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
|
||||
|
|
|
@ -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…
Reference in a new issue