rem: var commonDialogService = nsJSComponentManager.getService("component: "nsICommonDialogs"); var block = nsJSComponentManager.createInstanceByID("c01ad085-4915-11d3-b7a0-85cf-55c3523c", "nsIDialogParamBlock"); var checkValue = { value: true }; var pressedVal = { }; var promptTitle = bundle.GetStringFromName("droponhometitle"); var promptMsg   = bundle.GetStringFromName("droponhomemsg"); var checkMsg    = bundle.GetStringFromName("dontremindme"); var okButton    = bundle.GetStringFromName("droponhomeokbutton"); var iconURL     = "chrome: /* block.SetInt(2, 2); block.SetString(0, bundle.GetStringFromName("droponhomemsg")); block.SetString(3, bundle.GetStringFromName("droponhometitle")); block.SetString(2, "chrome: block.SetString(1, bundle.GetStringFromName("dontremindme")); block.SetInt(1, 1); block.SetString(8, bundle.GetStringFromName("droponhomeokbutton"));  */ commonDialogService.UniversalDialog(window, null, promptTitle, promptMsg, checkMsg, okButton, null, null, null, null, null, { }, { }, iconURL, checkValue, 2, 0, null, pressedVal); nsPreferences.setBoolPref("browser.homepage.enable_home_button_drop", checkValue.value);  setHomepage = pressedVal.value == 0 ? true : false; 
add: dump("*** element = " + element + "\n");  var potentialTitle = null; var historyDS = gRDFService.GetDataSource("rdf:history"); var historyEntry = gRDFService.GetResource(element); var historyTitleProperty = gRDFService.GetResource(NC_RDF("URL")); var titleFromHistory = historyDS.GetTarget(historyEntry, historyTitleProperty, true); if (titleFromHistory)  if (titleFromHistory) potentialTitle = titleFromHistory.Value; linkTitle = potentialTitle ? potentialTitle : element; childDB.Assert(gRDFService.GetResource(element, true), gRDFService.GetResource(NC_RDF("Name"), true), gRDFService.GetLiteral(linkTitle), true); 
context:   onDrop: function (aEvent, aData)    {      var aData = aData.length ? aData[0] : aData;      var url = retrieveURLFromData(aData);      var showDialog = nsPreferences.getBoolPref("browser.homepage.enable_home_button_drop", false);      var setHomepage;      if (showDialog)        {          var commonDialogService = nsJSComponentManager.getService("component://netscape/appshell/commonDialogs",                                                                    "nsICommonDialogs");          var block = nsJSComponentManager.createInstanceByID("c01ad085-4915-11d3-b7a0-85cf-55c3523c",                                                              "nsIDialogParamBlock");          var checkValue = { value: true };          var pressedVal = { };                                      var promptTitle = bundle.GetStringFromName("droponhometitle");          var promptMsg   = bundle.GetStringFromName("droponhomemsg");          var checkMsg    = bundle.GetStringFromName("dontremindme");          var okButton    = bundle.GetStringFromName("droponhomeokbutton");          var iconURL     = "chrome://navigator/skin/home.gif"; // evil evil common dialog code! evil! /*          block.SetInt(2, 2);          block.SetString(0, bundle.GetStringFromName("droponhomemsg"));          block.SetString(3, bundle.GetStringFromName("droponhometitle"));          block.SetString(2, "chrome://navigator/skin/home.gif");          block.SetString(1, bundle.GetStringFromName("dontremindme"));          block.SetInt(1, 1); // checkbox is checked          block.SetString(8, bundle.GetStringFromName("droponhomeokbutton"));          */          commonDialogService.UniversalDialog(window, null, promptTitle, promptMsg, checkMsg,                                               okButton, null, null, null, null, null, { }, { },                                              iconURL, checkValue, 2, 0, null, pressedVal);          nsPreferences.setBoolPref("browser.homepage.enable_home_button_drop", checkValue.value);          setHomepage = pressedVal.value == 0 ? true : false;        }      else        setHomepage = true;      if (setHomepage)         {          nsPreferences.setUnicharPref("browser.startup.homepage", url);                                                     setTooltipText("homebutton", url);        }    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/fe6445db5da16831e53796af2d6439822296290c/navigatorDD.js/clean/suite/browser/navigatorDD.js