Changeset 16529 in josm
- Timestamp:
- 2020-05-31T17:09:04+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DrawBoundariesOfDownloadedDataAction.java
r16509 r16529 22 22 super(tr("Draw boundaries of downloaded data"), 23 23 tr("Enable/disable hatched background rendering of areas outside of the downloaded areas."), 24 DrawingPreference.SOURCE_BOUNDS_PROP.getKey(), 25 DrawingPreference.SOURCE_BOUNDS_PROP.getDefaultValue() 24 DrawingPreference.SOURCE_BOUNDS_PROP 26 25 ); 27 26 } -
trunk/src/org/openstreetmap/josm/actions/PreferenceToggleAction.java
r16138 r16529 26 26 * @param name the (translated) title 27 27 * @param tooltip tooltip text 28 * @param prefKey the preference key to toggle 29 * @param prefDefault default value for the preference entry 28 * @param pref the preference to toggle 30 29 */ 31 public PreferenceToggleAction(String name, String tooltip, String prefKey, boolean prefDefault) {30 public PreferenceToggleAction(String name, String tooltip, BooleanProperty pref) { 32 31 super(name, null, tooltip, null, false); 33 setToolbarId("toggle-" + pref Key);34 this.pref = new BooleanProperty(prefKey, prefDefault);32 setToolbarId("toggle-" + pref.getKey()); 33 this.pref = pref; 35 34 checkbox = new JCheckBoxMenuItem(this); 36 35 checkbox.setSelected(pref.get()); 37 Preferences.main().addWeakKeyPreferenceChangeListener(pref Key, this);36 Preferences.main().addWeakKeyPreferenceChangeListener(pref.getKey(), this); 38 37 } 39 38 -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r16528 r16529 823 823 viewMenu.add(new PreferenceToggleAction(tr("Main toolbar"), 824 824 tr("Toggles the visibility of the main toolbar (i.e., the horizontal toolbar)"), 825 MapFrame.TOOLBAR_VISIBLE .getKey(), MapFrame.TOOLBAR_VISIBLE.getDefaultValue()).getCheckbox());825 MapFrame.TOOLBAR_VISIBLE).getCheckbox()); 826 826 viewMenu.add(new PreferenceToggleAction(tr("Edit toolbar"), 827 827 tr("Toggles the visibility of the edit toolbar (i.e., the vertical tool)"), 828 MapFrame.SIDE_TOOLBAR_VISIBLE .getKey(), MapFrame.SIDE_TOOLBAR_VISIBLE.getDefaultValue()).getCheckbox());828 MapFrame.SIDE_TOOLBAR_VISIBLE).getCheckbox()); 829 829 // -- dialogs panel toggle action 830 830 final JCheckBoxMenuItem dialogsToggle = new JCheckBoxMenuItem(dialogsToggleAction);
Note:
See TracChangeset
for help on using the changeset viewer.