Changeset 19108 in josm for trunk/src/org/openstreetmap/josm/actions/SessionSaveAction.java
- Timestamp:
- 2024-06-17T19:37:02+02:00 (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SessionSaveAction.java
r18942 r19108 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 import static org.openstreetmap.josm.tools.I18n.marktr; 5 6 import static org.openstreetmap.josm.tools.I18n.tr; 6 7 import static org.openstreetmap.josm.tools.I18n.trn; … … 8 9 import java.awt.Component; 9 10 import java.awt.Dimension; 11 import java.awt.GridBagConstraints; 10 12 import java.awt.GridBagLayout; 11 13 import java.awt.event.ActionEvent; … … 84 86 private static final BooleanProperty SAVE_PLUGIN_INFORMATION_PROPERTY = new BooleanProperty("session.saveplugins", false); 85 87 private static final String TOOLTIP_DEFAULT = tr("Save the current session."); 88 private static final String SAVE_SESSION = marktr("Save Session"); 86 89 87 90 protected transient FileFilter joz = new ExtensionFileFilter("joz", "joz", tr("Session file (archive) (*.joz)")); … … 120 123 */ 121 124 protected SessionSaveAction(boolean toolbar, boolean installAdapters) { 122 this(tr( "Save Session"), "session", TOOLTIP_DEFAULT,125 this(tr(SAVE_SESSION), "session", TOOLTIP_DEFAULT, 123 126 Shortcut.registerShortcut("system:savesession", tr("File: {0}", tr("Save Session...")), KeyEvent.VK_S, Shortcut.ALT_CTRL), 124 127 toolbar, "save-session", installAdapters); … … 183 186 .collect(Collectors.toList()); 184 187 185 boolean zipRequired = layersOut.stream().map( l ->exporters.get(l))188 boolean zipRequired = layersOut.stream().map(exporters::get) 186 189 .anyMatch(ex -> ex != null && ex.requiresZip()) || pluginsWantToSave(); 187 190 … … 333 336 334 337 if (zipRequired) { 335 fc = createAndOpenFileChooser(false, false, tr( "Save Session"), joz, JFileChooser.FILES_ONLY, "lastDirectory");338 fc = createAndOpenFileChooser(false, false, tr(SAVE_SESSION), joz, JFileChooser.FILES_ONLY, "lastDirectory"); 336 339 } else { 337 fc = createAndOpenFileChooser(false, false, tr( "Save Session"), Arrays.asList(jos, joz), jos,340 fc = createAndOpenFileChooser(false, false, tr(SAVE_SESSION), Arrays.asList(jos, joz), jos, 338 341 JFileChooser.FILES_ONLY, "lastDirectory"); 339 342 } … … 366 369 */ 367 370 public SessionSaveAsDialog() { 368 super(MainApplication.getMainFrame(), tr( "Save Session"), tr("Save As"), tr("Cancel"));371 super(MainApplication.getMainFrame(), tr(SAVE_SESSION), tr("Save As"), tr("Cancel")); 369 372 configureContextsensitiveHelp("Action/SessionSaveAs", true /* show help button */); 370 373 initialize(); … … 442 445 JPanel wrapper = new JPanel(new GridBagLayout()); 443 446 wrapper.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED)); 444 wrapper.add(exportPanel, GBC.std().fill(G BC.HORIZONTAL));445 ip.add(wrapper, GBC.eol().fill(G BC.HORIZONTAL).insets(2, 2, 4, 2));446 } 447 ip.add(GBC.glue(0, 1), GBC.eol().fill(G BC.VERTICAL));447 wrapper.add(exportPanel, GBC.std().fill(GridBagConstraints.HORIZONTAL)); 448 ip.add(wrapper, GBC.eol().fill(GridBagConstraints.HORIZONTAL).insets(2, 2, 4, 2)); 449 } 450 ip.add(GBC.glue(0, 1), GBC.eol().fill(GridBagConstraints.VERTICAL)); 448 451 JScrollPane sp = new JScrollPane(ip); 449 452 sp.setBorder(BorderFactory.createEmptyBorder()); … … 475 478 p.add(include, GBC.std()); 476 479 p.add(lbl, GBC.std()); 477 p.add(GBC.glue(1, 0), GBC.std().fill(G BC.HORIZONTAL));480 p.add(GBC.glue(1, 0), GBC.std().fill(GridBagConstraints.HORIZONTAL)); 478 481 return p; 479 482 } … … 538 541 * @deprecated since 18833, use {@link #setCurrentSession(File, List, SessionWriter.SessionWriterFlags...)} instead 539 542 */ 540 @Deprecated 543 @Deprecated(since = "18833") 541 544 public static void setCurrentSession(File file, boolean zip, List<Layer> layers) { 542 545 if (zip) {
Note:
See TracChangeset
for help on using the changeset viewer.
