mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 00:41:31 +00:00
Depend on NSTask and NSBundle
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4081 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f77ae12819
commit
fa35a55ba7
3 changed files with 26 additions and 74 deletions
|
@ -46,11 +46,11 @@
|
|||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <Foundation/NSMethodSignature.h>
|
||||
#include <Foundation/NSRunLoop.h>
|
||||
#include <Foundation/NSTask.h>
|
||||
#include <Foundation/NSTimer.h>
|
||||
|
||||
#define stringify_it(X) #X
|
||||
#define prog_path(X,Y) \
|
||||
stringify_it(X) "/Tools/" GNUSTEP_TARGET_DIR "/" LIBRARY_COMBO Y
|
||||
#define prog_path(X) stringify_it(X) "/Tools/gpbs"
|
||||
|
||||
@interface NSPasteboard (Private)
|
||||
+ (id<PasteboardServer>) _pbs;
|
||||
|
@ -127,15 +127,17 @@ static id<PasteboardServer> the_server = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
||||
NSDate *next;
|
||||
static NSString *cmd = nil;
|
||||
|
||||
system(prog_path(GNUSTEP_INSTALL_PREFIX, "/gpbs &"));
|
||||
if (cmd == nil)
|
||||
cmd = [NSString stringWithCString:
|
||||
prog_path(GNUSTEP_INSTALL_PREFIX)];
|
||||
[NSTask launchedTaskWithLaunchPath: cmd arguments: nil];
|
||||
[NSTimer scheduledTimerWithTimeInterval: 5.0
|
||||
invocation: nil
|
||||
repeats: NO];
|
||||
next = [NSDate dateWithTimeIntervalSinceNow: 5.0];
|
||||
[loop runUntilDate: next];
|
||||
[[NSRunLoop currentRunLoop] runUntilDate:
|
||||
[NSDate dateWithTimeIntervalSinceNow: 5.0]];
|
||||
recursion = YES;
|
||||
[self _pbs];
|
||||
recursion = NO;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue