Ignore:
Timestamp:
10/01/06 16:31:59 (6 years ago)
Author:
sys
Message:

Passage de reveal/launch local file dans la lib ut + appels viewObject GetFilePath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_videoPrim/mainview.xul

    r6729 r6739  
    5858                } 
    5959                function edit(){ 
    60                         var vFilePath = vUriObjectMainStream.getServer().getTextFromService("/u/vueObjet?cdaction=GetItemDef&param="+window.encodeURIComponent(vUriObjectMainStream.fUri)+"&format=filePath"); 
    61                         if(vFilePath) { 
    62                                 try { 
    63                                         var vFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); 
    64                                         vFile.initWithPath(vFilePath); 
    65                                         try { // ######## SAM 17/02/06 unix support (from the firefox 1.5 chrome) 
    66                                                 vFile.launch(); 
    67                                         } catch(e){ 
    68                                                 // if nsILocalFile::Launch failed (eg it currently just returns an 
    69                                                 // error on unix), just open the file in a browser window 
    70                                                 var vUri = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newFileURI(vFile); 
    71                                                 var vProtocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].getService(Components.interfaces.nsIExternalProtocolService); 
    72                                                 vProtocolSvc.loadUrl(vUri); 
    73                                         } 
    74                                 } catch(e){ut.debug("edit : "+e)} 
    75                         } 
     60                        var vFilePath = vUriObjectMainStream.getServer().getTextFromService("/u/vueObjet?cdaction=GetFilePath&param="+window.encodeURIComponent(vUriObjectMainStream.fUri)); 
     61                        if(vFilePath) ut.openExternalLocalFile(vFilePath, false); 
    7662                } 
    7763                function upload(){ 
Note: See TracChangeset for help on using the changeset viewer.