From bce1b3b905310800ce379517cd5c3e538ce4a3c0 Mon Sep 17 00:00:00 2001 From: "blakeross%telocity.com" Date: Wed, 17 May 2006 02:31:51 +0000 Subject: [PATCH] 114258 - pref panel header binding, dialogoverlay.css shouldn't have to be included in each panel. r=ben sr=hewitt 114268 - unnecessarily setting localname attribute on all pref-based elements when loading pref panels. r=ben sr=hewitt --- suite/common/pref/nsPrefWindow.js | 11 +++--- suite/common/pref/pref-advanced.xul | 6 ++-- suite/common/pref/pref-appearance.xul | 6 ++-- suite/common/pref/pref-applications.xul | 6 ++-- suite/common/pref/pref-cache.xul | 6 ++-- suite/common/pref/pref-colors.xul | 6 ++-- suite/common/pref/pref-debug.xul | 6 ++-- suite/common/pref/pref-debug1.xul | 8 ++--- suite/common/pref/pref-debug2.xul | 8 ++--- suite/common/pref/pref-fonts.xul | 8 ++--- suite/common/pref/pref-history.xul | 8 ++--- suite/common/pref/pref-languages.xul | 9 ++--- suite/common/pref/pref-mousewheel.xul | 9 ++--- suite/common/pref/pref-navigator.xul | 6 ++-- suite/common/pref/pref-offline.xul | 6 ++-- suite/common/pref/pref-policies.xul | 7 ++-- suite/common/pref/pref-proxies.xul | 6 ++-- suite/common/pref/pref-search.xul | 6 ++-- suite/common/pref/pref-security.xul | 5 ++- suite/common/pref/pref-smart_browsing.xul | 6 ++-- suite/common/pref/pref-smartupdate.xul | 9 ++--- suite/common/pref/pref-tabs.xul | 39 +++++++-------------- suite/common/pref/pref-themes.js | 42 ++++++++--------------- suite/common/pref/pref-themes.xul | 11 +++--- suite/common/pref/pref-winhooks.xul | 6 ++-- suite/common/pref/pref.xul | 12 ++++--- 26 files changed, 93 insertions(+), 165 deletions(-) diff --git a/suite/common/pref/nsPrefWindow.js b/suite/common/pref/nsPrefWindow.js index 3862673c62cb..546338667b92 100644 --- a/suite/common/pref/nsPrefWindow.js +++ b/suite/common/pref/nsPrefWindow.js @@ -45,7 +45,7 @@ function nsPrefWindow( frame_id ) this.contentFrame = frame_id this.wsm = new nsWidgetStateManager( frame_id ); - this.wsm.attributes = ["preftype", "prefstring", "prefattribute", "disabled", "localname"]; + this.wsm.attributes = ["preftype", "prefstring", "prefattribute", "disabled"]; this.pref = null; this.cancelHandlers = []; @@ -193,9 +193,9 @@ nsPrefWindow.prototype = { for( var elementID in pageData ) { + if (elementID == "initialized") continue; var itemObject = pageData[elementID]; - if (typeof(itemObject) != "object") break; - if ( "prefstring" in itemObject && itemObject.prefstring ) + if ( "prefstring" in itemObject && itemObject.prefstring ) { var elt = itemObject.localname; var prefattribute = itemObject.prefattribute; @@ -283,6 +283,9 @@ nsPrefWindow.prototype = onpageload: function ( aPageTag ) { + var header = document.getElementById("header"); + header.setAttribute("title", + window.frames[this.contentFrame].document.documentElement.getAttribute("headertitle")); if( !(aPageTag in this.wsm.dataManager.pageData) ) { var prefElements = window.frames[this.contentFrame].document.getElementsByAttribute( "prefstring", "*" ); @@ -335,7 +338,7 @@ nsPrefWindow.prototype = root[prefattribute] = prefvalue; var isPrefLocked = this.getPrefIsLocked(prefstring); if (isPrefLocked) - root.disabled="true"; + root.disabled = "true"; root.localname = prefElements[i].localName; } } diff --git a/suite/common/pref/pref-advanced.xul b/suite/common/pref/pref-advanced.xul index 19db5a4c483e..997e477aa73b 100644 --- a/suite/common/pref/pref-advanced.xul +++ b/suite/common/pref/pref-advanced.xul @@ -20,12 +20,12 @@ Contributor(s): --> - + onload="parent.initPanel('chrome://communicator/content/pref/pref-advanced.xul');" + headertitle="&lHeader;"> - - diff --git a/suite/common/pref/pref-appearance.xul b/suite/common/pref/pref-appearance.xul index 1b1fbcf8c444..6ccb8c65b96f 100644 --- a/suite/common/pref/pref-appearance.xul +++ b/suite/common/pref/pref-appearance.xul @@ -23,7 +23,6 @@ --> - @@ -32,7 +31,8 @@ %prefAppearanceDTD; ]> + onload="parent.initPanel(panel);" + headertitle="&lHeader;"> - - diff --git a/suite/common/pref/pref-applications.xul b/suite/common/pref/pref-applications.xul index 3cefdfe93fdf..cedd403a58f6 100644 --- a/suite/common/pref/pref-applications.xul +++ b/suite/common/pref/pref-applications.xul @@ -23,21 +23,19 @@ --> - + onload="parent.initPanel('chrome://communicator/content/pref/pref-applications.xul');" + headertitle="&lHeader;"> - - - + onload="parent.initPanel('chrome://communicator/content/pref/pref-debug1.xul');" + headertitle="&lHeader;"> - - - + diff --git a/suite/common/pref/pref-debug2.xul b/suite/common/pref/pref-debug2.xul index fca0b716c537..bab54a390895 100644 --- a/suite/common/pref/pref-debug2.xul +++ b/suite/common/pref/pref-debug2.xul @@ -21,12 +21,12 @@ Contributor(s): --> - + onload="parent.initPanel('chrome://communicator/content/pref/pref-debug2.xul');" + headertitle="&lHeader;"> - - - + diff --git a/suite/common/pref/pref-fonts.xul b/suite/common/pref/pref-fonts.xul index c34474319887..c8d389be4e1c 100644 --- a/suite/common/pref/pref-fonts.xul +++ b/suite/common/pref/pref-fonts.xul @@ -21,11 +21,11 @@ Contributor(s): --> - + onload="parent.initPanel('chrome://communicator/content/pref/pref-fonts.xul');" + headertitle="&lHeader;"> @@ -36,9 +36,7 @@ var _elementIDs = ["selectLangs"]; ]]> - - - +