Re: How to mark extension to be removed next time when Firefox started?
Karsten Düsterloh <[email protected]> Fri, 16 Dec 2005 23:33:14 +0100
| Newsgroups | gmane.comp.mozilla.devel.xpinstall |
|---|---|
| Organization | http://tprac.de/ |
| Message-ID | <[email protected]> |
Tomasz Pyra aber hob zu reden an und schrieb:
> in Extensions.rdf file I need to add attribute:
> em:toBeUninstalled="true" into RDF tag containing informations about
> plugin, and change "Components List Changed" attribute from 0 to 1 in
> file compatibility.ini in profile directory of current user.
>
> Is this good solution? Plugin is removed next time when firefox is
> started in that profile, so for me it works.
Sounds pretty hackish, given that you could just call the EM (eg. see
bottom of
<http://www.mozdev.org/source/browse/mnenhy/src/bin/chrome/mnenhy/content/mnenhy/mnenhy-pref-main.js?rev=1.9&content-type=text/x-cvsweb-markup>):
// remove Mnenhy from the Aviary's Extension Manager
try
{
const ksEMClassID = "@mozilla.org/extensions/manager;1";
const ksEMIID = "nsIExtensionManager";
if (ksEMClassID in Components.classes
&& ksEMIID in Components.interfaces)
{
const koEMService = Components.classes[ksEMClassID]
.getService(Components.interfaces[ksEMIID]);
if ("uninstallExtension" in koEMService)
// up to nsIExtensionManager.idl 1.25
koEMService.uninstallExtension(goMnenhy.ksMnenhyUUID);
else if ("uninstallItem" in koEMService)
// since nsIExtensionManager.idl 1.26
koEMService.uninstallItem(goMnenhy.ksMnenhyUUID);
}
goMnenhy.Log("UninstallMnenhy: successfully removed from EM");
}
catch(oErr)
{
goMnenhy.Log("UninstallMnenhy: removing from EM failed:" + oErr);
}
Karsten
--
Freiheit stirbt | Fsayannes SF&F-Bibliothek:
Mit Sicherheit | http://fsayanne.tprac.de/