rem: #ifdef XP_MACOSX return aFolderType == "Desktop" ? "UsrDsk" : "UsrDocs"; 
context: function initAutoDownloadDisplay(){  var pref = Components.classes["@mozilla.org/preferences-service;1"]                       .getService(Components.interfaces.nsIPrefBranch);  var autodownload = pref.getBoolPref("browser.download.useDownloadDir");    if (autodownload) {    var autodownloadInfo = document.getElementById("autodownloadInfo");    autodownloadInfo.hidden = false;    var autodownloadSpring = document.getElementById("autodownloadSpring");    autodownloadSpring.hidden = true;     function getSpecialFolderKey(aFolderType)     {#ifdef XP_WIN      return aFolderType == "Desktop" ? "DeskP" : "Pers";#endif#ifdef XP_MACOSX      return aFolderType == "Desktop" ? "UsrDsk" : "UsrDocs";#endif#ifdef XP_OS2      return aFolderType == "Desktop" ? "Desk" : "Home";#endif#ifdef XP_BEOS      return aFolderType == "Desktop" ? "Desk" : "Home";#endif      return "Home";    }        function getDownloadsFolder(aFolder)    {      var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]                                  .getService(Components.interfaces.nsIProperties);      var dir = fileLocator.get(getSpecialFolderKey(aFolder), Components.interfaces.nsILocalFile);            var bundle = Components.classes["@mozilla.org/intl/stringbundle;1"]                              .getService(Components.interfaces.nsIStringBundleService);      bundle = bundle.createBundle("chrome://mozapps/locale/downloads/unknownContentType.properties");      var description = bundle.GetStringFromName("myDownloads");      if (aFolder != "Desktop")        dir.append(description);              return dir;    }    var displayName = null;    var folder;    switch (pref.getIntPref("browser.download.folderList")) {    case 0:      folder = getDownloadsFolder("Desktop");      displayName = document.getElementById("downloadStrings").getString("displayNameDesktop");      break;    case 1:      folder = getDownloadsFolder("Downloads");      break;    case 2:       folder = pref.getComplexValue("browser.download.dir", Components.interfaces.nsILocalFile);      break;    }    if (folder) {          var ioServ = Components.classes["@mozilla.org/network/io-service;1"]                              .getService(Components.interfaces.nsIIOService);      var fph = ioServ.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);      var mozIconURI = "moz-icon://" +  fph.getURLSpecFromFile(folder) + "?size=16";      var folderIcon = document.getElementById("saveToFolder")      folderIcon.image = mozIconURI;            var folderName = document.getElementById("saveToFolder");      folderName.label = displayName || folder.leafName;      folderName.setAttribute("path", folder.path);    }  }  else {    var autodownloadInfo = document.getElementById("autodownloadInfo");    autodownloadInfo.hidden = true;    var autodownloadSpring = document.getElementById("autodownloadSpring");    autodownloadSpring.hidden = false;   }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/72e478eaaa3739b71ad76d01ff10e4677e0cd140/downloads.js/clean/toolkit/mozapps/downloads/content/downloads.js