Ticket #3961: josm-help-search.patch

File josm-help-search.patch, 1.2 KB (added by avarab@…, 15 years ago)

Add Help to search dialog

  • src/org/openstreetmap/josm/actions/search/SearchAction.java

     
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    22package org.openstreetmap.josm.actions.search;
    33
     4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    45import static org.openstreetmap.josm.tools.I18n.tr;
    56
    67import java.awt.Font;
     
    4647    public SearchAction() {
    4748        super(tr("Search..."), "dialogs/search", tr("Search for objects."),
    4849                Shortcut.registerShortcut("system:find", tr("Search..."), KeyEvent.VK_F, Shortcut.GROUP_HOTKEY), true);
     50        putValue("help", ht("/Action/Search"));
    4951    }
    5052
    5153    public void actionPerformed(ActionEvent e) {
     
    149151                            tr("Cancel")}
    150152        );
    151153        dialog.setButtonIcons(new String[] {"dialogs/search.png", "cancel.png"});
     154        dialog.configureContextsensitiveHelp("/Action/Search", true /* show help button */);
    152155        dialog.setContent(p);
    153156        dialog.showDialog();
    154157        int result = dialog.getValue();