mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 10:51:00 +00:00
Removed windowsLock variable from NSWindow
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17771 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7a912b2bcd
commit
d4e1c63db3
2 changed files with 6 additions and 13 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003-10-03 Benhur Stein <benhur@inf.ufsm.br>
|
||||||
|
|
||||||
|
* Source/NSWindow.m (class variables, +initialize,
|
||||||
|
+removeFrameUsingName:, -dealloc, -saveFrameUsingName:,
|
||||||
|
-setFrameAutosaveName:): removed variable windowsLock
|
||||||
|
|
||||||
2003-10-02 David Ayers <d.ayers@inode.at>
|
2003-10-02 David Ayers <d.ayers@inode.at>
|
||||||
|
|
||||||
* Source/NSBrowser.m (-[NSBrowser setDelegate]):
|
* Source/NSBrowser.m (-[NSBrowser setDelegate]):
|
||||||
|
|
|
@ -499,7 +499,6 @@ static IMP ctImp;
|
||||||
static Class responderClass;
|
static Class responderClass;
|
||||||
static Class viewClass;
|
static Class viewClass;
|
||||||
static NSMutableSet *autosaveNames;
|
static NSMutableSet *autosaveNames;
|
||||||
static NSRecursiveLock *windowsLock;
|
|
||||||
static NSMapTable* windowmaps = NULL;
|
static NSMapTable* windowmaps = NULL;
|
||||||
static NSNotificationCenter *nc = nil;
|
static NSNotificationCenter *nc = nil;
|
||||||
|
|
||||||
|
@ -519,7 +518,6 @@ static NSNotificationCenter *nc = nil;
|
||||||
responderClass = [NSResponder class];
|
responderClass = [NSResponder class];
|
||||||
viewClass = [NSView class];
|
viewClass = [NSView class];
|
||||||
autosaveNames = [NSMutableSet new];
|
autosaveNames = [NSMutableSet new];
|
||||||
windowsLock = [NSRecursiveLock new];
|
|
||||||
nc = [NSNotificationCenter defaultCenter];
|
nc = [NSNotificationCenter defaultCenter];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -531,9 +529,7 @@ static NSNotificationCenter *nc = nil;
|
||||||
NSString *key;
|
NSString *key;
|
||||||
|
|
||||||
key = [NSString stringWithFormat: @"NSWindow Frame %@", name];
|
key = [NSString stringWithFormat: @"NSWindow Frame %@", name];
|
||||||
[windowsLock lock];
|
|
||||||
[[NSUserDefaults standardUserDefaults] removeObjectForKey: key];
|
[[NSUserDefaults standardUserDefaults] removeObjectForKey: key];
|
||||||
[windowsLock unlock];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -650,13 +646,11 @@ many times.
|
||||||
argument: nil];
|
argument: nil];
|
||||||
[NSApp removeWindowsItem: self];
|
[NSApp removeWindowsItem: self];
|
||||||
|
|
||||||
[windowsLock lock];
|
|
||||||
if (_autosaveName != nil)
|
if (_autosaveName != nil)
|
||||||
{
|
{
|
||||||
[autosaveNames removeObject: _autosaveName];
|
[autosaveNames removeObject: _autosaveName];
|
||||||
_autosaveName = nil;
|
_autosaveName = nil;
|
||||||
}
|
}
|
||||||
[windowsLock unlock];
|
|
||||||
|
|
||||||
if (_counterpart != 0 && (_styleMask & NSMiniWindowMask) == 0)
|
if (_counterpart != 0 && (_styleMask & NSMiniWindowMask) == 0)
|
||||||
{
|
{
|
||||||
|
@ -3508,12 +3502,10 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
||||||
NSString *key;
|
NSString *key;
|
||||||
id obj;
|
id obj;
|
||||||
|
|
||||||
[windowsLock lock];
|
|
||||||
defs = [NSUserDefaults standardUserDefaults];
|
defs = [NSUserDefaults standardUserDefaults];
|
||||||
obj = [self stringWithSavedFrame];
|
obj = [self stringWithSavedFrame];
|
||||||
key = [NSString stringWithFormat: @"NSWindow Frame %@", name];
|
key = [NSString stringWithFormat: @"NSWindow Frame %@", name];
|
||||||
[defs setObject: obj forKey: key];
|
[defs setObject: obj forKey: key];
|
||||||
[windowsLock unlock];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) setFrameAutosaveName: (NSString*)name
|
- (BOOL) setFrameAutosaveName: (NSString*)name
|
||||||
|
@ -3525,10 +3517,8 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
||||||
return YES; /* That's our name already. */
|
return YES; /* That's our name already. */
|
||||||
}
|
}
|
||||||
|
|
||||||
[windowsLock lock];
|
|
||||||
if ([autosaveNames member: name] != nil)
|
if ([autosaveNames member: name] != nil)
|
||||||
{
|
{
|
||||||
[windowsLock unlock];
|
|
||||||
return NO; /* Name in use elsewhere. */
|
return NO; /* Name in use elsewhere. */
|
||||||
}
|
}
|
||||||
if (_autosaveName != nil)
|
if (_autosaveName != nil)
|
||||||
|
@ -3560,7 +3550,6 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
||||||
[defs removeObjectForKey: key];
|
[defs removeObjectForKey: key];
|
||||||
RELEASE(nameToRemove);
|
RELEASE(nameToRemove);
|
||||||
}
|
}
|
||||||
[windowsLock unlock];
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3678,11 +3667,9 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
||||||
id obj;
|
id obj;
|
||||||
NSString *key;
|
NSString *key;
|
||||||
|
|
||||||
[windowsLock lock];
|
|
||||||
defs = [NSUserDefaults standardUserDefaults];
|
defs = [NSUserDefaults standardUserDefaults];
|
||||||
key = [NSString stringWithFormat: @"NSWindow Frame %@", name];
|
key = [NSString stringWithFormat: @"NSWindow Frame %@", name];
|
||||||
obj = [defs objectForKey: key];
|
obj = [defs objectForKey: key];
|
||||||
[windowsLock unlock];
|
|
||||||
if (obj == nil)
|
if (obj == nil)
|
||||||
return NO;
|
return NO;
|
||||||
[self setFrameFromString: obj];
|
[self setFrameFromString: obj];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue