From a92177e9f8e1c4d4fa8509a7fbf5e487953ee302 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Tue, 2 Sep 1997 09:45:22 +0000 Subject: [PATCH] Added code to use the NSHost key in NSUserDefaults to determine the name of the host whose pasteboard server is to be used. If there is no NSHost value set, the host on which the app is executing (as given by NSProcessInfo) is used. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2409 72102866-910b-0410-8b05-ffd578937521 --- Source/NSPasteboard.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/NSPasteboard.m b/Source/NSPasteboard.m index 0fd76761b..ace10ce20 100644 --- a/Source/NSPasteboard.m +++ b/Source/NSPasteboard.m @@ -39,6 +39,7 @@ #include #include #include +#include // Pasteboard Type Globals NSString *NSStringPboardType = @"NSStringPboardType"; @@ -110,8 +111,12 @@ static id the_server = nil; + (id) _pbs { if (the_server == nil) { - NSString* host = [[NSProcessInfo processInfo] hostName]; + NSString* host; + host = [[NSUserDefaults standardUserDefaults] stringForKey: @"NSHost"]; + if (host == nil) { + host = [[NSProcessInfo processInfo] hostName]; + } the_server = (id)[NSConnection rootProxyForConnectionWithRegisteredName: PBSNAME host: host];