summaryrefslogtreecommitdiff
path: root/browser/base/content/sanitize.xul
blob: c00c6cda766e33a35ea26452b39982f2bea0f565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<?xml version="1.0"?>

# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/sanitizeDialog.css"?>

#ifdef CRH_DIALOG_TREE_VIEW
<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
#endif

<?xml-stylesheet href="chrome://browser/content/sanitizeDialog.css"?>

<!DOCTYPE prefwindow [
  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
  <!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
  %brandDTD;
  %sanitizeDTD;
]>

<prefwindow id="SanitizeDialog" type="child"
            xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
            dlgbuttons="accept,cancel"
            title="&sanitizeDialog2.title;"
            noneverythingtitle="&sanitizeDialog2.title;"
            style="width: &sanitizeDialog2.width;;"
            ondialogaccept="return gSanitizePromptDialog.sanitize();">

  <prefpane id="SanitizeDialogPane" onpaneload="gSanitizePromptDialog.init();">
    <stringbundle id="bundleBrowser"
                  src="chrome://browser/locale/browser.properties"/>

    <script type="application/javascript"
            src="chrome://browser/content/sanitize.js"/>

#ifdef CRH_DIALOG_TREE_VIEW
    <script type="application/javascript"
            src="chrome://global/content/globalOverlay.js"/>
    <script type="application/javascript"
            src="chrome://browser/content/places/treeView.js"/>
    <script type="application/javascript"><![CDATA[
      Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
      Components.utils.import("resource:///modules/PlacesUIUtils.jsm");
    ]]></script>
#endif

    <script type="application/javascript"
            src="chrome://browser/content/sanitizeDialog.js"/>

    <preferences id="sanitizePreferences">
      <preference id="privacy.cpd.history"               name="privacy.cpd.history"               type="bool"/>
      <preference id="privacy.cpd.formdata"              name="privacy.cpd.formdata"              type="bool"/>
      <preference id="privacy.cpd.downloads"             name="privacy.cpd.downloads"             type="bool" disabled="true"/>
      <preference id="privacy.cpd.cookies"               name="privacy.cpd.cookies"               type="bool"/>
      <preference id="privacy.cpd.cache"                 name="privacy.cpd.cache"                 type="bool"/>
      <preference id="privacy.cpd.sessions"              name="privacy.cpd.sessions"              type="bool"/>
      <preference id="privacy.cpd.offlineApps"           name="privacy.cpd.offlineApps"           type="bool"/>
      <preference id="privacy.cpd.siteSettings"          name="privacy.cpd.siteSettings"          type="bool"/>
    </preferences>
    
    <preferences id="nonItemPreferences">
      <preference id="privacy.sanitize.timeSpan"
                  name="privacy.sanitize.timeSpan"
                  type="int"/>
    </preferences>

    <hbox id="SanitizeDurationBox" align="center">
      <label value="&clearTimeDuration.label;"
             accesskey="&clearTimeDuration.accesskey;"
             control="sanitizeDurationChoice"
             id="sanitizeDurationLabel"/>
      <menulist id="sanitizeDurationChoice"
                preference="privacy.sanitize.timeSpan"
                onselect="gSanitizePromptDialog.selectByTimespan();"
                flex="1">
        <menupopup id="sanitizeDurationPopup">
#ifdef CRH_DIALOG_TREE_VIEW
          <menuitem label="" value="-1" id="sanitizeDurationCustom"/>
#endif
          <menuitem label="&clearTimeDuration.lastHour;" value="1"/>
          <menuitem label="&clearTimeDuration.last2Hours;" value="2"/>
          <menuitem label="&clearTimeDuration.last4Hours;" value="3"/>
          <menuitem label="&clearTimeDuration.today;" value="4"/>
          <menuseparator/>
          <menuitem label="&clearTimeDuration.everything;" value="0"/>
        </menupopup>
      </menulist>
      <label id="sanitizeDurationSuffixLabel"
             value="&clearTimeDuration.suffix;"/>
    </hbox>

    <separator class="thin"/>

#ifdef CRH_DIALOG_TREE_VIEW
    <deck id="durationDeck">
      <tree id="placesTree" flex="1" hidecolumnpicker="true" rows="10"
            disabled="true" disableKeyNavigation="true">
        <treecols>
          <treecol id="date" label="&clearTimeDuration.dateColumn;" flex="1"/>
          <splitter class="tree-splitter"/>
          <treecol id="title" label="&clearTimeDuration.nameColumn;" flex="5"/>
        </treecols>
        <treechildren id="placesTreechildren"
                      ondragstart="gSanitizePromptDialog.grippyMoved('ondragstart', event);"
                      ondragover="gSanitizePromptDialog.grippyMoved('ondragover', event);"
                      onkeypress="gSanitizePromptDialog.grippyMoved('onkeypress', event);"
                      onmousedown="gSanitizePromptDialog.grippyMoved('onmousedown', event);"/>
      </tree>
#endif

      <vbox id="sanitizeEverythingWarningBox">
        <spacer flex="1"/>
        <hbox align="center">
          <image id="sanitizeEverythingWarningIcon"/>
          <vbox id="sanitizeEverythingWarningDescBox" flex="1">
            <description id="sanitizeEverythingWarning"/>
            <description id="sanitizeEverythingUndoWarning">&sanitizeEverythingUndoWarning;</description>
          </vbox>
        </hbox>
        <spacer flex="1"/>
      </vbox>

#ifdef CRH_DIALOG_TREE_VIEW
    </deck>
#endif

    <separator class="thin"/>

    <hbox id="detailsExpanderWrapper" align="center">
      <button type="image"
              id="detailsExpander"
              class="expander-down"
              persist="class"
              oncommand="gSanitizePromptDialog.toggleItemList();"/>
      <label id="detailsExpanderLabel"
             value="&detailsProgressiveDisclosure.label;"
             accesskey="&detailsProgressiveDisclosure.accesskey;"
             control="detailsExpander"/>
    </hbox>
    <listbox id="itemList" rows="7" collapsed="true" persist="collapsed">
      <listitem label="&itemHistoryAndDownloads.label;"
                type="checkbox"
                accesskey="&itemHistoryAndDownloads.accesskey;"
                preference="privacy.cpd.history"
                onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
      <listitem label="&itemFormSearchHistory.label;"
                type="checkbox"
                accesskey="&itemFormSearchHistory.accesskey;"
                preference="privacy.cpd.formdata"
                onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
      <listitem label="&itemCookies.label;"
                type="checkbox"
                accesskey="&itemCookies.accesskey;"
                preference="privacy.cpd.cookies"
                onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
      <listitem label="&itemCache.label;"
                type="checkbox"
                accesskey="&itemCache.accesskey;"
                preference="privacy.cpd.cache"
                onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
      <listitem label="&itemActiveLogins.label;"
                type="checkbox"
                accesskey="&itemActiveLogins.accesskey;"
                preference="privacy.cpd.sessions"
                onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
      <listitem label="&itemOfflineApps.label;"
                type="checkbox"
                accesskey="&itemOfflineApps.accesskey;"
                preference="privacy.cpd.offlineApps"
                onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
      <listitem label="&itemSitePreferences.label;"
                type="checkbox"
                accesskey="&itemSitePreferences.accesskey;"
                preference="privacy.cpd.siteSettings"
                noduration="true"
                onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
    </listbox>

  </prefpane>
</prefwindow>