Fixes for better workspace notification and to allow shutdown of an app

by an external process.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21784 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-10-08 09:42:22 +00:00
parent bd8fb5fc53
commit b5c8c6000c
3 changed files with 57 additions and 7 deletions

View file

@ -83,6 +83,7 @@ static NSString *GSWorkspaceNotification = @"GSWorkspaceNotification";
NSDistributedNotificationCenter *remote;
}
- (void) _handleRemoteNotification: (NSNotification*)aNotification;
- (void) _postLocal: (NSString*)name userInfo: (NSDictionary*)info;
@end
@implementation _GSWorkspaceCenter
@ -181,9 +182,22 @@ static NSString *GSWorkspaceNotification = @"GSWorkspaceNotification";
*/
- (void) _handleRemoteNotification: (NSNotification*)aNotification
{
[super postNotification: aNotification];
[self _postLocal: [aNotification name]
userInfo: [aNotification userInfo]];
}
/*
* Method allowing a notification to be posted locally.
*/
- (void) _postLocal: (NSString*)name userInfo: (NSDictionary*)info
{
NSNotification *aNotification;
aNotification = [NSNotification notificationWithName: name
object: self
userInfo: info];
[super postNotification: aNotification];
}
@end