1 | <?xml version="1.0" encoding="UTF-8" ?> |
---|
2 | <!DOCTYPE overlay SYSTEM "chrome://markingcollection/locale/markingcollection.dtd"> |
---|
3 | <overlay |
---|
4 | id="generalDialogOverlay" |
---|
5 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
---|
6 | xmlns:html="http://www.w3.org/1999/xhtml"> |
---|
7 | <script type="application/x-javascript" src="chrome://global/content/nsUserSettings.js" /> |
---|
8 | <script type="application/x-javascript"> |
---|
9 | <![CDATA[ |
---|
10 | function _generalDialogOverlayInit(aEvent){ |
---|
11 | var selectimportimage = nsPreferences.copyUnicharPref("wiredmarker.selectimportimage","none"); |
---|
12 | switch(selectimportimage){ |
---|
13 | case "alt": |
---|
14 | document.getElementById("bitsSelectImportImageNone").removeAttribute("selected"); |
---|
15 | document.getElementById("bitsSelectImportImageAlt").setAttribute("selected","true"); |
---|
16 | document.getElementById("bitsSelectImportImageAltAndSubstitution").removeAttribute("selected"); |
---|
17 | document.getElementById("bitsSelectImportImageSubstitution").removeAttribute("selected"); |
---|
18 | document.getElementById("bitsSelectImportImageSubstitutionAndAlt").removeAttribute("selected"); |
---|
19 | break; |
---|
20 | case "alt_substitution": |
---|
21 | document.getElementById("bitsSelectImportImageNone").removeAttribute("selected"); |
---|
22 | document.getElementById("bitsSelectImportImageAlt").removeAttribute("selected"); |
---|
23 | document.getElementById("bitsSelectImportImageAltAndSubstitution").setAttribute("selected","true"); |
---|
24 | document.getElementById("bitsSelectImportImageSubstitution").removeAttribute("selected"); |
---|
25 | document.getElementById("bitsSelectImportImageSubstitutionAndAlt").removeAttribute("selected"); |
---|
26 | document.getElementById("bitsSubstitutionConfirm").removeAttribute("disabled"); |
---|
27 | break; |
---|
28 | case "substitution": |
---|
29 | document.getElementById("bitsSelectImportImageNone").removeAttribute("selected"); |
---|
30 | document.getElementById("bitsSelectImportImageAlt").removeAttribute("selected"); |
---|
31 | document.getElementById("bitsSelectImportImageAltAndSubstitution").removeAttribute("selected"); |
---|
32 | document.getElementById("bitsSelectImportImageSubstitution").setAttribute("selected","true"); |
---|
33 | document.getElementById("bitsSelectImportImageSubstitutionAndAlt").removeAttribute("selected"); |
---|
34 | document.getElementById("bitsSubstitutionConfirm").removeAttribute("disabled"); |
---|
35 | break; |
---|
36 | case "substitution_alt": |
---|
37 | document.getElementById("bitsSelectImportImageNone").removeAttribute("selected"); |
---|
38 | document.getElementById("bitsSelectImportImageAlt").removeAttribute("selected"); |
---|
39 | document.getElementById("bitsSelectImportImageAltAndSubstitution").removeAttribute("selected"); |
---|
40 | document.getElementById("bitsSelectImportImageSubstitution").removeAttribute("selected"); |
---|
41 | document.getElementById("bitsSelectImportImageSubstitutionAndAlt").setAttribute("selected","true"); |
---|
42 | document.getElementById("bitsSubstitutionConfirm").removeAttribute("disabled"); |
---|
43 | break; |
---|
44 | default: |
---|
45 | document.getElementById("bitsSelectImportImageNone").setAttribute("selected","true"); |
---|
46 | document.getElementById("bitsSelectImportImageAlt").removeAttribute("selected"); |
---|
47 | document.getElementById("bitsSelectImportImageAltAndSubstitution").removeAttribute("selected"); |
---|
48 | document.getElementById("bitsSelectImportImageSubstitution").removeAttribute("selected"); |
---|
49 | document.getElementById("bitsSelectImportImageSubstitutionAndAlt").removeAttribute("selected"); |
---|
50 | break; |
---|
51 | } |
---|
52 | |
---|
53 | var confirm = nsPreferences.getBoolPref("wiredmarker.substitution.confirm", true); |
---|
54 | document.getElementById("bitsSubstitutionConfirm").setAttribute("checked",confirm); |
---|
55 | } |
---|
56 | function _generalDialogOverlayDone(aEvent){ |
---|
57 | |
---|
58 | } |
---|
59 | function _SelectImportImageCommand(aEvent){ |
---|
60 | nsPreferences.setUnicharPref("wiredmarker.selectimportimage", aEvent.target.value); |
---|
61 | if(aEvent.target.value == "substitution" || aEvent.target.value == "substitution_alt" || aEvent.target.value == "alt_substitution"){ |
---|
62 | document.getElementById("bitsSubstitutionConfirm").removeAttribute("disabled"); |
---|
63 | }else{ |
---|
64 | document.getElementById("bitsSubstitutionConfirm").setAttribute("disabled","true"); |
---|
65 | } |
---|
66 | } |
---|
67 | function _SubstitutionConfirmCommand(aEvent){ |
---|
68 | nsPreferences.setBoolPref("wiredmarker.substitution.confirm", aEvent.target.checked); |
---|
69 | } |
---|
70 | window.addEventListener("load", _generalDialogOverlayInit, false); |
---|
71 | window.addEventListener("unload", _generalDialogOverlayDone, false); |
---|
72 | ]]> |
---|
73 | </script> |
---|
74 | <tabbox id="mcSettingTabbox"> |
---|
75 | <tabpanels id="mcSettingTabPanels"> |
---|
76 | <tabbox id="mcMenuTabbox"> |
---|
77 | <tabs id="mcMenuTabs"> |
---|
78 | <tab id="mcGeneralTab" label="&markingcollection.setting.imagecapture;" image="chrome://markingcollection/skin/image.png"/> |
---|
79 | </tabs> |
---|
80 | <tabpanels id="mcMenuTabPanels"> |
---|
81 | <tabpanel id="mcGeneralTabPanel" orient="vertical" flex="1"> |
---|
82 | <groupbox flex="1"> |
---|
83 | <caption label="&markingcollection.selectimportimage;" style="background-color:#fff;"/> |
---|
84 | <radiogroup id="" oncommand="_SelectImportImageCommand(event)"> |
---|
85 | <radio id="bitsSelectImportImageNone" value="none" label="&markingcollection.selectimportimage.none;"/> |
---|
86 | <radio id="bitsSelectImportImageAlt" value="alt" label="&markingcollection.selectimportimage.alt;"/> |
---|
87 | <radio id="bitsSelectImportImageAltAndSubstitution" value="alt_substitution" label="&markingcollection.selectimportimage.alt_substitution;"/> |
---|
88 | <radio id="bitsSelectImportImageSubstitution" value="substitution" label="&markingcollection.selectimportimage.substitution;"/> |
---|
89 | <radio id="bitsSelectImportImageSubstitutionAndAlt" value="substitution_alt" label="&markingcollection.selectimportimage.substitution_alt;"/> |
---|
90 | </radiogroup> |
---|
91 | <checkbox id="bitsSubstitutionConfirm" label="&markingcollection.substitutiontree.confirm;" checked="true" disabled="true" style="padding-left:1em;" oncommand="_SubstitutionConfirmCommand(event)"/> |
---|
92 | <groupbox flex="1" id="bitsSubstitutionTreeGroupBox"> |
---|
93 | <caption label="&markingcollection.substitutiontree.table;" style="background-color:#fff;"/> |
---|
94 | </groupbox> |
---|
95 | </groupbox> |
---|
96 | <groupbox id="mcMetaCaptureTabGroupBox"/> |
---|
97 | </tabpanel> |
---|
98 | </tabpanels> |
---|
99 | </tabbox> |
---|
100 | </tabpanels> |
---|
101 | </tabbox> |
---|
102 | </overlay> |
---|