mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 19:39:13 +00:00
remove wallet, bug 27027, r=dp
This commit is contained in:
parent
42e342e1b7
commit
0ed0132e13
@ -44,6 +44,27 @@ function Startup()
|
||||
|
||||
doSetOKCancel(onOK, null); // init ok event handler
|
||||
|
||||
// remove wallet functions (unless overruled by the "wallet.enabled" pref)
|
||||
try {
|
||||
pref = Components.classes['component://netscape/preferences'];
|
||||
pref = pref.getService();
|
||||
pref = pref.QueryInterface(Components.interfaces.nsIPref);
|
||||
try {
|
||||
if (!pref.GetBoolPref("wallet.enabled")) {
|
||||
var element;
|
||||
element = document.getElementById("nopreview");
|
||||
element.setAttribute("style","display: none;" );
|
||||
element = document.getElementById("nocapture");
|
||||
element.setAttribute("style","display: none;" );
|
||||
}
|
||||
} catch(e) {
|
||||
dump("wallet.enabled pref is missing from all.js");
|
||||
}
|
||||
} catch (ex) {
|
||||
dump("failed to get prefs service!\n");
|
||||
pref = null;
|
||||
}
|
||||
|
||||
LoadSignons();
|
||||
LoadReject();
|
||||
LoadNopreview();
|
||||
|
@ -249,6 +249,7 @@ pref("wallet.notified", false);
|
||||
pref("wallet.fetchPatches", false);
|
||||
pref("wallet.Server", "http://www.mozilla.org/wallet/tables/");
|
||||
pref("wallet.version", "1");
|
||||
pref("wallet.enabled", true);
|
||||
pref("messages.new_window", true); // ML obsolete; use mailnews.message_in_thread_window
|
||||
pref("intl.accept_languages", "en");
|
||||
pref("intl.mailcharset.cyrillic", "koi8-r");
|
||||
|
@ -268,6 +268,27 @@ function PREF_SwitchPage( node )
|
||||
function PREF_onpageload( tag )
|
||||
{
|
||||
dump("*** PREF_onpageload('" + tag + "');\n");
|
||||
|
||||
// remove wallet functions (unless overruled by the "wallet.enabled" pref)
|
||||
try {
|
||||
if (!this.pref.GetBoolPref("wallet.enabled")) {
|
||||
var element;
|
||||
if (tag == "pref-wallet") {
|
||||
element = window.frames[this.contentFrame].document.getElementById("walletArea");
|
||||
element.setAttribute("style","display: none;" );
|
||||
} else if (tag == "pref-advanced") {
|
||||
element =
|
||||
window.frames[this.contentFrame].document.getElementById("walletCaptureForms");
|
||||
element.setAttribute("style","display: none;" );
|
||||
element =
|
||||
window.frames[this.contentFrame].document.getElementById("walletCaptureFormsLabel");
|
||||
element.setAttribute("style","display: none;" );
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
dump("wallet.enabled pref is missing from all.js");
|
||||
}
|
||||
|
||||
if( !this.wsm.PageData[tag] ) {
|
||||
// there is no entry in the data hash for this page, so we need to initialise
|
||||
// the form values from existing prefs. The best way to do this is to pack
|
||||
|
@ -272,6 +272,30 @@ function ShowUpdateFromResource( node )
|
||||
* WALLET submenu
|
||||
*/
|
||||
|
||||
function CheckForWallet()
|
||||
{
|
||||
// remove wallet functions (unless overruled by the "wallet.enabled" pref)
|
||||
try {
|
||||
if (!this.pref.GetBoolPref("wallet.enabled")) {
|
||||
var element;
|
||||
element = document.getElementById("walletSafeFill");
|
||||
element.setAttribute("style","display: none;" );
|
||||
element = document.getElementById("walletQuickFill");
|
||||
element.setAttribute("style","display: none;" );
|
||||
element = document.getElementById("walletCapture");
|
||||
element.setAttribute("style","display: none;" );
|
||||
element = document.getElementById("walletSeparator");
|
||||
element.setAttribute("style","display: none;" );
|
||||
element = document.getElementById("walleteditor");
|
||||
element.setAttribute("style","display: none;" );
|
||||
element = document.getElementById("walletSamples");
|
||||
element.setAttribute("style","display: none;" );
|
||||
}
|
||||
} catch(e) {
|
||||
dump("wallet.enabled pref is missing from all.js");
|
||||
}
|
||||
}
|
||||
|
||||
// perform a wallet action
|
||||
function WalletAction( action )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user