Changeset 18540 in webkit
- Timestamp:
- Jan 2, 2007 5:05:09 PM (17 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r18536 r18540 1 2007-01-02 John Sullivan <sullivan@apple.com> 2 3 Reviewed by Kevin Decker 4 5 - fixed <rdar://problem/4892525> Cannot open PDF in Preview if you attempted to 6 open it in Preview while PDF was loading 7 8 * WebView/WebPDFView.mm: 9 (-[WebPDFView menuForEvent:]): 10 added comment 11 (-[WebPDFView validateUserInterfaceItem:]): 12 disable this menu item when there's no document yet 13 (-[WebPDFView _openWithFinder:]): 14 If this is invoked when there is no document yet (e.g. via the PDFKit delegate method), 15 just beep and return. I should make a nice error message here, but I'll do that separately. 16 1 17 2007-01-03 Nikolas Zimmermann <zimmermann@kde.org> 2 18 -
trunk/WebKit/WebView/WebPDFView.mm
r17597 r18540 336 336 appName = UI_STRING("Finder", "Default application name for Open With context menu"); 337 337 338 // To match the PDFKit style, we'll add Open with Preview even when there's no document yet to view, and 339 // disable it using validateUserInterfaceItem. 338 340 NSString *title = [NSString stringWithFormat:UI_STRING("Open with %@", "context menu item for PDF"), appName]; 339 341 NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:title action:@selector(_openWithFinder:) keyEquivalent:@""]; … … 445 447 if (action == @selector(takeFindStringFromSelection:) || action == @selector(centerSelectionInVisibleArea:) || action == @selector(jumpToSelection:)) 446 448 return [PDFSubview currentSelection] != nil; 449 450 if (action == @selector(_openWithFinder:)) 451 return [PDFSubview document] != nil; 447 452 448 453 return YES; … … 1001 1006 - (void)_openWithFinder:(id)sender 1002 1007 { 1008 // We don't want to write the file until we have a document to write (see 4892525). 1009 if (![PDFSubview document]) { 1010 NSBeep(); 1011 return; 1012 } 1013 1003 1014 NSString *opath = [self _path]; 1004 1015
Note: See TracChangeset
for help on using the changeset viewer.