Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java
r14938 r15650 252 252 null, /* no keyboard shortcut */ 253 253 200, /* the preferred height */ 254 false /* don't show if there is no preference */ 254 false, /* don't show if there is no preference */ 255 null /* no preferences settings */, 256 true /* expert only */ 255 257 ); 256 258 build(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r15649 r15650 231 231 public ToggleDialog(String name, String iconName, String tooltip, Shortcut shortcut, int preferredHeight, boolean defShow, 232 232 Class<? extends PreferenceSetting> prefClass) { 233 this(name, iconName, tooltip, shortcut, preferredHeight, defShow, prefClass, false); 234 } 235 236 /** 237 * Constructor 238 * 239 * @param name the name of the dialog 240 * @param iconName the name of the icon to be displayed 241 * @param tooltip the tool tip 242 * @param shortcut the shortcut 243 * @param preferredHeight the preferred height for the dialog 244 * @param defShow if the dialog should be shown by default, if there is no preference 245 * @param prefClass the preferences settings class, or null if not applicable 246 * @param isExpert {@code true} if this dialog should only be displayed in expert mode 247 * @since 15650 248 */ 249 public ToggleDialog(String name, String iconName, String tooltip, Shortcut shortcut, int preferredHeight, boolean defShow, 250 Class<? extends PreferenceSetting> prefClass, boolean isExpert) { 233 251 super(new BorderLayout()); 234 252 this.preferencePrefix = iconName; … … 257 275 Config.getPref().addPreferenceChangeListener(this); 258 276 259 registerInWindowMenu( );277 registerInWindowMenu(isExpert); 260 278 } 261 279 262 280 /** 263 281 * Registers this dialog in the window menu. Called in the constructor. 264 * @since 10467 265 */ 266 protected void registerInWindowMenu() { 282 * @param isExpert {@code true} if this dialog should only be displayed in expert mode 283 * @since 15650 284 */ 285 protected void registerInWindowMenu(boolean isExpert) { 267 286 windowMenuItem = MainMenu.addWithCheckbox(MainApplication.getMenu().windowMenu, 268 287 (JosmAction) getToggleAction(), 269 WindowMenu.WINDOW_MENU_GROUP.TOGGLE_DIALOG, false, true);288 WindowMenu.WINDOW_MENU_GROUP.TOGGLE_DIALOG, isExpert, true); 270 289 } 271 290 -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityActionTest.java
r14138 r15650 36 36 LayerListModel model = new LayerListDialog(MainApplication.getLayerManager()) { 37 37 @Override 38 protected void registerInWindowMenu( ) {38 protected void registerInWindowMenu(boolean isExpert) { 39 39 // ignore 40 40 }
Note:
See TracChangeset
for help on using the changeset viewer.