mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Added code to prevent the "Services menu not in main menu" warning.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19398 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fd786cf242
commit
402a05ca2e
3 changed files with 22 additions and 5 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,4 +1,12 @@
|
|||
2004-05-22 10:22 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
2004-05-25 07:01 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Gorm.m: [Gorm testInterface:] added code to save the services
|
||||
menu and set the current one to nil, if one is not defined in the
|
||||
.gorm file. This prevents the annoying "Services Menu not in main
|
||||
menu" warning.
|
||||
* GormPrivate.h: Added servicesMenu ivar.
|
||||
|
||||
2004-05-24 10:22 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormDocument.m: [GormDocument awakeFromNib] added call
|
||||
to [NSToolbar setUsesStandardBackgroundColor:] to make the
|
||||
|
|
14
Gorm.m
14
Gorm.m
|
@ -671,11 +671,11 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification";
|
|||
{
|
||||
NS_DURING
|
||||
{
|
||||
NSUserDefaults *defaults;
|
||||
NSUserDefaults *defaults;
|
||||
NSNotificationCenter *notifCenter = [NSNotificationCenter defaultCenter];
|
||||
GormDocument *activDoc = (GormDocument*)[self activeDocument];
|
||||
NSData *data;
|
||||
NSArchiver *archiver;
|
||||
NSData *data;
|
||||
NSArchiver *archiver;
|
||||
|
||||
|
||||
isTesting = YES; // set here, so that beginArchiving and endArchiving do not use templates.
|
||||
|
@ -715,6 +715,7 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification";
|
|||
defaults = [NSUserDefaults standardUserDefaults];
|
||||
menuLocations = [[defaults objectForKey: @"NSMenuLocations"] copy];
|
||||
[defaults removeObjectForKey: @"NSMenuLocations"];
|
||||
servicesMenu = [self servicesMenu];
|
||||
|
||||
testContainer = [NSUnarchiver unarchiveObjectWithData: data];
|
||||
if (testContainer != nil)
|
||||
|
@ -756,6 +757,12 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification";
|
|||
}
|
||||
}
|
||||
|
||||
// save the services menu...
|
||||
if([self servicesMenu] == servicesMenu)
|
||||
{
|
||||
[self setServicesMenu: nil]; // so we don't get the warning...
|
||||
}
|
||||
|
||||
// display the current main menu...
|
||||
[[self mainMenu] display];
|
||||
|
||||
|
@ -1030,6 +1037,7 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification";
|
|||
}
|
||||
|
||||
[self setMainMenu: mainMenu];
|
||||
[self setServicesMenu: servicesMenu];
|
||||
[mainMenu display]; // bring it to the front...
|
||||
|
||||
isTesting = NO;
|
||||
|
|
|
@ -90,7 +90,8 @@ extern NSString *GormResizeCellNotification;
|
|||
BOOL isTesting;
|
||||
id testContainer;
|
||||
id gormMenu;
|
||||
NSMenu *mainMenu;
|
||||
NSMenu *mainMenu; // saves the main menu when testing...
|
||||
NSMenu *servicesMenu; // saves the services menu when testing...
|
||||
NSMenu *classMenu; // so we can set it for the class view
|
||||
NSMenuItem *guideLineMenuItem;
|
||||
NSDictionary *menuLocations;
|
||||
|
|
Loading…
Reference in a new issue