Bug 843314: Addon without icons should show a filler. [r=mfinkle]
authorSriram Ramasubramanian <sriram@mozilla.com>
Wed, 20 Feb 2013 23:07:06 -0800
changeset 122518 88b94a88ea029810d171611871b67196a7ee3fab
parent 122517 7047fe1649c72b608c2cb8dece8cba66d246e01a
child 122519 7547bf5fe1666f87a2711d0fa6893635aab854dd
push id24342
push userryanvm@gmail.com
push dateThu, 21 Feb 2013 13:05:06 +0000
treeherdermozilla-central@702d2814efbf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs843314
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 843314: Addon without icons should show a filler. [r=mfinkle]
mobile/android/base/BrowserApp.java
mobile/android/base/Makefile.in
mobile/android/base/resources/drawable-hdpi/ic_menu_addons_filler.png
mobile/android/base/resources/drawable-mdpi/ic_menu_addons_filler.png
mobile/android/base/resources/drawable-xhdpi/ic_menu_addons_filler.png
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -387,17 +387,16 @@ abstract public class BrowserApp extends
                 info.checked = false;
                 info.enabled = true;
                 info.visible = true;
                 String iconRes = null;
                 try { // icon is optional
                     iconRes = message.getString("icon");
                 } catch (Exception ex) { }
                 info.icon = iconRes;
-                info.checkable = false;
                 try {
                     info.checkable = message.getBoolean("checkable");
                 } catch (Exception ex) { }
                 try { // parent is optional
                     info.parent = message.getInt("parent") + ADDON_MENU_OFFSET;
                 } catch (Exception ex) { }
                 final MenuItemInfo menuItemInfo = info;
                 mMainHandler.post(new Runnable() {
@@ -833,17 +832,21 @@ abstract public class BrowserApp extends
                             } finally {
                                 is.close();
                             }
                         } catch (Exception e) {
                             Log.w(LOGTAG, "Unable to set icon", e);
                         }
                     }
                 });
+            } else {
+                item.setIcon(R.drawable.ic_menu_addons_filler);
             }
+        } else {
+            item.setIcon(R.drawable.ic_menu_addons_filler);
         }
 
         item.setCheckable(info.checkable);
         item.setChecked(info.checked);
         item.setEnabled(info.enabled);
         item.setVisible(info.visible);
     }
 
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -532,16 +532,17 @@ RES_DRAWABLE_MDPI = \
   res/drawable-mdpi/awesomebar_tab_left.9.png \
   res/drawable-mdpi/awesomebar_tab_right.9.png \
   res/drawable-mdpi/desktop_notification.png \
   res/drawable-mdpi/ic_addons_empty.png \
   res/drawable-mdpi/ic_awesomebar_go.png \
   res/drawable-mdpi/ic_awesomebar_reader.png \
   res/drawable-mdpi/ic_awesomebar_search.png \
   res/drawable-mdpi/ic_awesomebar_star.png \
+  res/drawable-mdpi/ic_menu_addons_filler.png \
   res/drawable-mdpi/ic_menu_bookmark_add.png \
   res/drawable-mdpi/ic_menu_bookmark_remove.png \
   res/drawable-mdpi/ic_menu_close_all_tabs.png \
   res/drawable-mdpi/ic_menu_forward.png \
   res/drawable-mdpi/ic_menu_new_private_tab.png \
   res/drawable-mdpi/ic_menu_new_private_tab_small.png \
   res/drawable-mdpi/ic_menu_new_tab_small.png \
   res/drawable-mdpi/ic_menu_reload.png \
@@ -642,16 +643,17 @@ RES_DRAWABLE_HDPI = \
   res/drawable-hdpi/awesomebar_tab_center.9.png \
   res/drawable-hdpi/awesomebar_tab_left.9.png \
   res/drawable-hdpi/awesomebar_tab_right.9.png \
   res/drawable-hdpi/ic_addons_empty.png \
   res/drawable-hdpi/ic_awesomebar_go.png \
   res/drawable-hdpi/ic_awesomebar_reader.png \
   res/drawable-hdpi/ic_awesomebar_search.png \
   res/drawable-hdpi/ic_awesomebar_star.png \
+  res/drawable-hdpi/ic_menu_addons_filler.png \
   res/drawable-hdpi/ic_menu_bookmark_add.png \
   res/drawable-hdpi/ic_menu_bookmark_remove.png \
   res/drawable-hdpi/ic_menu_close_all_tabs.png \
   res/drawable-hdpi/ic_menu_forward.png \
   res/drawable-hdpi/ic_menu_new_private_tab.png \
   res/drawable-hdpi/ic_menu_new_private_tab_small.png \
   res/drawable-hdpi/ic_menu_new_tab.png \
   res/drawable-hdpi/ic_menu_new_tab_small.png \
@@ -733,16 +735,17 @@ RES_DRAWABLE_XHDPI = \
   res/drawable-xhdpi/awesomebar_tab_center.9.png \
   res/drawable-xhdpi/awesomebar_tab_left.9.png \
   res/drawable-xhdpi/awesomebar_tab_right.9.png \
   res/drawable-xhdpi/ic_addons_empty.png \
   res/drawable-xhdpi/ic_awesomebar_go.png \
   res/drawable-xhdpi/ic_awesomebar_reader.png \
   res/drawable-xhdpi/ic_awesomebar_search.png \
   res/drawable-xhdpi/ic_awesomebar_star.png \
+  res/drawable-xhdpi/ic_menu_addons_filler.png \
   res/drawable-xhdpi/ic_menu_bookmark_add.png \
   res/drawable-xhdpi/ic_menu_bookmark_remove.png \
   res/drawable-xhdpi/ic_menu_close_all_tabs.png \
   res/drawable-xhdpi/ic_menu_forward.png \
   res/drawable-xhdpi/ic_menu_new_private_tab.png \
   res/drawable-xhdpi/ic_menu_new_private_tab_small.png \
   res/drawable-xhdpi/ic_menu_new_tab.png \
   res/drawable-xhdpi/ic_menu_new_tab_small.png \
new file mode 100644
index 0000000000000000000000000000000000000000..242646b20b10f7cd6c48d08117b37f20bdf1ab8f
GIT binary patch
literal 1039
zc$@(b1n~QbP)<h;3K|Lk000e1NJLTq002J#002J-1^@s6S6>j{000BlNkl<Zc-rmT
ze`u6-9KiAC+U{<5xHiFwQ;_}$qJJu4v|loRQ6rF+ffON`6gVr?()2{x1VyF&8}`Rw
zVrj56!=j(Guz^L<^dB+9T_Ns|&24T=CUa+fdL#FTJUkC~-|v0D&z<Y}<Mr3^z`eP<
z=eh6a`96+_{BMQvVSE@L#^1H!wRTg=(SRN3Mn48Ij2jq18b9GEcA*6^IGTzYA4MBJ
z!4yQpG`_$(#P5gr`RKqf#Gr8;#==sJk6}9|AQs(3ClaL+{}e7l0yK!0V#Y`CE;5ij
z3}7wh!$AU#_z<Gu4))=JpyQ*8Z~APG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