Bug 281414 - global s/nsIPrefBranchInternal/nsIPrefBranch2/ rs=darin (did not change backwards-compatible code in extensions/irc extensions/venkman or extensions/inspector)

This commit is contained in:
bsmedberg%covad.net 2006-09-14 06:10:36 +00:00
parent 152211114e
commit 48289f53e3
2 changed files with 6 additions and 6 deletions

View File

@ -212,7 +212,7 @@ const gPopupPrefListener =
function addPrefListener(observer)
{
try {
var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranch2);
pbi.addObserver(observer.domain, observer, false);
} catch(ex) {
dump("Failed to observe prefs: " + ex + "\n");
@ -222,7 +222,7 @@ function addPrefListener(observer)
function removePrefListener(observer)
{
try {
var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranch2);
pbi.removeObserver(observer.domain, observer);
} catch(ex) {
dump("Failed to remove pref observer: " + ex + "\n");

View File

@ -8,7 +8,7 @@
<binding id="urlbar" extends="chrome://global/content/autocomplete.xml#autocomplete">
<implementation>
<constructor><![CDATA[
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
if (pbi)
pbi.addObserver("browser.urlbar", this.mPrefObserver, false);
@ -17,7 +17,7 @@
]]></constructor>
<destructor><![CDATA[
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
if (pbi)
pbi.removeObserver("browser.urlbar", this.mPrefObserver);
]]></destructor>
@ -65,7 +65,7 @@
<implementation>
<constructor><![CDATA[
// listen for changes to default search engine
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
if (pbi) {
pbi.addObserver("browser.search", this.mPrefObserver, false);
pbi.addObserver("browser.urlbar", this.mPrefObserver, false);
@ -73,7 +73,7 @@
]]></constructor>
<destructor><![CDATA[
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
if (pbi) {
pbi.removeObserver("browser.search", this.mPrefObserver);
pbi.removeObserver("browser.urlbar", this.mPrefObserver);