show a badge when dragging url's

This commit is contained in:
Mitchell Livingston 2007-05-19 14:22:01 +00:00
parent 55c54b0961
commit a3b2d1aadd
3 changed files with 10 additions and 0 deletions

View File

@ -2111,6 +2111,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
}
else if ([[pasteboard types] containsObject: NSURLPboardType])
{
[fOverlayWindow setURL: [[NSURL URLFromPasteboard: pasteboard] relativeString]];
[fOverlayWindow setFrame: [fWindow frame] display: YES];
[fWindow addChildWindow: fOverlayWindow ordered: NSWindowAbove];

View File

@ -31,5 +31,6 @@
}
- (void) setFiles: (NSArray *) files;
- (void) setURL: (NSString *) url;
@end

View File

@ -102,4 +102,12 @@
[[self contentView] setOverlay: icon mainLine: name subLine: sizeString];
}
- (void) setURL: (NSString *) url
{
#warning get globe icon
NSImage * icon = nil;
[[self contentView] setOverlay: icon mainLine: NSLocalizedString(@"Web Address", "Drag overlay -> url") subLine: url];
}
@end