Bug 1436568 - Make "clear your recent history" a button instead of a link. r=nhnt11

MozReview-Commit-ID: 1KDXu9OtmHm

--HG--
extra : rebase_source : 7046240e28ac035f839d80d88e50d7522d2cef5b
This commit is contained in:
Johann Hofmann 2018-02-19 23:02:33 +01:00
Родитель 9beab572d0
Коммит f2c5d2f4ff
4 изменённых файлов: 74 добавлений и 86 удалений

Просмотреть файл

@ -268,17 +268,11 @@ var gPrivacyPane = {
gPrivacyPane.updatePrivacyMicroControls(); gPrivacyPane.updatePrivacyMicroControls();
gPrivacyPane.updateAutostart(); gPrivacyPane.updateAutostart();
}); });
setEventListener("historyRememberClear", "click", function(event) { setEventListener("clearHistoryButton", "command", function() {
if (event.button == 0) { let historyMode = document.getElementById("historyMode");
gPrivacyPane.clearPrivateDataNow(false); // Select "everything" in the clear history dialog if the
} // user has set their history mode to never remember history.
return false; gPrivacyPane.clearPrivateDataNow(historyMode.value == "dontremember");
});
setEventListener("historyDontRememberClear", "click", function(event) {
if (event.button == 0) {
gPrivacyPane.clearPrivateDataNow(true);
}
return false;
}); });
setEventListener("openSearchEnginePreferences", "click", function(event) { setEventListener("openSearchEnginePreferences", "click", function(event) {
if (event.button == 0) { if (event.button == 0) {

Просмотреть файл

@ -75,14 +75,8 @@
<hbox> <hbox>
<menulist id="historyMode"> <menulist id="historyMode">
<menupopup> <menupopup>
<menuitem label="&historyHeader.remember.label;" value="remember" searchkeywords="&rememberDescription.label; <menuitem label="&historyHeader.remember.label;" value="remember" searchkeywords="&rememberDescription.label;"/>
&dontrememberActions.pre.label; <menuitem label="&historyHeader.dontremember.label;" value="dontremember" searchkeywords="&dontrememberDescription.label;"/>
&dontrememberActions.clearHistory.label;
&dontrememberActions.post.label;"/>
<menuitem label="&historyHeader.dontremember.label;" value="dontremember" searchkeywords="&dontrememberDescription.label;
&dontrememberActions.pre.label;
&dontrememberActions.clearHistory.label;
&dontrememberActions.post.label;"/>
<menuitem label="&historyHeader.custom.label;" value="custom" searchkeywords="&privateBrowsingPermanent2.label; <menuitem label="&historyHeader.custom.label;" value="custom" searchkeywords="&privateBrowsingPermanent2.label;
&rememberHistory2.label; &rememberHistory2.label;
&rememberSearchForm.label; &rememberSearchForm.label;
@ -102,71 +96,74 @@
</hbox> </hbox>
<label>&historyHeader.post.label;</label> <label>&historyHeader.post.label;</label>
</hbox> </hbox>
<deck id="historyPane"> <hbox>
<vbox id="historyRememberPane"> <deck id="historyPane" flex="1">
<hbox align="center" flex="1"> <vbox id="historyRememberPane">
<vbox flex="1"> <hbox align="center" flex="1">
<description>&rememberDescription.label;</description> <vbox flex="1">
<description>&dontrememberActions.pre.label;<label <description>&rememberDescription.label;</description>
class="text-link" id="historyRememberClear" </vbox>
>&dontrememberActions.clearHistory.label;</label>&dontrememberActions.post.label;</description> </hbox>
</vbox> </vbox>
</hbox> <vbox id="historyDontRememberPane">
</vbox> <hbox align="center" flex="1">
<vbox id="historyDontRememberPane"> <vbox flex="1">
<hbox align="center" flex="1"> <description>&dontrememberDescription.label;</description>
<vbox flex="1"> </vbox>
<description>&dontrememberDescription.label;</description> </hbox>
<description>&dontrememberActions.pre.label;<label </vbox>
class="text-link" id="historyDontRememberClear" <vbox id="historyCustomPane">
>&dontrememberActions.clearHistory.label;</label>&dontrememberActions.post.label;</description> <vbox>
</vbox> <checkbox id="privateBrowsingAutoStart"
</hbox> label="&privateBrowsingPermanent2.label;"
</vbox> accesskey="&privateBrowsingPermanent2.accesskey;"
<vbox id="historyCustomPane"> preference="browser.privatebrowsing.autostart"/>
<vbox> <vbox class="indent">
<checkbox id="privateBrowsingAutoStart" <checkbox id="rememberHistory"
label="&privateBrowsingPermanent2.label;" label="&rememberHistory2.label;"
accesskey="&privateBrowsingPermanent2.accesskey;" accesskey="&rememberHistory2.accesskey;"
preference="browser.privatebrowsing.autostart"/> preference="places.history.enabled"/>
<vbox class="indent"> <checkbox id="rememberForms"
<checkbox id="rememberHistory" label="&rememberSearchForm.label;"
label="&rememberHistory2.label;" accesskey="&rememberSearchForm.accesskey;"
accesskey="&rememberHistory2.accesskey;" preference="browser.formfill.enable"/>
preference="places.history.enabled"/> <hbox id="clearDataBox"
<checkbox id="rememberForms" align="center">
label="&rememberSearchForm.label;" <checkbox id="alwaysClear"
accesskey="&rememberSearchForm.accesskey;" preference="privacy.sanitize.sanitizeOnShutdown"
preference="browser.formfill.enable"/> label="&clearOnClose.label;"
<hbox id="clearDataBox" accesskey="&clearOnClose.accesskey;"
align="center"> flex="1" />
<checkbox id="alwaysClear" <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
preference="privacy.sanitize.sanitizeOnShutdown" <hbox>
label="&clearOnClose.label;" <button id="clearDataSettings"
accesskey="&clearOnClose.accesskey;" class="accessory-button"
flex="1" /> label="&clearOnCloseSettings.label;"
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. --> accesskey="&clearOnCloseSettings.accesskey;"
<hbox> searchkeywords="&clearDataSettings3.label;
<button id="clearDataSettings" &historySection.label;
class="accessory-button" &itemHistoryAndDownloads.label;
label="&clearOnCloseSettings.label;" &itemCookies.label;
accesskey="&clearOnCloseSettings.accesskey;" &itemActiveLogins.label;
searchkeywords="&clearDataSettings3.label; &itemCache.label;
&historySection.label; &itemFormSearchHistory.label;
&itemHistoryAndDownloads.label; &dataSection.label;
&itemCookies.label; &itemSitePreferences.label;
&itemActiveLogins.label; &itemOfflineApps.label;"/>
&itemCache.label; </hbox>
&itemFormSearchHistory.label;
&dataSection.label;
&itemSitePreferences.label;
&itemOfflineApps.label;"/>
</hbox> </hbox>
</hbox> </vbox>
</vbox> </vbox>
</vbox> </vbox>
</deck>
<vbox align="end">
<button id="clearHistoryButton"
class="accessory-button"
icon="clear"
label="&clearHistoryButton.label;"
accesskey="&clearHistoryButton.accesskey;"/>
</vbox> </vbox>
</deck> </hbox>
</groupbox> </groupbox>
<!-- Site Data --> <!-- Site Data -->

Просмотреть файл

@ -70,11 +70,8 @@
<!ENTITY dontrememberDescription.label "&brandShortName; will use the same settings as private browsing, and will not remember any history as you browse the Web."> <!ENTITY dontrememberDescription.label "&brandShortName; will use the same settings as private browsing, and will not remember any history as you browse the Web.">
<!-- LOCALIZATION NOTE (dontrememberActions.pre.label): include a trailing space as needed --> <!ENTITY clearHistoryButton.label "Clear History…">
<!-- LOCALIZATION NOTE (dontrememberActions.post.label): include a starting space as needed --> <!ENTITY clearHistoryButton.accesskey "s">
<!ENTITY dontrememberActions.pre.label "You may also want to ">
<!ENTITY dontrememberActions.clearHistory.label "clear all current history">
<!ENTITY dontrememberActions.post.label ".">
<!ENTITY privateBrowsingPermanent2.label "Always use private browsing mode"> <!ENTITY privateBrowsingPermanent2.label "Always use private browsing mode">
<!ENTITY privateBrowsingPermanent2.accesskey "p"> <!ENTITY privateBrowsingPermanent2.accesskey "p">

Просмотреть файл

@ -125,7 +125,7 @@ async function connectionDialog(aBrowser) {
async function clearRecentHistoryDialog(aBrowser) { async function clearRecentHistoryDialog(aBrowser) {
await ContentTask.spawn(aBrowser, null, async function() { await ContentTask.spawn(aBrowser, null, async function() {
content.document.getElementById("historyRememberClear").click(); content.document.getElementById("clearHistoryButton").click();
}); });
} }