Changeset 6742 in josm for trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
- Timestamp:
- 2014-01-19T20:59:05+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r6586 r6742 56 56 57 57 public static final int DEFAULT_SEARCH_HISTORY_SIZE = 15; 58 /** Maximum number of characters before the search expression is shortened for display purposes. */ 59 public static final int MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY = 100; 58 60 59 61 private static final String SEARCH_EXPRESSION = "searchExpression"; … … 321 323 new ToolbarPreferences.ActionDefinition(Main.main.menu.search); 322 324 aDef.getParameters().put(SEARCH_EXPRESSION, initialValues); 323 aDef.setName( initialValues.text); // Display search expression as tooltip instead of generic one325 aDef.setName(Utils.shortenString(initialValues.text, MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY)); // Display search expression as tooltip instead of generic one 324 326 // parametrized action definition is now composed 325 327 ActionParser actionParser = new ToolbarPreferences.ActionParser(null); … … 588 590 if (foundMatches == 0) { 589 591 String msg = null; 592 final String text = Utils.shortenString(s.text, MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY); 590 593 if (s.mode == SearchMode.replace) { 591 msg = tr("No match found for ''{0}''", s.text);594 msg = tr("No match found for ''{0}''", text); 592 595 } else if (s.mode == SearchMode.add) { 593 msg = tr("Nothing added to selection by searching for ''{0}''", s.text);596 msg = tr("Nothing added to selection by searching for ''{0}''", text); 594 597 } else if (s.mode == SearchMode.remove) { 595 msg = tr("Nothing removed from selection by searching for ''{0}''", s.text);598 msg = tr("Nothing removed from selection by searching for ''{0}''", text); 596 599 } else if (s.mode == SearchMode.in_selection) { 597 msg = tr("Nothing found in selection by searching for ''{0}''", s.text);600 msg = tr("Nothing found in selection by searching for ''{0}''", text); 598 601 } 599 602 Main.map.statusLine.setHelpText(msg);
Note:
See TracChangeset
for help on using the changeset viewer.