diff --git a/common/content/help.js b/common/content/help.js index 12a639a8..5a17c0c1 100644 --- a/common/content/help.js +++ b/common/content/help.js @@ -1,7 +1,5 @@ -const win = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] - .getService(Components.interfaces.nsIWindowWatcher) - .activeWindow; +const win = Cc["@mozilla.org/embedcomp/window-watcher;1"].getService(Ci.nsIWindowWatcher).activeWindow; const liberator = win.liberator; let page = liberator.findHelp(decodeURIComponent(document.location.search.substr(1))); diff --git a/muttator/content/addressbook.js b/muttator/content/addressbook.js index af27bcbf..bfd3e098 100644 --- a/muttator/content/addressbook.js +++ b/muttator/content/addressbook.js @@ -32,10 +32,8 @@ function Addressbook() //{{{ ////////////////////// PRIVATE SECTION ///////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ - const abManager = Components.classes["@mozilla.org/abmanager;1"] - .getService(Components.interfaces.nsIAbManager); - const rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"] - .getService(Components.interfaces.nsIRDFService); + const abManager = Cc["@mozilla.org/abmanager;1"].getService(Ci.nsIAbManager); + const rdf = Cc["@mozilla.org/rdf/rdf-service;1"].getService(Ci.nsIRDFService); const kPersonalAddressbookURI = "moz-abmdbdirectory://abook.mab"; @@ -55,7 +53,7 @@ function Addressbook() //{{{ function getDirectoryFromURI(uri) { - return rdf.GetResource(uri).QueryInterface(Components.interfaces.nsIAbDirectory); + return rdf.GetResource(uri).QueryInterface(Ci.nsIAbDirectory); } /////////////////////////////////////////////////////////////////////////////}}} @@ -142,8 +140,7 @@ function Addressbook() //{{{ add: function (address, firstname, lastname, displayName) { let directory = getDirectoryFromURI(kPersonalAddressbookURI); - let card = Components.classes["@mozilla.org/addressbook/cardproperty;1"] - .createInstance(Components.interfaces.nsIAbCard); + let card = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance(Ci.nsIAbCard); if (!address || !directory || !card) return false; @@ -165,11 +162,11 @@ function Addressbook() //{{{ while (dirs.hasMoreElements()) { - let addrbook = dirs.getNext().QueryInterface(Components.interfaces.nsIAbDirectory); + let addrbook = dirs.getNext().QueryInterface(Ci.nsIAbDirectory); let cards = addrbook.childCards; while (cards.hasMoreElements()) { - let card = cards.getNext().QueryInterface(Components.interfaces.nsIAbCard); + let card = cards.getNext().QueryInterface(Ci.nsIAbCard); //var mail = card.primaryEmail || ""; //XXX let displayName = card.displayName; if (!displayName) diff --git a/muttator/content/config.js b/muttator/content/config.js index 3ee2f9b4..dd6b295d 100644 --- a/muttator/content/config.js +++ b/muttator/content/config.js @@ -71,7 +71,7 @@ const config = { //{{{ ["checkupdates", "Check for updates", function () { window.checkForUpdates(); }], /*["cleardata", "Clear private data", - function () { Components.classes[GLUE_CID].getService(Components.interfaces.nsIBrowserGlue).sanitize(window || null); }],*/ + function () { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }],*/ ["console", "JavaScript console", function () { window.toJavaScriptConsole(); }], /*["customizetoolbar", "Customize the Toolbar", @@ -217,9 +217,9 @@ const config = { //{{{ { QueryInterface: function (id) { - if (id.equals(Components.interfaces.nsIDocumentStateListener)) + if (id.equals(Ci.nsIDocumentStateListener)) return this; - throw Components.results.NS_NOINTERFACE; + throw Cr.NS_NOINTERFACE; }, // this is (also) fired once the new compose window loaded the message for the first time diff --git a/muttator/content/mail.js b/muttator/content/mail.js index a418a933..0092dde9 100644 --- a/muttator/content/mail.js +++ b/muttator/content/mail.js @@ -55,7 +55,7 @@ function Mail() //{{{ { if (folder) { - let msgFolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder); + let msgFolder = folder.QueryInterface(Ci.nsIMsgFolder); autocommands.trigger("FolderLoaded", { url: msgFolder }); // Jump to a message when requested @@ -85,9 +85,8 @@ function Mail() //{{{ } }; - var mailSession = Components.classes["@mozilla.org/messenger/services/session;1"] - .getService(Components.interfaces.nsIMsgMailSession); - var nsIFolderListener = Components.interfaces.nsIFolderListener; + var mailSession = Cc["@mozilla.org/messenger/services/session;1"].getService(Ci.nsIMsgMailSession); + var nsIFolderListener = Ci.nsIFolderListener; var notifyFlags = nsIFolderListener.intPropertyChanged | nsIFolderListener.event; mailSession.AddFolderListener(folderListener, notifyFlags); @@ -784,10 +783,8 @@ function Mail() //{{{ composeNewMail: function (args) { - let params = Components.classes["@mozilla.org/messengercompose/composeparams;1"] - .createInstance(Components.interfaces.nsIMsgComposeParams); - params.composeFields = Components.classes["@mozilla.org/messengercompose/composefields;1"] - .createInstance(Components.interfaces.nsIMsgCompFields); + let params = Cc["@mozilla.org/messengercompose/composeparams;1"].createInstance(Ci.nsIMsgComposeParams); + params.composeFields = Cc["@mozilla.org/messengercompose/composefields;1"].createInstance(Ci.nsIMsgCompFields); if (args) { @@ -815,18 +812,17 @@ function Mail() //{{{ if (!file.exists()) return void liberator.echoerr("Exxx: Could not attach file `" + url + "'", commandline.FORCE_SINGLELINE); - attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"] - .createInstance(Components.interfaces.nsIMsgAttachment); + attachment = Cc["@mozilla.org/messengercompose/attachment;1"].createInstance(Ci.nsIMsgAttachment); attachment.url = "file://" + file.path; params.composeFields.addAttachment(attachment); } } } - params.type = Components.interfaces.nsIMsgCompType.New; + params.type = Ci.nsIMsgCompType.New; - const msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService(); - msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService); + const msgComposeService = Cc["@mozilla.org/messengercompose;1"].getService(); + msgComposeService = msgComposeService.QueryInterface(Ci.nsIMsgComposeService); msgComposeService.OpenComposeWindowWithParams(null, params); }, @@ -1029,7 +1025,7 @@ function Mail() //{{{ while (msgs.hasMoreElements()) { - let msg = msgs.getNext().QueryInterface(Components.interfaces.nsIMsgDBHdr); + let msg = msgs.getNext().QueryInterface(Ci.nsIMsgDBHdr); if (validatorFunc(msg)) { count--; diff --git a/xulmus/content/config.js b/xulmus/content/config.js index 8b3042e9..6ac9546d 100644 --- a/xulmus/content/config.js +++ b/xulmus/content/config.js @@ -231,8 +231,7 @@ const config = { //{{{ else { let pane = document.getElementById(id); - let manager = Components.classes['@songbirdnest.com/Songbird/DisplayPane/Manager;1'] - .getService(Components.interfaces.sbIDisplayPaneManager); + let manager = Cc['@songbirdnest.com/Songbird/DisplayPane/Manager;1'].getService(Ci.sbIDisplayPaneManager); let paneinfo = manager.getPaneInfo(pane._lastURL.stringValue); if (!paneinfo)