Changeset 4590 in josm for trunk/src/org/openstreetmap/josm/gui/help
- Timestamp:
- 2011-11-12T12:54:49+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r4191 r4590 25 25 import javax.swing.JDialog; 26 26 import javax.swing.JEditorPane; 27 import javax.swing.JMenuItem; 27 28 import javax.swing.JOptionPane; 28 29 import javax.swing.JPanel; … … 45 46 46 47 import org.openstreetmap.josm.Main; 48 import org.openstreetmap.josm.actions.JosmAction; 47 49 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 50 import org.openstreetmap.josm.gui.MainMenu; 48 51 import org.openstreetmap.josm.tools.ImageProvider; 49 52 import org.openstreetmap.josm.tools.OpenBrowser; … … 53 56 /** the unique instance */ 54 57 private static HelpBrowser instance; 58 59 /** the menu item in the windows menu. Required to properly 60 * hide on dialog close. 61 */ 62 private JMenuItem windowMenuItem; 55 63 56 64 /** … … 106 114 107 115 private HelpContentReader reader; 116 117 private static final JosmAction focusAction = new JosmAction(tr("JOSM Help Browser"), "help", "", null, false, false) { 118 @Override 119 public void actionPerformed(ActionEvent e) { 120 HelpBrowser.getInstance().setVisible(true); 121 } 122 }; 108 123 109 124 /** … … 193 208 } else if (!visible && isShowing()){ 194 209 new WindowGeometry(this).remember(getClass().getName() + ".geometry"); 210 } 211 if(windowMenuItem != null && !visible) { 212 Main.main.menu.windowMenu.remove(windowMenuItem); 213 windowMenuItem = null; 214 } 215 if(windowMenuItem == null && visible) { 216 windowMenuItem = MainMenu.add(Main.main.menu.windowMenu, focusAction, MainMenu.WINDOW_MENU_GROUP.VOLATILE); 195 217 } 196 218 super.setVisible(visible);
Note:
See TracChangeset
for help on using the changeset viewer.