gExtensionsViewController.onCommandUpdate(); 
gExtensionsViewController.onCommandUpdate(); 
function Startup(){  gExtensionStrings = document.getElementById("extensionsStrings");  gPref = Components.classes["@mozilla.org/preferences-service;1"]                    .getService(Components.interfaces.nsIPrefBranch);  var defaultPref = gPref.QueryInterface(Components.interfaces.nsIPrefService)                         .getDefaultBranch(null);  try {    gCurrentTheme = gPref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);    gDefaultTheme = defaultPref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);  }  catch (e) { }  gExtensionsView = document.getElementById("extensionsView");  gExtensionManager = Components.classes["@mozilla.org/extensions/manager;1"]                                .getService(nsIExtensionManager);  var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]                          .getService(Components.interfaces.nsIXULAppInfo)                          .QueryInterface(Components.interfaces.nsIXULRuntime);  gInSafeMode = appInfo.inSafeMode;  gAppID = appInfo.ID;  try {    gCheckCompat = gPref.getBoolPref(PREF_EM_CHECK_COMPATIBILITY);  } catch(e) { }  // Sort on startup and anytime an add-on is installed or upgraded.  gExtensionManager.sortTypeByProperty(nsIUpdateItem.TYPE_ADDON, "name", true);  // Extension Command Updating is handled by a command controller.  gExtensionsView.controllers.appendController(gExtensionsViewController);  gExtensionsView.addEventListener("select", onAddonSelect, false);  initPluginsDS();  gExtensionsView.database.AddDataSource(gPluginsDS);  gExtensionsView.database.AddDataSource(gExtensionManager.datasource);  gExtensionsView.setAttribute("ref", RDFURI_ITEM_ROOT);  updateOptionalViews();  var viewGroup = document.getElementById("viewGroup");  gExtensionsView.focus();  gExtensionsViewController.onCommandUpdate();   // Now look and see if we're being opened by XPInstall  gDownloadManager = new XPInstallDownloadManager();  var os = Components.classes["@mozilla.org/observer-service;1"]                     .getService(Components.interfaces.nsIObserverService);  os.addObserver(gDownloadManager, "xpinstall-download-started", false);  os.addObserver(gAddonsMsgObserver, "addons-message-notification", false);  gObserverIndex = gExtensionManager.addUpdateListener(gDownloadManager);  if (!gCheckCompat) {    var msgText = getExtensionString("disabledCompatMsg");    var buttonLabel = getExtensionString("enableButtonLabel");    var buttonAccesskey = getExtensionString("enableButtonAccesskey");    var notifyData = "addons-enable-compatibility";    showMessage("chrome://mozapps/skin/extensions/question.png",                msgText, buttonLabel, buttonAccesskey,                true, notifyData);  }  if (gInSafeMode) {    showMessage("chrome://mozapps/skin/extensions/question.png",                getExtensionString("safeModeMsg"),                null, null, true, null);  }  if ("arguments" in window) {    try {      var params = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock);      showView("installs");      gDownloadManager.addDownloads(params);    }    catch (e) {      if (window.arguments[0] == "updates-only") {        gUpdatesOnly = true;#ifdef MOZ_PHOENIX        // If we are Firefox when updating on startup don't display context        // menuitems that can open a browser window.        gUpdateContextMenus = gUpdateContextMenusNoBrowser;#endif        document.getElementById("viewGroup").hidden = true;        document.getElementById("extensionsView").setAttribute("norestart", "");        showView("updates");        showMessage("chrome://mozapps/skin/extensions/question.png",                    getExtensionString("newUpdatesAvailableMsg"),                    null, null, true, null);        document.title = getExtensionString("newUpdateWindowTitle", [getBrandShortName()]);      }    }  }  else if (viewGroup.hasAttribute("last-selected") &&           !document.getElementById(viewGroup.getAttribute("last-selected") + "-view").hidden)    showView(viewGroup.getAttribute("last-selected"));  else    showView("extensions");  if (gExtensionsView.selectedItem)    gExtensionsView.scrollBoxObject.scrollToElement(gExtensionsView.selectedItem);  gPref.setBoolPref(PREF_UPDATE_NOTIFYUSER, false);  if (gUpdatesOnly && gExtensionsView.children.length == 0)    window.close();}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/dd0789ea577a496e2622a164a469a9cb1bcf058d/extensions.js/clean/toolkit/mozapps/extensions/content/extensions.js