Bug 624536 - Uninstalling personas addons does not disable personas themes from addons manager [r=mfinkle]
authorFabrice Desré <fabrice@mozilla.com>
Tue, 11 Jan 2011 01:12:45 -0500
changeset 67240 59e3fb4962afd7243dc5a1191039e4a6fe1c57e2
parent 67239 7f6d83855a0b1b781706c155a8593488a9a6a05d
child 67241 4bd621cccc4a1a56abb9689fac10a04ce889c388
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs624536
Bug 624536 - Uninstalling personas addons does not disable personas themes from addons manager [r=mfinkle]
mobile/chrome/content/bindings/extensions.xml
--- a/mobile/chrome/content/bindings/extensions.xml
+++ b/mobile/chrome/content/bindings/extensions.xml
@@ -63,16 +63,23 @@
           let isReadOnly = this.getAttribute("isReadonly");
           if (isReadOnly == "true")
             document.getAnonymousElementByAttribute(this, "anonid", "uninstall-button").setAttribute("disabled", "true");
           
           // no options for themes
           // use the unlocalized property, not the typeLabel attribute
           if (this.addon.type == "theme")
             document.getAnonymousElementByAttribute(this, "anonid", "options-button").hidden = true;
+
+          // checks if this is a persona but the add-on is not installed...
+          if ((this.addon.id.indexOf("@personas.mozilla.org") > 0) && !("LightWeightThemeWebInstaller" in window)) {
+            document.getAnonymousElementByAttribute(this, "anonid", "enable-button").setAttribute("disabled", "true");
+            document.getAnonymousElementByAttribute(this, "anonid", "enable-button").nextElementSibling.setAttribute("disabled", "true");
+            document.getAnonymousElementByAttribute(this, "anonid", "uninstall-button").setAttribute("disabled", "true");
+          }
         ]]>
       </constructor>
 
       <method name="hideOptions">
         <body>
           <![CDATA[
             let box = document.getAnonymousElementByAttribute(this, "anonid", "options-box");
             if (!box.collapsed)