Changeset 67

Show
Ignore:
Timestamp:
07/21/08 21:31:08 (1 month ago)
Author:
bi..@lilyapp.org
Message:

fix bug #21

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lily/lily/chrome/content/externals/patcher.js

    r62 r67  
    6161        var tmpOut=[]; 
    6262         
     63        this.setInspectorConfig([ 
     64                {name:"fPath",value:thisPtr.fPath,label:"Patch Path",type:"string",input:"file"} 
     65        ]); 
     66         
     67        //save the values returned by the inspector- returned in form {valueName:value...} 
     68        //called after the inspector window is saved 
     69        this.saveInspectorValues=function(vals) { 
     70                 
     71                var oldpath = thisPtr.fPath; //save the path first 
     72                 
     73                //update the local properties 
     74                for(var x in vals) 
     75                        thisPtr[x]=vals[x]; 
     76                         
     77                //update the arg str 
     78                this.args=LilyUtils.quoteString(vals["fPath"]); 
     79                 
     80                if((thisPtr.fPath&&oldpath!=thisPtr.fPath)) 
     81                        reloadPatch(); //reload the patch if the path or args has changed. 
     82                         
     83        }        
     84         
    6385        //replace placeholders with args 
    6486        function replacePatchArgs(arg_str,data) { 
     
    89111                if(thisPtr.fPath) { 
    90112                                         
    91                         var filepath = LilyUtils.getFilePath(thisPtr.fPath); 
     113                        var filepath = LilyUtils.getFilePath(thisPtr.fPath.replace(/file:\/\//,"")); 
    92114 
    93115                        if(!filepath) { //bail if the path isn't correct