Changeset 9917 in josm
- Timestamp:
- 2016-03-03T23:06:36+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r9136 r9917 85 85 ) 86 86 }; 87 int ret= HelpAwareOptionPane.showOptionDialog(87 return 0 == HelpAwareOptionPane.showOptionDialog( 88 88 Main.parent, 89 89 msg, … … 95 95 HelpUtil.ht("/WarningMessages#ToManyBrowsersToOpen") 96 96 ); 97 return ret == 0;98 97 } 99 98 -
trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
r9230 r9917 78 78 ) 79 79 }; 80 int ret= HelpAwareOptionPane.showOptionDialog(80 return 0 == HelpAwareOptionPane.showOptionDialog( 81 81 Main.parent, 82 82 tr( … … 91 91 HelpUtil.ht("/Action/SimplifyWay#ConfirmSimplifyAll") 92 92 ); 93 return ret == 0;94 93 } 95 94 -
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r9512 r9917 6 6 import java.awt.Component; 7 7 import java.awt.Dialog.ModalityType; 8 import java.awt.GraphicsEnvironment; 8 9 import java.awt.event.ActionEvent; 9 10 import java.awt.event.KeyEvent; … … 241 242 ); 242 243 244 if (!GraphicsEnvironment.isHeadless()) { 245 doShowOptionDialog(parentComponent, title, options, defaultOption, helpTopic, buttons, pane); 246 } 247 return (Integer) pane.getValue(); 248 } 249 250 private static void doShowOptionDialog(Component parentComponent, String title, final ButtonSpec[] options, 251 final ButtonSpec defaultOption, final String helpTopic, final List<JButton> buttons, 252 final JOptionPane pane) { 243 253 final JDialog dialog = new JDialog( 244 254 JOptionPane.getFrameForComponent(parentComponent), … … 302 312 } 303 313 dialog.setVisible(true); 304 return (Integer) pane.getValue();305 314 } 306 315 -
trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java
r9246 r9917 243 243 options[0], 244 244 "/Action/Upload#NodeStillInUseInWay" 245 );245 ); 246 246 if (ret == 0) { 247 247 DownloadReferrersAction.downloadReferrers(Main.main.getEditLayer(), Arrays.asList(conflict.a)); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java
r9804 r9917 5 5 6 6 import java.awt.Dimension; 7 import java.awt.GraphicsEnvironment;8 7 import java.awt.GridBagLayout; 9 8 … … 186 185 }); 187 186 188 int ret = 0; 189 if (!GraphicsEnvironment.isHeadless()) { 190 ret = HelpAwareOptionPane.showOptionDialog(Main.parent, this, title, 187 int ret = HelpAwareOptionPane.showOptionDialog(Main.parent, this, title, 191 188 JOptionPane.QUESTION_MESSAGE, null, options, options[0], helpTopic); 192 }193 189 if (0 == ret) { 194 190 rememberSettings(); -
trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java
r9355 r9917 171 171 ) 172 172 }; 173 int ret= HelpAwareOptionPane.showOptionDialog(173 return 0 == HelpAwareOptionPane.showOptionDialog( 174 174 this, 175 175 tr( … … 184 184 HelpUtil.ht("/Dialog/OAuthAuthorisationWizard") 185 185 ); 186 187 return ret == 0; // OK button clicked188 186 } 189 187 -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r9870 r9917 8 8 import java.awt.Component; 9 9 import java.awt.Font; 10 import java.awt.GraphicsEnvironment;11 10 import java.awt.GridBagConstraints; 12 11 import java.awt.GridBagLayout; … … 856 855 plugins.size())) 857 856 .append("</html>"); 858 if (!GraphicsEnvironment.isHeadless()) { 859 HelpAwareOptionPane.showOptionDialog( 860 parent, 861 sb.toString(), 862 tr("Warning"), 863 JOptionPane.WARNING_MESSAGE, 864 HelpUtil.ht("/Plugin/Loading#MissingPluginInfos") 865 ); 866 } 857 HelpAwareOptionPane.showOptionDialog( 858 parent, 859 sb.toString(), 860 tr("Warning"), 861 JOptionPane.WARNING_MESSAGE, 862 HelpUtil.ht("/Plugin/Loading#MissingPluginInfos") 863 ); 867 864 } 868 865 … … 1109 1106 ) 1110 1107 }; 1111 int ret = -1; 1112 if (!GraphicsEnvironment.isHeadless()) { 1113 ret = HelpAwareOptionPane.showOptionDialog( 1108 return 0 == HelpAwareOptionPane.showOptionDialog( 1114 1109 parent, 1115 1110 reason, … … 1121 1116 null // FIXME: add help topic 1122 1117 ); 1123 }1124 return ret == 0;1125 1118 } 1126 1119
Note:
See TracChangeset
for help on using the changeset viewer.