Changeset a49b68
- Timestamp:
- Jul 6, 2011, 1:41:33 PM (10 years ago)
- Branches:
- ng_0.8, ng_0.9
- Children:
- 0ac5f3
- Parents:
- d1603d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chrome/content/v_identity/vI_notificationBar.js
rd1603d ra49b68 111 111 }, 112 112 113 // copied and adapted from nightly tester tools from Dave Townsend (http://www.oxymoronical.com/web/firefox/nightly) 114 __getExtensionList: function(callback) { 115 Components.utils.import("resource://gre/modules/AddonManager.jsm"); 116 117 AddonManager.getAllAddons(function(addons) { 118 119 var strings = addons.map(function(addon) { 120 return "addon: " + addon.name + " " + addon.version 121 + (addon.userDisabled || addon.appDisabled ? " [DISABLED]" : ""); 122 }); 123 124 try { callback(strings.join("\n")) } catch(e) {}; 125 }); 126 }, 127 113 128 dump_app_version : function(note) { 114 129 // add some information about the mail-client and the extensions installed … … 122 137 else vI_notificationBar.__dumpDebugBox("mail-client seems not supported by Virtual Identity Extension") 123 138 124 // copied and adapted from nightly tester tools from Dave Townsend (http://www.oxymoronical.com/web/firefox/nightly) 125 if (Components.classes["@mozilla.org/extensions/manager;1"]) { // only works if extensionsmanager is available 126 try { var em = Components.classes["@mozilla.org/extensions/manager;1"] 127 .getService(Components.interfaces.nsIExtensionManager); 128 var items = em.getItemList(Components.interfaces.nsIUpdateItem.TYPE_EXTENSION, {}); 129 var rdfS = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); 130 var ds = em.datasource; 131 var disabledResource = rdfS.GetResource("http://www.mozilla.org/2004/em-rdf#disabled"); 132 var isDisabledResource = rdfS.GetResource("http://www.mozilla.org/2004/em-rdf#isDisabled"); 133 var text = []; 134 for (var i=0; i<items.length; i++) 135 { 136 var output = " - " + items[i].name + " " + items[i].id + " " + items[i].version; 137 var source = rdfS.GetResource("urn:mozilla:item:"+items[i].id); 138 var disabled = ds.GetTarget(source, disabledResource, true); 139 if (!disabled) disabled = ds.GetTarget(source, isDisabledResource, true); 140 try { 141 disabled=disabled.QueryInterface(Components.interfaces.nsIRDFLiteral); 142 if (disabled.Value=="true") output += " [DISABLED]"; 143 } 144 catch (e) { } 145 vI_notificationBar.__dumpDebugBox(output + "\n") 146 } 147 } 148 catch (e) {}; 149 }; 139 vI_notificationBar.__getExtensionList(vI_notificationBar.__dumpDebugBox) 140 141 // vI_notificationBar.__dumpDebugBox(output + "\n") 142 150 143 vI_notificationBar.__dumpDebugBox("--------------------------------------------------------------------------------\n") 151 144 },
Note: See TracChangeset
for help on using the changeset viewer.