Author: yradtsevich
Date: 2012-01-13 11:04:51 -0500 (Fri, 13 Jan 2012)
New Revision: 37831
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
Log:
https://issues.jboss.org/browse/JBIDE-9539 : Browsersim app for testing mobile/desktop web
apps
- creating of MacOS-like menus is fixed
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-01-13
15:58:20 UTC (rev 37830)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-01-13
16:04:51 UTC (rev 37831)
@@ -146,6 +146,12 @@
Menu appMenuBar = skin.getMenuBar();
if (appMenuBar != null) {
+ //delete all existing items, if any (necessary for systems like MacOS
+ // that have system (non-shell) menu bar), to do not create duplicate items while
changing skins
+ for (MenuItem item : appMenuBar.getItems()) {
+ item.dispose();
+ }
+
createMenusForMenuBar(appMenuBar);
}