- Timestamp:
- 2015-04-06T14:18:23+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs/properties
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java
r7937 r8170 4 4 import static org.openstreetmap.josm.tools.I18n.marktr; 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.tools.I18n.trn; 6 7 7 8 import java.awt.Color; … … 51 52 } else if (value instanceof Map<?, ?>) { 52 53 Map<?, ?> v = (Map<?, ?>) value; 53 if (v.size() != 1) { 54 str=tr("<different>"); 54 if (v.size() != 1) { // Multiple values: give user a short summary of the values 55 Integer blank_count; 56 Integer other_count; 57 if (v.get("") == null) { 58 blank_count = 0; 59 other_count = v.size(); 60 } else { 61 blank_count = (Integer)v.get(""); 62 other_count = v.size()-1; 63 } 64 str = "<"; 65 if (other_count == 1) { 66 for (Map.Entry<?, ?> entry : v.entrySet()) { // Find the non-blank value in the map 67 if ( entry.getKey() != "") { 68 str += entry.getValue().toString() + " '" + entry.getKey() + "'"; 69 } 70 } 71 } else { 72 str += tr ("{0} different", other_count); 73 } 74 if(blank_count > 0) { 75 str += trn(", {0} unset", ", {0} unset", blank_count, blank_count); 76 } 77 str += ">"; 55 78 c.setFont(c.getFont().deriveFont(Font.ITALIC)); 56 } else { 79 80 } else { // One value: display the value 57 81 final Map.Entry<?, ?> entry = v.entrySet().iterator().next(); 58 82 str = (String) entry.getKey(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r8061 r8170 704 704 705 705 if(tagData.getRowCount() != 0 || membershipData.getRowCount() != 0) { 706 setTitle(tr("Tags: {0} / Memberships: {1}", 706 if(newSel.size() > 1) { 707 setTitle(tr("Objects: {2} / Tags: {0} / Memberships: {1}", 708 tagData.getRowCount(), membershipData.getRowCount(), newSel.size())); 709 } else { 710 setTitle(tr("Tags: {0} / Memberships: {1}", 707 711 tagData.getRowCount(), membershipData.getRowCount())); 712 } 708 713 } else { 709 714 setTitle(tr("Tags / Memberships"));
Note:
See TracChangeset
for help on using the changeset viewer.