mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 00:31:03 +00:00
Minor fixes for workspace notifications
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5039 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9825306c58
commit
64488e6858
3 changed files with 21 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Oct 19 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSApplication.m: ([-terminate:]) modification based on
|
||||
patch by Aled.Davies@bigfoot.com to send notification.
|
||||
* Source/NSWorkspace.m: Fix to prevent duplicate notifications.
|
||||
|
||||
Tue Oct 19 1999 Nicola Pero <n.pero@mi.flashnet.it>
|
||||
|
||||
Changing suggested by Richard:
|
||||
|
|
|
@ -1493,12 +1493,24 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException);
|
|||
|
||||
if (shouldTerminate)
|
||||
{
|
||||
NSDictionary *userInfo;
|
||||
|
||||
app_should_quit = YES;
|
||||
/*
|
||||
* add dummy event to queue to assure loop cycles
|
||||
* at least one more time
|
||||
*/
|
||||
DPSPostEvent(GSCurrentContext(), null_event, NO);
|
||||
|
||||
/*
|
||||
* Tell the Workspace that we really did terminate
|
||||
*/
|
||||
userInfo = [NSDictionary dictionaryWithObject:
|
||||
[[NSProcessInfo processInfo] processName] forKey: @"NSApplicationName"];
|
||||
[[[NSWorkspace sharedWorkspace] notificationCenter]
|
||||
postNotificationName: NSWorkspaceDidTerminateApplicationNotification
|
||||
object: self
|
||||
userInfo: userInfo];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,9 @@ static NSString *GSWorkspaceNotification = @"GSWorkspaceNotification";
|
|||
}
|
||||
|
||||
/*
|
||||
* Post notification both locally and remotely.
|
||||
* Post notification remotely - since we are listening for distributed
|
||||
* notifications, we will observe the notification arriving from the
|
||||
* distributed notification center, and it will get sent out locally too.
|
||||
*/
|
||||
- (void) postNotification: (NSNotification*)aNotification
|
||||
{
|
||||
|
@ -93,7 +95,6 @@ static NSString *GSWorkspaceNotification = @"GSWorkspaceNotification";
|
|||
object: GSWorkspaceNotification
|
||||
userInfo: [aNotification userInfo]];
|
||||
[remote postNotification: rem];
|
||||
[super postNotification: aNotification];
|
||||
}
|
||||
|
||||
- (void) postNotificationName: (NSString*)name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue