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
|
---|
2 | package org.openstreetmap.josm.gui.preferences;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import javax.swing.JCheckBox;
|
---|
7 | import javax.swing.JSeparator;
|
---|
8 | import javax.swing.SwingConstants;
|
---|
9 |
|
---|
10 | import org.openstreetmap.josm.Main;
|
---|
11 | import 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 | */
|
---|
19 | public 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.