mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 13:10:52 +00:00
Fixes to get file opening working.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4800 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0f6a626892
commit
027f594d02
3 changed files with 33 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Sep 2 16:42:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* NSWorkspace.m: Trivial fix to pass app when opening files.
|
||||
* GSServicesManager.m: Fix to send open commands to app delegate
|
||||
rather than to application object itsself.
|
||||
|
||||
Thu Sep 2 12:50:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* NSWorkspace.m: Fixes for locating icons in application resources.
|
||||
|
|
|
@ -81,6 +81,8 @@
|
|||
openFileWithoutUI: (NSString*)file;
|
||||
- (BOOL) application: (NSApplication*)theApp
|
||||
openTempFile: (NSString*)file;
|
||||
- (BOOL) application: (NSApplication*)theApp
|
||||
printFile: (NSString*)file;
|
||||
- (void) performService: (NSString*)name
|
||||
withPasteboard: (NSPasteboard*)pb
|
||||
userData: (NSString*)ud
|
||||
|
@ -232,25 +234,41 @@ NSRegisterServicesProvider(id provider, NSString *name)
|
|||
- (BOOL) application: (NSApplication*)theApp
|
||||
openFile: (NSString*)file
|
||||
{
|
||||
NSApplication *app = [NSApplication sharedApplication];
|
||||
id del = [NSApp delegate];
|
||||
|
||||
return [app application: theApp openFile: file];
|
||||
if ([del respondsToSelector: _cmd])
|
||||
return [del application: theApp openFile: file];
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) application: (NSApplication*)theApp
|
||||
openFileWithoutUI: (NSString*)file
|
||||
{
|
||||
NSApplication *app = [NSApplication sharedApplication];
|
||||
id del = [NSApp delegate];
|
||||
|
||||
return [app application: theApp openFileWithoutUI: file];
|
||||
if ([del respondsToSelector: _cmd])
|
||||
return [del application: theApp openFileWithoutUI: file];
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) application: (NSApplication*)theApp
|
||||
openTempFile: (NSString*)file
|
||||
{
|
||||
NSApplication *app = [NSApplication sharedApplication];
|
||||
id del = [NSApp delegate];
|
||||
|
||||
return [app application: theApp openTempFile: file];
|
||||
if ([del respondsToSelector: _cmd])
|
||||
return [del application: theApp openTempFile: file];
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) application: (NSApplication*)theApp
|
||||
printFile: (NSString*)file
|
||||
{
|
||||
id del = [NSApp delegate];
|
||||
|
||||
if ([del respondsToSelector: _cmd])
|
||||
return [del application: theApp openFile: file];
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) performService: (NSString*)name
|
||||
|
|
|
@ -521,7 +521,7 @@ extIconForApp(NSWorkspace *ws, NSString *appName, NSDictionary *typeInfo)
|
|||
andDeactivate: (BOOL)flag
|
||||
{
|
||||
NSString *port = [appName stringByDeletingPathExtension];
|
||||
id app;
|
||||
id app = nil;
|
||||
|
||||
/*
|
||||
* Try to contact a running application.
|
||||
|
@ -567,9 +567,9 @@ extIconForApp(NSWorkspace *ws, NSString *appName, NSDictionary *typeInfo)
|
|||
NS_DURING
|
||||
{
|
||||
if (flag == NO)
|
||||
[app application: nil openFileWithoutUI: fullPath];
|
||||
[app application: NSApp openFileWithoutUI: fullPath];
|
||||
else
|
||||
[app application: nil openFile: fullPath];
|
||||
[app application: NSApp openFile: fullPath];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue