mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 17:40:36 +00:00
Image updates from Jonathon Gapen
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5343 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e58e3b260e
commit
fc849e3129
6 changed files with 104 additions and 29 deletions
|
@ -2351,6 +2351,43 @@ resetCursorRectsForView(NSView *theView)
|
|||
autosave_name = name;
|
||||
[name release];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSUserDefaults *defs;
|
||||
NSString *key;
|
||||
|
||||
/*
|
||||
* Autosave name cleared - remove from defaults database.
|
||||
*/
|
||||
defs = [NSUserDefaults standardUserDefaults];
|
||||
if ([self isKindOfClass: [NSMenuWindow class]])
|
||||
{
|
||||
id dict;
|
||||
|
||||
key = @"NSMenuLocations";
|
||||
dict = [defs objectForKey: key];
|
||||
if (dict == nil)
|
||||
{
|
||||
dict = [NSMutableDictionary dictionaryWithCapacity: 1];
|
||||
}
|
||||
else if ([dict isKindOfClass: [NSDictionary class]] == NO)
|
||||
{
|
||||
NSLog(@"NSMenuLocations is not a dictionary - overwriting");
|
||||
dict = [NSMutableDictionary dictionaryWithCapacity: 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
dict = AUTORELEASE([dict mutableCopy]);
|
||||
}
|
||||
[dict removeObjectForKey: name];
|
||||
[defs setObject: dict forKey: key];
|
||||
}
|
||||
else
|
||||
{
|
||||
key = [NSString stringWithFormat: @"NSWindow Frame %@", name];
|
||||
[defs removeObjectForKey: key];
|
||||
}
|
||||
}
|
||||
[windowsLock unlock];
|
||||
return YES;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue