Bug #284144 --> add options and disk space UI to the advanced options panel
git-svn-id: svn://10.0.0.236/trunk@170801 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
cad464bd34
commit
3c6818b234
@ -82,6 +82,12 @@ var gAdvancedPane = {
|
||||
"width=600,height=400", null);
|
||||
},
|
||||
|
||||
showOfflineSettings: function()
|
||||
{
|
||||
document.documentElement.openSubDialog("chrome://messenger/content/preferences/offline.xul",
|
||||
"", null);
|
||||
},
|
||||
|
||||
updateAppUpdateUI: function ()
|
||||
{
|
||||
var preference = document.getElementById("app.update.autoUpdateEnabled");
|
||||
|
||||
@ -107,17 +107,26 @@
|
||||
<separator class="thin"/>
|
||||
|
||||
<vbox>
|
||||
<hbox align="center" pack="start">
|
||||
<label value="&reuseExp.label;"/>
|
||||
</hbox>
|
||||
<hbox align="center" pack="start">
|
||||
<label value="&reuseExp.label;"/>
|
||||
</hbox>
|
||||
|
||||
<hbox class="indent">
|
||||
<radiogroup id="mailnewsDoubleClick2NewWindow" preference="mailnews.reuse_message_window" orient="horizontal">
|
||||
<radio value="false" label="&reuseExpRadio0.label;" accesskey="&reuseExpRadio0.accesskey;" id="new"/>
|
||||
<radio value="true" label="&reuseExpRadio1.label;" accesskey="&reuseExpRadio1.accesskey;" id="existing"/>
|
||||
</radiogroup>
|
||||
</hbox>
|
||||
<hbox class="indent">
|
||||
<radiogroup id="mailnewsDoubleClick2NewWindow" preference="mailnews.reuse_message_window" orient="horizontal">
|
||||
<radio value="false" label="&reuseExpRadio0.label;" accesskey="&reuseExpRadio0.accesskey;" id="new"/>
|
||||
<radio value="true" label="&reuseExpRadio1.label;" accesskey="&reuseExpRadio1.accesskey;" id="existing"/>
|
||||
</radiogroup>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<hbox align="center">
|
||||
<description flex="1">&offline.label;</description>
|
||||
<button label="&showOfflineSettings.label;"
|
||||
accesskey="&showOfflineSettings.accesskey;"
|
||||
oncommand="gAdvancedPane.showOfflineSettings();"/>
|
||||
</hbox>
|
||||
</tabpanel>
|
||||
|
||||
<!-- Update -->
|
||||
|
||||
@ -30,3 +30,4 @@ messenger.jar:
|
||||
* content/messenger/preferences/fonts.xul
|
||||
* content/messenger/preferences/notifications.xul
|
||||
* content/messenger/preferences/notifications.js
|
||||
* content/messenger/preferences/offline.xul
|
||||
|
||||
101
mozilla/mail/components/preferences/offline.xul
Normal file
101
mozilla/mail/components/preferences/offline.xul
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Thunderbird Preferences System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Scott MacGregor.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2005
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Scott MacGregor <mscott@mozilla.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://messenger/locale/preferences/offline.dtd">
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/"?>
|
||||
|
||||
<prefwindow id="OfflineDialog" type="child"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&OfflineDialog.title;"
|
||||
dlgbuttons="accept,cancel"
|
||||
style="width: 37em !important;">
|
||||
|
||||
<prefpane id="OfflineDialogPane">
|
||||
<preferences>
|
||||
<preference id="offline.startup_state" name="offline.startup_state" type="int"/>
|
||||
<preference id="offline.send.unsent_messages" name="offline.send.unsent_messages" type="int"/>
|
||||
<preference id="offline.download.download_messages" name="offline.download.download_messages" type="int"/>
|
||||
<preference id="mail.prompt_purge_threshhold" name="mail.prompt_purge_threshhold" type="bool"/>
|
||||
<preference id="mail.purge_threshhold" name="mail.purge_threshhold" type="bool"/>
|
||||
</preferences>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&rHeader;"/>
|
||||
|
||||
<label value="&textStartUp;"/>
|
||||
<radiogroup id="whenStartingUp" class="indent" preference="offline.startup_state">
|
||||
<radio value="0" label="&radioRememberPrevState;" accesskey="&radioRememberPrevState.accesskey;"/>
|
||||
<radio value="1" label="&radioAskMe;" accesskey="&radioAskMe.accesskey;"/>
|
||||
<radio value="2" label="&radioAlwaysOnline;" accesskey="&radioAlwaysOnline.accesskey;"/>
|
||||
</radiogroup>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<label value="&textGoingOnline;"/>
|
||||
<radiogroup id="whengoingOnlinestate" orient="horizontal" class="indent"
|
||||
preference ="offline.send.unsent_messages">
|
||||
<radio value="1" label="&radioAutoSend;" accesskey="&radioAutoSend.accesskey;"/>
|
||||
<radio value="2" label="&radioNotSend;" accesskey="&radioNotSend.accesskey;"/>
|
||||
<radio value="0" label="&radioAskUnsent;" accesskey="&radioAskUnsent.accesskey;"/>
|
||||
</radiogroup>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<label value="&textGoingOffline;"/>
|
||||
<radiogroup id="whengoingOfflinestate" orient="horizontal" class="indent"
|
||||
preference="offline.download.download_messages">
|
||||
<radio value="1" label="&radioAutoDownload;" accesskey="&radioAutoDownload.accesskey;"/>
|
||||
<radio value="2" label="&radioNotDownload;" accesskey="&radioNotDownload.accesskey;"/>
|
||||
<radio value="0" label="&radioAskDownload;" accesskey="&radioAskDownload.accesskey;"/>
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&Diskspace;"/>
|
||||
<hbox align="center">
|
||||
<checkbox id="offlineCompactFolder" label="&offlineCompact.label;" accesskey="&offlineCompact.accesskey;"
|
||||
preference="mail.prompt_purge_threshhold"/>
|
||||
<textbox id="offlineCompactFolderMin" size="5" value="100" preference="mail.purge_threshhold"/>
|
||||
<label value="&kb.label;"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
</prefpane>
|
||||
</prefwindow>
|
||||
|
||||
@ -23,15 +23,9 @@
|
||||
<!-- overlay information -->
|
||||
<RDF:Seq about="urn:mozilla:overlays">
|
||||
<RDF:li resource="chrome://messenger/content/mailWindowOverlay.xul"/>
|
||||
<RDF:li resource="chrome://messenger/content/pref-advanced.xul"/>
|
||||
</RDF:Seq>
|
||||
|
||||
<RDF:Seq about="chrome://messenger/content/mailWindowOverlay.xul">
|
||||
<RDF:li>chrome://messenger-offline/content/msgOfflineOverlay.xul</RDF:li>
|
||||
</RDF:Seq>
|
||||
|
||||
<RDF:Seq about="chrome://messenger/content/pref-advanced.xul">
|
||||
<RDF:li>chrome://messenger-offline/content/msgOfflineOverlay.xul</RDF:li>
|
||||
</RDF:Seq>
|
||||
|
||||
</RDF:RDF>
|
||||
|
||||
@ -75,12 +75,4 @@
|
||||
<menuseparator insertafter="offlineMenuItem"/>
|
||||
</menupopup>
|
||||
|
||||
<expander id="connections" label="&prefOfflineConnection.label;">
|
||||
<hbox insertbefore="proxyConnectionSettings" align="center" pack="end">
|
||||
<label class="expanderDescription" value="&prefOfflineDesc.label;" flex="1"/>
|
||||
<button label="&prefOfflineButton.label;" accesskey="&prefOfflineButton.accesskey;"
|
||||
oncommand="window.openDialog('chrome://messenger-offline/content/pref-offline.xul', '', 'chrome,dialog,modal,resizable');"/>
|
||||
</hbox>
|
||||
</expander>
|
||||
|
||||
</overlay>
|
||||
|
||||
@ -1,158 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog SYSTEM "chrome://messenger-offline/locale/pref-offline.dtd">
|
||||
|
||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="init();"
|
||||
buttons="accept, cancel"
|
||||
ondialogaccept="savePrefs();"
|
||||
persist="screenX screenY"
|
||||
title="&pane.title;">
|
||||
|
||||
<script type="application/x-javascript">
|
||||
|
||||
<![CDATA[
|
||||
var _elementIDs = ["whenStartingUp", "whengoingOnlinestate", "whengoingOfflinestate", "offlineCompactFolder", "offlineCompactFolderMin"];
|
||||
|
||||
function init()
|
||||
{
|
||||
var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
|
||||
// initialize the default window values...
|
||||
for( var i = 0; i < _elementIDs.length; i++ )
|
||||
{
|
||||
var elementID = _elementIDs[i];
|
||||
var element = document.getElementById(elementID);
|
||||
if (!element) break;
|
||||
var eltType = element.localName;
|
||||
if (eltType == "radiogroup")
|
||||
element.selectedItem = element.getElementsByAttribute('value', pref.getIntPref(element.getAttribute("prefstring")))[0];
|
||||
else if (eltType == "checkbox")
|
||||
element.checked = pref.getBoolPref(element.getAttribute("prefstring"));
|
||||
else if (eltType == "textbox")
|
||||
element.setAttribute("value", pref.getIntPref(element.getAttribute("prefstring")) );
|
||||
}
|
||||
|
||||
var aCheckbox = document.getElementById("offlineCompactFolder");
|
||||
enableField(aCheckbox, "offlineCompactFolderMin");
|
||||
}
|
||||
|
||||
function enableField(aCheckbox, aNodeID)
|
||||
{
|
||||
var aField = document.getElementById(aNodeID);
|
||||
if (aCheckbox.checked)
|
||||
aField.removeAttribute("disabled");
|
||||
else
|
||||
aField.setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
function savePrefs()
|
||||
{
|
||||
var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
|
||||
for( var i = 0; i < _elementIDs.length; i++ )
|
||||
{
|
||||
var elementID = _elementIDs[i];
|
||||
|
||||
var element = document.getElementById(elementID);
|
||||
if (!element) break;
|
||||
var eltType = element.localName;
|
||||
|
||||
if (eltType == "radiogroup")
|
||||
pref.setIntPref(element.getAttribute("prefstring"), parseInt(element.value));
|
||||
else if (eltType == "checkbox")
|
||||
pref.setBoolPref(element.getAttribute("prefstring"), element.checked);
|
||||
else if (eltType == "textbox")
|
||||
pref.setIntPref(element.getAttribute("prefstring"), parseInt(element.value) );
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&rHeader;"/>
|
||||
|
||||
<label value="&textStartUp;"/>
|
||||
<radiogroup id="whenStartingUp" class="indent"
|
||||
prefstring="offline.startup_state">
|
||||
<radio value="0" label="&radioRememberPrevState;" accesskey="&radioRememberPrevState.accesskey;"/>
|
||||
<radio value="1" label="&radioAskMe;" accesskey="&radioAskMe.accesskey;"/>
|
||||
<radio value="2" label="&radioAlwaysOnline;" accesskey="&radioAlwaysOnline.accesskey;"/>
|
||||
</radiogroup>
|
||||
|
||||
<separator/>
|
||||
|
||||
<label value="&textGoingOnline;"/>
|
||||
<radiogroup id="whengoingOnlinestate"
|
||||
orient="horizontal" class="indent"
|
||||
prefstring="offline.send.unsent_messages">
|
||||
<radio value="1" label="&radioAutoSend;" accesskey="&radioAutoSend.accesskey;"/>
|
||||
<radio value="2" label="&radioNotSend;" accesskey="&radioNotSend.accesskey;"/>
|
||||
<radio value="0" label="&radioAskUnsent;" accesskey="&radioAskUnsent.accesskey;"/>
|
||||
</radiogroup>
|
||||
|
||||
<separator/>
|
||||
|
||||
<label value="&textGoingOffline;"/>
|
||||
<radiogroup id="whengoingOfflinestate"
|
||||
orient="horizontal" class="indent"
|
||||
prefstring="offline.download.download_messages">
|
||||
<radio value="1" label="&radioAutoDownload;" accesskey="&radioAutoDownload.accesskey;"/>
|
||||
<radio value="2" label="&radioNotDownload;" accesskey="&radioNotDownload.accesskey;"/>
|
||||
<radio value="0" label="&radioAskDownload;" accesskey="&radioAskDownload.accesskey;"/>
|
||||
</radiogroup>
|
||||
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&Diskspace;"/>
|
||||
<hbox align="center">
|
||||
<checkbox id="offlineCompactFolder" label="&offlineCompact.label;" accesskey="&offlineCompact.accesskey;"
|
||||
prefstring="mail.prompt_purge_threshhold"
|
||||
oncommand="enableField(this,'offlineCompactFolderMin');"/>
|
||||
<textbox id="offlineCompactFolderMin" size="5" value="100"
|
||||
preftype="int" prefstring="mail.purge_threshhold"/>
|
||||
<label value="&kb.label;"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
</dialog>
|
||||
@ -2,6 +2,5 @@ offline.jar:
|
||||
* content/messenger-offline/msgOfflineOverlay.xul (content/msgOfflineOverlay.xul)
|
||||
* content/messenger-offline/mail-offline.js (content/mail-offline.js)
|
||||
* content/messenger-offline/contents.rdf (content/contents.rdf)
|
||||
* content/messenger-offline/pref-offline.xul (content/pref-offline.xul)
|
||||
|
||||
|
||||
|
||||
@ -23,6 +23,9 @@
|
||||
<!ENTITY reuseExpRadio0.accesskey "n">
|
||||
<!ENTITY reuseExpRadio1.label "An existing message window">
|
||||
<!ENTITY reuseExpRadio1.accesskey "x">
|
||||
<!ENTITY showOfflineSettings.label "Offline Settings...">
|
||||
<!ENTITY showOfflineSettings.accesskey "f">
|
||||
<!ENTITY offline.label "Configure Offline Settings">
|
||||
|
||||
<!-- Update -->
|
||||
<!ENTITY softwareupdateinfo.label "Periodically check for updates to:">
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
|
||||
<!ENTITY pane.title "Offline & Disk Space">
|
||||
<!ENTITY rHeader "Offline">
|
||||
|
||||
<!ENTITY OfflineDialog.title "Offline & Disk Space Setings">
|
||||
<!ENTITY textStartUp "When starting up:">
|
||||
<!ENTITY radioRememberPrevState "Remember previous online state">
|
||||
<!ENTITY radioRememberPrevState.accesskey "R">
|
||||
@ -120,6 +120,7 @@
|
||||
locale/@AB_CD@/messenger/preferences/advanced.dtd (@AB_CD@/chrome/messenger/preferences/advanced.dtd)
|
||||
locale/@AB_CD@/messenger/preferences/receipts.dtd (@AB_CD@/chrome/messenger/preferences/receipts.dtd)
|
||||
locale/@AB_CD@/messenger/preferences/connection.dtd (@AB_CD@/chrome/messenger/preferences/connection.dtd)
|
||||
locale/@AB_CD@/messenger/preferences/offline.dtd (@AB_CD@/chrome/messenger/preferences/offline.dtd)
|
||||
locale/@AB_CD@/messenger/preferences/downloads.dtd (@AB_CD@/chrome/messenger/preferences/downloads.dtd)
|
||||
locale/@AB_CD@/messenger/preferences/downloadactions.dtd (@AB_CD@/chrome/messenger/preferences/downloadactions.dtd)
|
||||
locale/@AB_CD@/messenger/preferences/changeaction.dtd (@AB_CD@/chrome/messenger/preferences/changeaction.dtd)
|
||||
@ -150,7 +151,6 @@
|
||||
* locale/@AB_CD@/messenger-offline/contents.rdf (generic/chrome/messenger-offline/contents.rdf)
|
||||
locale/@AB_CD@/messenger-offline/offline.properties (@AB_CD@/chrome/messenger-offline/offline.properties)
|
||||
locale/@AB_CD@/messenger-offline/offline.dtd (@AB_CD@/chrome/messenger-offline/offline.dtd)
|
||||
locale/@AB_CD@/messenger-offline/pref-offline.dtd (@AB_CD@/chrome/messenger-offline/pref-offline.dtd)
|
||||
* locale/@AB_CD@/messenger-region/contents.rdf (generic/chrome/messenger-region/contents.rdf)
|
||||
locale/@AB_CD@/messenger-region/region.properties (@AB_CD@/chrome/messenger-region/region.properties)
|
||||
* locale/@AB_CD@/mozldap/contents.rdf (generic/chrome/mozldap/contents.rdf)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user