mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Implemented extension methods for NSURL.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11509 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7ebc8a71ba
commit
a10f888c84
1 changed files with 15 additions and 0 deletions
|
@ -870,6 +870,21 @@ static NSMapTable *mimeMap = NULL;
|
|||
|
||||
@end
|
||||
|
||||
@implementation NSURL (NSPasteboard)
|
||||
+ (NSURL *) URLFromPasteboard: (NSPasteboard *)pasteBoard
|
||||
{
|
||||
return [self URLWithString: [pasteBoard stringForType: NSURLPboardType]];
|
||||
}
|
||||
|
||||
- (void) writeToPasteboard: (NSPasteboard *)pasteBoard
|
||||
{
|
||||
[pasteBoard setString: [self absoluteString]
|
||||
forType: NSURLPboardType];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
static NSString* contentsPrefix = @"NSTypedFileContentsPboardType:";
|
||||
static NSString* namePrefix = @"NSTypedFilenamesPboardType:";
|
||||
|
||||
|
|
Loading…
Reference in a new issue