mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 05:10:58 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4997 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8cad842435
commit
f758b19b04
2 changed files with 16 additions and 18 deletions
|
@ -61,6 +61,7 @@
|
||||||
#include <AppKit/NSMenu.h>
|
#include <AppKit/NSMenu.h>
|
||||||
#include <AppKit/NSMenuItem.h>
|
#include <AppKit/NSMenuItem.h>
|
||||||
#include <AppKit/NSCursor.h>
|
#include <AppKit/NSCursor.h>
|
||||||
|
#include <AppKit/NSWorkspace.h>
|
||||||
#include <AppKit/GSServicesManager.h>
|
#include <AppKit/GSServicesManager.h>
|
||||||
#include <AppKit/IMLoading.h>
|
#include <AppKit/IMLoading.h>
|
||||||
#include <AppKit/DPSOperators.h>
|
#include <AppKit/DPSOperators.h>
|
||||||
|
@ -173,6 +174,7 @@ NSApplication *NSApp = nil;
|
||||||
NSString *appIconFile;
|
NSString *appIconFile;
|
||||||
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
|
||||||
NSString *filePath;
|
NSString *filePath;
|
||||||
|
NSDictionary *userInfo;
|
||||||
|
|
||||||
mainModelFile = [infoDict objectForKey: @"NSMainNibFile"];
|
mainModelFile = [infoDict objectForKey: @"NSMainNibFile"];
|
||||||
if (mainModelFile && ![mainModelFile isEqual: @""])
|
if (mainModelFile && ![mainModelFile isEqual: @""])
|
||||||
|
@ -238,6 +240,13 @@ NSApplication *NSApp = nil;
|
||||||
[[NSDocumentController sharedDocumentController] openDocumentWithContentsOfFile:filePath display:YES];
|
[[NSDocumentController sharedDocumentController] openDocumentWithContentsOfFile:filePath display:YES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
userInfo = [NSDictionary dictionaryWithObject:
|
||||||
|
[[NSProcessInfo processInfo] processName] forKey: @"NSApplicationName"];
|
||||||
|
[[[NSWorkspace sharedWorkspace] notificationCenter]
|
||||||
|
postNotificationName: NSWorkspaceDidLaunchApplicationNotification
|
||||||
|
object: self
|
||||||
|
userInfo: userInfo];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
|
|
|
@ -597,7 +597,6 @@ extIconForApp(NSWorkspace *ws, NSString *appName, NSDictionary *typeInfo)
|
||||||
{
|
{
|
||||||
NSString *port = [appName stringByDeletingPathExtension];
|
NSString *port = [appName stringByDeletingPathExtension];
|
||||||
id app = nil;
|
id app = nil;
|
||||||
NSDictionary *userinfo = nil;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to contact a running application.
|
* Try to contact a running application.
|
||||||
|
@ -617,6 +616,7 @@ extIconForApp(NSWorkspace *ws, NSString *appName, NSDictionary *typeInfo)
|
||||||
{
|
{
|
||||||
NSString *path;
|
NSString *path;
|
||||||
NSArray *args;
|
NSArray *args;
|
||||||
|
NSDictionary *userinfo = nil;
|
||||||
|
|
||||||
path = [self locateApplicationBinary: appName];
|
path = [self locateApplicationBinary: appName];
|
||||||
if (path == nil)
|
if (path == nil)
|
||||||
|
@ -628,10 +628,10 @@ extIconForApp(NSWorkspace *ws, NSString *appName, NSDictionary *typeInfo)
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
userinfo = [NSDictionary dictionaryWithObject: appName
|
// App being launched, raise NSWorkspaceWillLaunchApplicationNotification
|
||||||
|
userinfo = [NSDictionary dictionaryWithObject: port
|
||||||
forKey: @"NSApplicationName"];
|
forKey: @"NSApplicationName"];
|
||||||
|
|
||||||
// App being launched, raise NSWorkspaceWillLaunchApplicationNotification
|
|
||||||
[workspaceCenter
|
[workspaceCenter
|
||||||
postNotificationName: NSWorkspaceWillLaunchApplicationNotification
|
postNotificationName: NSWorkspaceWillLaunchApplicationNotification
|
||||||
object: self
|
object: self
|
||||||
|
@ -647,11 +647,6 @@ extIconForApp(NSWorkspace *ws, NSString *appName, NSDictionary *typeInfo)
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
[workspaceCenter
|
|
||||||
postNotificationName: NSWorkspaceDidLaunchApplicationNotification
|
|
||||||
object: self
|
|
||||||
userInfo: userinfo];
|
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -959,10 +954,10 @@ inFileViewerRootedAtPath: (NSString *)rootFullpath
|
||||||
if (path == nil)
|
if (path == nil)
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
userinfo = [NSDictionary dictionaryWithObject: appName
|
|
||||||
forKey: @"NSApplicationName"];
|
|
||||||
|
|
||||||
// App being launched, raise NSWorkspaceWillLaunchApplicationNotification
|
// App being launched, raise NSWorkspaceWillLaunchApplicationNotification
|
||||||
|
userinfo = [NSDictionary dictionaryWithObject:
|
||||||
|
[[appName lastPathComponent] stringByDeletingPathExtension]
|
||||||
|
forKey: @"NSApplicationName"];
|
||||||
[workspaceCenter
|
[workspaceCenter
|
||||||
postNotificationName: NSWorkspaceWillLaunchApplicationNotification
|
postNotificationName: NSWorkspaceWillLaunchApplicationNotification
|
||||||
object: self
|
object: self
|
||||||
|
@ -971,12 +966,6 @@ inFileViewerRootedAtPath: (NSString *)rootFullpath
|
||||||
if ([NSTask launchedTaskWithLaunchPath: path arguments: nil] == nil)
|
if ([NSTask launchedTaskWithLaunchPath: path arguments: nil] == nil)
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
// App has been launched raise NSWorkspaceDidLaunchApplicationNotification
|
|
||||||
[workspaceCenter
|
|
||||||
postNotificationName: NSWorkspaceDidLaunchApplicationNotification
|
|
||||||
object: self
|
|
||||||
userInfo: userinfo];
|
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue