home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / AIMP2 / aimp_2.61.583.exe / $TEMP / YandexPackSetup.msi / filCB7837797D7CBDE537C27D83A5D97829 < prev    next >
Extensible Markup Language  |  2010-07-12  |  4KB  |  84 lines

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://yasearch/skin/first-start/wizard.css" type="text/css"?>
  3. <!DOCTYPE wizard [
  4. <!ENTITY % yaBrandDTD SYSTEM "chrome://yasearch/locale/yasearch.dtd">
  5. %yaBrandDTD;
  6. <!ENTITY % yaFirstStartDTD SYSTEM "chrome://yasearch/locale/first-start/wizard.dtd">
  7. %yaFirstStartDTD;
  8. ]>
  9. <wizard id="yasearch-first-start-wizard"
  10.         windowtype="Yasearch:FirstStartDialog"
  11.         onwizardfinish="return window.YaWizard.onFinish();"
  12.         title="&yasearch.bar.title;"
  13.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  14.         xmlns:html="http://www.w3.org/1999/xhtml">
  15.   
  16.   <script type="application/x-javascript"><![CDATA[
  17.     window.YaWizard = {
  18.       nsIYa: Components.classes["@yandex.ru/yasearch;1"]
  19.                        .getService(Components.interfaces.nsIYaSearch)
  20.                        .wrappedJSObject,
  21.  
  22.       onPageShow: function() {
  23.         if (this.nsIYa.getBoolPref("yasearch.license.hidden")) {
  24.           this.nsIYa.setBoolPref("yasearch.license.accepted", true);
  25.           document.getElementById("yasearch-first-start-license-checkbox").checked = true;
  26.           document.documentElement.setAttribute("yaHiddenLicense", "true");
  27.         }
  28.         
  29.         if (this.nsIYa.getBoolPref("yasearch.license.homepage.checked") === false)
  30.           document.getElementById("yasearch-first-start-default-homepage").checked = false;
  31.         
  32.         if (this.nsIYa.getBoolPref("yasearch.license.search.checked") === false)
  33.           document.getElementById("yasearch-first-start-default-search").checked = false;
  34.         
  35.         document.documentElement.getButton("finish").disabled = !document.getElementById("yasearch-first-start-license-checkbox").checked;
  36.       },
  37.  
  38.       onFinish: function() {
  39.         try {
  40.           this.nsIYa.setBoolPref("yasearch.license.accepted",
  41.                                  document.getElementById("yasearch-first-start-license-checkbox").checked);
  42.  
  43.           if (document.getElementById("yasearch-first-start-default-homepage").checked) {
  44.             this.nsIYa.setHomePageUrl(false);
  45.             this.nsIYa.setBoolPref("yasearch.defence.homepage.enabled", true);
  46.           } else {
  47.             this.nsIYa.setBoolPref("yasearch.defence.homepage.enabled", false);
  48.           }
  49.  
  50.           this.nsIYa.setBoolPref("yasearch.default.search",
  51.                                  document.getElementById("yasearch-first-start-default-search").checked);
  52.  
  53.           if (document.getElementById("yasearch-first-start-default-search").checked) {
  54.             this.nsIYa.checkKeywordURL = "set";
  55.             this.nsIYa.setBoolPref("yasearch.general.searchplugin.check", true);
  56.           }
  57.         } catch(e) {}
  58.  
  59.         return true;
  60.       }
  61.     };
  62.   ]]></script>
  63.   
  64.   <wizardpage pageid="yasearch-first-start-license" onpageshow="window.YaWizard.onPageShow()"
  65.               label="&yasearch.first.start.setup.done.label;" description="&yasearch.first.start.license.read.desc;">
  66.     
  67.     <groupbox flex="1" id="licenseGroupbox">
  68.       <vbox flex="1" id="licenseFrame">
  69.         <html:object flex="1" data="chrome://yasearch/locale/first-start/license.xhtml"></html:object>
  70.       </vbox>
  71.       
  72.       <checkbox id="yasearch-first-start-license-checkbox" label="&yasearch.first.start.license.agree.label;"
  73.                 oncommand="document.documentElement.getButton('finish').disabled = !this.checked"/>
  74.     </groupbox>
  75.     
  76.     <groupbox>
  77.       <checkbox id="yasearch-first-start-default-homepage" label="&yasearch.first.start.default.homepage.label;"
  78.                 checked="true"/>
  79.       <checkbox id="yasearch-first-start-default-search" label="&yasearch.first.start.default.search.label;"
  80.                 checked="true"/>
  81.     </groupbox>
  82.   </wizardpage>
  83. </wizard>
  84.