Add support for a recent documents menu in .gorm files.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30390 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2010-05-14 19:20:45 +00:00
parent 7f90afe7bc
commit 525f1c40c4
2 changed files with 16 additions and 0 deletions

View file

@ -46,6 +46,7 @@
#import "AppKit/NSView.h"
#import "AppKit/NSWindow.h"
#import "GNUstepGUI/GSGormLoading.h"
#import "NSDocumentFrameworkPrivate.h"
static const int currentVersion = 1; // GSNibItem version number...
@ -217,6 +218,16 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN
[NSApp setWindowsMenu: menu];
}
/*
* Set the Recent Documents menu.
*/
menu = [nameTable objectForKey: @"NSRecentDocumentsMenu"];
if (menu != nil && [menu isKindOfClass: [NSMenu class]] == YES)
{
[[NSDocumentController sharedDocumentController]
_setRecentDocumentsMenu: menu];
}
/*
* See if the user has passed in the NSNibTopLevelObjects key.