rem: handlerInfo.possibleApplicationHandlers.appendElement(handlerApp, false); 
add: handlerInfo.addPossibleApplicationHandler(handlerApp); 
context:   chooseApp: function(aEvent) {    // Don't let the normal "on select action" handler get this event,    // as we handle it specially ourselves.    aEvent.stopPropagation();    var handlerApp;#ifdef XP_WIN    var params = {};    var handlerInfo = this._handledTypes[this._list.selectedItem.type];    if (handlerInfo.type == TYPE_MAYBE_FEED) {      // MIME info will be null, create a temp object.      params.mimeInfo = this._mimeSvc.getFromTypeAndExtension(handlerInfo.type,                                                  handlerInfo.primaryExtension);    } else {      params.mimeInfo = handlerInfo.wrappedHandlerInfo;    }    params.title         = this._prefsBundle.getString("fpTitleChooseApp");    params.description   = handlerInfo.description;    params.filename      = null;    params.handlerApp    = null;    window.openDialog("chrome://global/content/appPicker.xul", null,                      "chrome,modal,centerscreen,titlebar,dialog=yes",                      params);    if (params.handlerApp &&         params.handlerApp.executable &&         params.handlerApp.executable.isFile()) {      handlerApp = params.handlerApp;      // Add the app to the type's list of possible handlers.      handlerInfo.possibleApplicationHandlers.appendElement(handlerApp, false);    }#else    var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);    var winTitle = this._prefsBundle.getString("fpTitleChooseApp");    fp.init(window, winTitle, Ci.nsIFilePicker.modeOpen);    fp.appendFilters(Ci.nsIFilePicker.filterApps);    // Prompt the user to pick an app.  If they pick one, and it's a valid    // selection, then add it to the list of possible handlers.    if (fp.show() == Ci.nsIFilePicker.returnOK && fp.file &&        this._isValidHandlerExecutable(fp.file)) {      handlerApp = Cc["@mozilla.org/uriloader/local-handler-app;1"].                   createInstance(Ci.nsILocalHandlerApp);      handlerApp.name = getDisplayNameForFile(fp.file);      handlerApp.executable = fp.file;      // Add the app to the type's list of possible handlers.      let handlerInfo = this._handledTypes[this._list.selectedItem.type];      handlerInfo.possibleApplicationHandlers.appendElement(handlerApp, false);    }#endif    // Rebuild the actions menu whether the user picked an app or canceled.    // If they picked an app, we want to add the app to the menu and select it.    // If they canceled, we want to go back to their previous selection.    this.rebuildActionsMenu();    // If the user picked a new app from the menu, select it.    if (handlerApp) {      let typeItem = this._list.selectedItem;      let actionsMenu =        document.getAnonymousElementByAttribute(typeItem, "class", "actionsMenu");      let menuItems = actionsMenu.menupopup.childNodes;      for (let i = 0; i < menuItems.length; i++) {        let menuItem = menuItems[i];        if (menuItem.handlerApp && menuItem.handlerApp.equals(handlerApp)) {          actionsMenu.selectedIndex = i;          this.onSelectAction(menuItem);          break;        }      }    }  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/87a48649d8a316049ca8ba876b9b9b248ec037d5/applications.js/clean/browser/components/preferences/applications.js