mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Don't validate menu items in design menus in Gorm.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@30466 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b8cc207f46
commit
35848ad6fd
4 changed files with 22 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-05-28 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Palettes/0Menus/GormNSMenu.h:
|
||||
* Palettes/0Menus/GormNSMenu.m:
|
||||
* Palettes/0Menus/GormMenuAttributesInspector.m: Don't validate
|
||||
menu items in design menus.
|
||||
|
||||
2010-05-28 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* GormCore/GormDocument.h:
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
*/
|
||||
|
||||
#include "GormMenuAttributesInspector.h"
|
||||
#include "GormNSMenu.h"
|
||||
|
||||
#include <Foundation/NSNotification.h>
|
||||
|
||||
|
@ -134,7 +135,7 @@
|
|||
doc = (GormDocument *)[(id<IB>)NSApp activeDocument];
|
||||
|
||||
[titleText setStringValue: [object title]];
|
||||
[autoenable setState: ([object autoenablesItems]?NSOnState:NSOffState)];
|
||||
[autoenable setState: ([object realAutoenablesItems]?NSOnState:NSOffState)];
|
||||
|
||||
// set up the menu type matrix...
|
||||
if([doc windowsMenu] == object)
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
@interface GormNSMenu : NSMenu
|
||||
+ (GormNSMenu *) menuWithMenu: (NSMenu *)menu;
|
||||
- (BOOL) realAutoenablesItems;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -209,6 +209,18 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
// Override -autoenablesItems to disable menu validation for design menus in
|
||||
// Gorm. This avoids disabling menu items by default in Gorm documents.
|
||||
- (BOOL) realAutoenablesItems
|
||||
{
|
||||
return [super autoenablesItems];
|
||||
}
|
||||
|
||||
- (BOOL) autoenablesItems
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSString*) _locationKey
|
||||
{
|
||||
if ([self supermenu] == nil)
|
||||
|
|
Loading…
Reference in a new issue