Ignore:
Timestamp:
2009-10-11T21:15:33+02:00 (17 years ago)
Author:
Gubaer
Message:

Improved help browser layout (now uses custom CSS shipped with JOSM)
Help browser now in separate process, not blocked any more when invoked from modal dialogs in JOSM
Added standard browser actions (home, prev, next) etc.
Added help support for conflict resolution

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/ExitAction.java

    r2025 r2274  
    2727        if (Main.saveUnsavedModifications()) {
    2828            Main.saveGuiGeometry();
     29            Main.cleanupBeforeExit();
    2930            System.exit(0);
    3031        }
  • trunk/src/org/openstreetmap/josm/actions/HelpAction.java

    r2252 r2274  
    1616
    1717import org.openstreetmap.josm.Main;
    18 import org.openstreetmap.josm.gui.help.HelpBrowser;
     18import org.openstreetmap.josm.gui.help.HelpBrowserProxy;
    1919import org.openstreetmap.josm.gui.help.Helpful;
    2020import org.openstreetmap.josm.tools.ImageProvider;
     
    2727public class HelpAction extends AbstractAction {
    2828
    29     private HelpBrowser helpBrowser;
    3029
    3130    private String pathhelp = Main.pref.get("help.pathhelp", "Help/");
     
    3433    public HelpAction() {
    3534        super(tr("Help"), ImageProvider.get("help"));
    36         this.helpBrowser = new HelpBrowser();
    3735    }
    3836
     
    4341                Component c = SwingUtilities.getRoot((Component)e.getSource());
    4442                Point mouse = c.getMousePosition();
    45                 c = SwingUtilities.getDeepestComponentAt(c, mouse.x, mouse.y);
    46                 topic = contextSensitiveHelp(c);
     43                if (mouse != null) {
     44                    c = SwingUtilities.getDeepestComponentAt(c, mouse.x, mouse.y);
     45                    topic = contextSensitiveHelp(c);
     46                } else {
     47                    topic = null;
     48                }
    4749            } else {
    4850                Point mouse = Main.parent.getMousePosition();
     
    5052            }
    5153            if (topic == null) {
    52                 helpBrowser.setVisible(false);
    53                 helpBrowser.setUrlForHelpTopic("Help");
     54                HelpBrowserProxy.getInstance().setUrlForHelpTopic("Help");
    5455            } else {
    5556                help(topic);
    5657            }
    5758        } else {
    58             helpBrowser.setVisible(false);
    59             helpBrowser.setUrlForHelpTopic("Help");
     59            HelpBrowserProxy.getInstance().setUrlForHelpTopic("Help");
    6060        }
    6161    }
     
    9595     */
    9696    public void help(String topic) {
    97         helpBrowser.setVisible(false);
    98         helpBrowser.setUrlForHelpTopic(pathhelp + topic);
     97        HelpBrowserProxy.getInstance().setUrlForHelpTopic(pathhelp + topic);
    9998    }
    10099}
  • trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java

    r2034 r2274  
    1313
    1414    public HistoryInfoAction() {
    15         super(tr("History of Element"), "about",
     15        super(tr("Object history"), "about",
    1616                tr("Display history information about OSM ways, nodes, or relations."),
    1717                Shortcut.registerShortcut("core:history",
    18                         tr("History of Element"), KeyEvent.VK_H, Shortcut.GROUP_HOTKEY), true);
     18                        tr("Object history"), KeyEvent.VK_H, Shortcut.GROUP_HOTKEY), true);
    1919    }
    2020
Note: See TracChangeset for help on using the changeset viewer.