source: josm/trunk/src/org/openstreetmap/josm/gui/preferences/FilePreferences.java@ 1415

Last change on this file since 1415 was 1180, checked in by stoecker, 15 years ago

fixed bug #1871, removed all deprecations

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.gui.preferences;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import javax.swing.JCheckBox;
7import javax.swing.JSeparator;
8import javax.swing.SwingConstants;
9
10import org.openstreetmap.josm.Main;
11import org.openstreetmap.josm.tools.GBC;
12
13/**
14 * Out of pure laziness, I add the file stuff to connection tab.
15 * Feel free to fix this.
16 *
17 * @author imi
18 */
19public class FilePreferences implements PreferenceSetting {
20
21 private JCheckBox keepBackup = new JCheckBox(tr("Keep backup files"));
22
23 public void addGui(PreferenceDialog gui) {
24 gui.connection.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
25 keepBackup.setSelected(Main.pref.getBoolean("save.keepbackup"));
26 keepBackup.setToolTipText(tr("When saving, keep backup files ending with a ~"));
27 gui.connection.add(keepBackup, GBC.eol().insets(20,0,0,0));
28 }
29
30 public boolean ok() {
31 Main.pref.put("save.keepbackup", keepBackup.isSelected());
32 return false;
33 }
34}
Note: See TracBrowser for help on using the repository browser.