Minor fix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16144 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-03-07 05:50:53 +00:00
parent 00b16254bb
commit 4e79c73770
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2003-03-07 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSMenu.m: ([_updateUserDefaults:]) restore saved menu
location functionality (was only working for torn off menus).
2003-03-06 Willem Rein Oudshoorn <woudshoo@xs4all.nl>
* Source/NSMenuView.m: Added NSMenuTitleView (moved

View file

@ -187,7 +187,7 @@ static NSNotificationCenter *nc;
NSNotification *resend;
resend = [NSNotification notificationWithName: NSEnqueuedMenuMoveName
object: self];
object: self];
[[NSNotificationQueue defaultQueue]
enqueueNotification: resend
@ -214,11 +214,12 @@ static NSNotificationCenter *nc;
defaults = [NSUserDefaults standardUserDefaults];
menuLocations = [[defaults objectForKey: NSMenuLocationsKey] mutableCopy];
if ([_aWindow isVisible] && [self isTornOff])
if ([_aWindow isVisible])
{
if (menuLocations == nil)
{
menuLocations = AUTORELEASE([[NSMutableDictionary alloc] initWithCapacity: 2]);
menuLocations = AUTORELEASE([[NSMutableDictionary alloc]
initWithCapacity: 2]);
}
locString = [[self window] stringWithSavedFrame];
[menuLocations setObject: locString forKey: key];