Ticket #11275: josm_patch_multiple_select_more_info.diff
| File josm_patch_multiple_select_more_info.diff, 2.6 KB (added by , 11 years ago) |
|---|
-
src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java
3 3 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; 8 9 import java.awt.Component; … … 50 51 str = (String) value; 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 String temp1=trn("<{0} unset, ", "<{0} unset, " , blank_count, blank_count); 65 String temp2=trn(" {0} other value>", " {0} other values>", other_count, other_count); 66 str=temp1 + temp2; 55 67 c.setFont(c.getFont().deriveFont(Font.ITALIC)); 56 } else { 68 69 } else { // One value: display the value 57 70 final Map.Entry<?, ?> entry = v.entrySet().iterator().next(); 58 71 str = (String) entry.getKey(); 59 72 } -
src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
703 703 } 704 704 705 705 if(tagData.getRowCount() != 0 || membershipData.getRowCount() != 0) { 706 setTitle(tr(" Tags: {0} / Memberships: {1}",707 tagData.getRowCount(), membershipData.getRowCount() ));706 setTitle(tr("Objects: {2} / Tags: {0} / Memberships: {1}", 707 tagData.getRowCount(), membershipData.getRowCount(), newSel.size() )); 708 708 } else { 709 709 setTitle(tr("Tags / Memberships")); 710 710 }
