Changeset 2140 in josm for trunk/src


Ignore:
Timestamp:
2009-09-15T09:21:02+02:00 (15 years ago)
Author:
stoecker
Message:

fixed preset submenus

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java

    r2017 r2140  
    8181                {
    8282                    JMenu submenu = new JMenu(p);
     83                    submenu.setText(p.getLocaleName());
    8384                    ((TaggingPresetMenu)p).menu = submenu;
    8485                    submenus.put((TaggingPresetMenu)p, submenu);
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java

    r2017 r2140  
    2020    public JMenu menu = null; // set by TaggingPresetPreferences
    2121    public void setDisplayName() {
    22         String n = getName();
    23         putValue(Action.NAME, n);
    24         putValue(SHORT_DESCRIPTION, tr("Preset group ''{0}''", n));
     22        putValue(Action.NAME, getName());
     23        putValue(SHORT_DESCRIPTION, (group != null ?
     24                tr("Preset group ''{0}'' of group ''{1}''", getLocaleName(), group.getName()) :
     25                    tr("Preset group ''{0}''", getLocaleName())));
    2526        putValue("toolbar", "tagginggroup_" + getRawName());
    2627    }
Note: See TracChangeset for help on using the changeset viewer.