~nbjayme/+junk/cruxade

« back to all changes in this revision

Viewing changes to chrome/content/xbl/cruxadeOS.xbl

  • Committer: Nathaniel Jayme
  • Date: 2009-03-03 09:04:48 UTC
  • Revision ID: nbjayme@freefeathers.org-20090303090448-p63caxpiu8jq31w0
- execute an external process in cruxadeOS.xbl
- uibuilder function to not require a UI target for refresh
  if a function only wants to get a cluster's  xml structure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
                    }
106
106
                    return lv_aFixedCrumbs;
107
107
                 },
 
108
                 udf_bExecute:function(cExecFile,aArgs,bBlock){
 
109
                    if (cExecFile==null) return false;
 
110
                    if (cExecFile=="") return false;
 
111
                    cExecFile=this.udf_cFixPath(cExecFile);
 
112
                    var nCode=this.udf_nPathExistsAs(cExecFile);
 
113
                    if (nCode!=2) return false;
 
114
                    if (bBlock==null) bBlock=false;
 
115
                    var file = Components.classes["@mozilla.org/file/local;1"]
 
116
                          .createInstance(Components.interfaces.nsILocalFile);
 
117
                    file.initWithPath(cExecFile);
 
118
                    var process = Components.classes["@mozilla.org/process/util;1"]
 
119
                          .createInstance(Components.interfaces.nsIProcess);
 
120
                    process.init(file);
 
121
                    process.run(bBlock, aArgs, aArgs.length);
 
122
                    return true;
 
123
                 },
108
124
                 udf_nPathExistsAs:function(cPath){
109
125
                    cPath = this.udf_cFixPath(cPath);
110
126
                    var iTmpPath = Components.classes["@mozilla.org/file/local;1"]