Use NSWorkspace methods instead of Launch Services and Finder functions.
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 May 2002 18:55:51 +0000 (18:55 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 May 2002 18:55:51 +0000 (18:55 +0000)
        * MIME.subproj/IFDownloadHandler.h:
        * MIME.subproj/IFDownloadHandler.mm:
        * WebView.subproj/IFWebFrame.mm:
        (-[IFWebFrame setProvisionalDataSource:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@1238 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/ChangeLog-2002-12-03
WebKit/MIME.subproj/IFDownloadHandler.h
WebKit/MIME.subproj/IFDownloadHandler.mm
WebKit/WebView.subproj/IFWebFrame.mm
WebKit/WebView.subproj/WebFrame.m

index 8479d4bf5b7c544a6a0cf895f7279eeebc1db20c..137d7093cddfcc9c8ac72848812d26dfcaa54cb6 100644 (file)
@@ -1,3 +1,12 @@
+2002-05-30  Chris Blumenberg  <cblu@apple.com>
+
+       Use NSWorkspace methods instead of Launch Services and Finder functions.
+
+       * MIME.subproj/IFDownloadHandler.h:
+       * MIME.subproj/IFDownloadHandler.mm:
+       * WebView.subproj/IFWebFrame.mm:
+       (-[IFWebFrame setProvisionalDataSource:]):
+
 
 =======
 2002-05-30  Richard Williamson  <rjw@apple.com>
index 8479d4bf5b7c544a6a0cf895f7279eeebc1db20c..137d7093cddfcc9c8ac72848812d26dfcaa54cb6 100644 (file)
@@ -1,3 +1,12 @@
+2002-05-30  Chris Blumenberg  <cblu@apple.com>
+
+       Use NSWorkspace methods instead of Launch Services and Finder functions.
+
+       * MIME.subproj/IFDownloadHandler.h:
+       * MIME.subproj/IFDownloadHandler.mm:
+       * WebView.subproj/IFWebFrame.mm:
+       (-[IFWebFrame setProvisionalDataSource:]):
+
 
 =======
 2002-05-30  Richard Williamson  <rjw@apple.com>
index b8fa0c16c44780e6cfbd7a0039d74949b9d631d7..dba6d02d9c62ecf90adc224ca1e1491dacf8ba4d 100644 (file)
@@ -16,5 +16,4 @@
 - initWithDataSource:(IFWebDataSource *)dSource;
 - (void)downloadCompletedWithData:(NSData *)data;
 
-+ (void) launchURL:(NSURL *) url;
 @end
index 51add6774232998daf6250e64f298cea791954f7..03fd2578b842da2d186e42618c6ffcb1411d5b01 100644 (file)
@@ -28,7 +28,8 @@
 {
     NSString *path = [dataSource _downloadPath];
     NSFileManager *fileManager;
-       
+    NSWorkspace *workspace;
+    
     // FIXME: Should probably not replace existing file
     // FIXME: Should report error if there is one
     fileManager = [NSFileManager defaultManager];
     
     // Send Finder notification
     WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "Notifying Finder");
-    FNNotifyByPath((UInt8 *)[[path stringByDeletingLastPathComponent] UTF8String], kFNDirectoryModifiedMessage, kNilOptions);
+    workspace = [NSWorkspace sharedWorkspace];
+    [workspace noteFileSystemChanged:path];
     
     if([dataSource contentPolicy] == IFContentPolicyOpenExternally){
-        [[self class] launchURL:[NSURL fileURLWithPath:path]];
+        [workspace openFile:path];
     }
 }
 
-+ (void) launchURL:(NSURL *) url{
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD,"Launching: %s", [[url absoluteString] cString]);
-    LSOpenCFURLRef((CFURLRef)url, NULL);
-}
 
 @end
index 19b2109194d668c622baedde88f2beb0df982799..f426bad169e34197ff7d2478d1d3d89157228323 100644 (file)
     }
     
     else if(urlPolicy == IFURLPolicyOpenExternally){
-        [IFDownloadHandler launchURL:[newDataSource inputURL]];
+        return [[NSWorkspace sharedWorkspace] openURL:[newDataSource inputURL]];
     }
     
     // Do nothing in the IFURLPolicyIgnore case.
-    
-    //FIXME: When do we return NO?
+
     return YES;
 }
 
index 19b2109194d668c622baedde88f2beb0df982799..f426bad169e34197ff7d2478d1d3d89157228323 100644 (file)
     }
     
     else if(urlPolicy == IFURLPolicyOpenExternally){
-        [IFDownloadHandler launchURL:[newDataSource inputURL]];
+        return [[NSWorkspace sharedWorkspace] openURL:[newDataSource inputURL]];
     }
     
     // Do nothing in the IFURLPolicyIgnore case.
-    
-    //FIXME: When do we return NO?
+
     return YES;
 }