зеркало из https://github.com/mozilla/pjs.git
Rest of tree-wide cleanup for bug 100212 - switch last consumers of nsIFile.URL r=dougt, sr=darin
This commit is contained in:
Родитель
d55d46d70a
Коммит
ff4a5ba2b4
|
@ -182,9 +182,8 @@
|
|||
if (fileLocator)
|
||||
fileLocator = fileLocator.QueryInterface(Components.interfaces.nsIProperties);
|
||||
var file = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);
|
||||
gDS = gRDF.GetDataSource(file.URL);
|
||||
if (gDS)
|
||||
gDS = gDS.QueryInterface(Components.interfaces.nsIRDFDataSource);
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
|
||||
gDS = gRDF.GetDataSource(ioService.getURLSpecFromFile(file));
|
||||
}
|
||||
|
||||
function onAccept()
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/* -*- Mode: Java; tab-width: 2; c-basic-offset: 2; -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
var gNewTypeRV = null;
|
||||
var gUpdateTypeRV = null;
|
||||
|
@ -65,13 +84,13 @@ function Startup()
|
|||
updateLockedButtonState(false);
|
||||
|
||||
const mimeTypes = "UMimTyp";
|
||||
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService();
|
||||
if (fileLocator)
|
||||
fileLocator = fileLocator.QueryInterface(Components.interfaces.nsIProperties);
|
||||
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);
|
||||
|
||||
var file = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);
|
||||
gDS = gRDF.GetDataSource(file.URL);
|
||||
if (gDS)
|
||||
gDS = gDS.QueryInterface(Components.interfaces.nsIRDFDataSource);
|
||||
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
|
||||
dump("spec is " + ioService.getURLSpecFromFile(file));
|
||||
gDS = gRDF.GetDataSource(ioService.getURLSpecFromFile(file));
|
||||
|
||||
// intialise the tree
|
||||
gTree.database.AddDataSource(gDS);
|
||||
|
|
Загрузка…
Ссылка в новой задаче