aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Settings.java
diff options
context:
space:
mode:
authorTorsten Keil <github@torsten-keil.net>2012-02-21 21:50:41 +0100
committerTorsten Keil <github@torsten-keil.net>2012-02-22 00:09:27 +0100
commitf60a64ef2349a1f9fe6933f028f50e146ec958fd (patch)
tree37556ea43fd35d0bdffdb415ea45ad9016db3325 /main/src/cgeo/geocaching/Settings.java
parent009c9575e84379612a710955436f703c7a27bdbc (diff)
downloadcgeo-f60a64ef2349a1f9fe6933f028f50e146ec958fd.zip
cgeo-f60a64ef2349a1f9fe6933f028f50e146ec958fd.tar.gz
cgeo-f60a64ef2349a1f9fe6933f028f50e146ec958fd.tar.bz2
Implementation for #1155 - the second default navigation tool is
introduced
Diffstat (limited to 'main/src/cgeo/geocaching/Settings.java')
-rw-r--r--main/src/cgeo/geocaching/Settings.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/Settings.java b/main/src/cgeo/geocaching/Settings.java
index 4f9a240..af1ad0a 100644
--- a/main/src/cgeo/geocaching/Settings.java
+++ b/main/src/cgeo/geocaching/Settings.java
@@ -76,6 +76,7 @@ public final class Settings {
private static final String KEY_LAST_DETAILS_PAGE = "lastdetailspage";
private static final String KEY_DEBUG_INFORMATIONS = "debuginfos";
private static final String KEY_DEFAULT_NAVIGATION_TOOL = "defaultNavigationTool";
+ private static final String KEY_DEFAULT_NAVIGATION_TOOL_2 = "defaultNavigationTool2";
private final static int unitsMetric = 1;
private final static int unitsImperial = 2;
@@ -999,4 +1000,18 @@ public final class Settings {
}
});
}
+
+ public static int getDefaultNavigationTool2() {
+ return sharedPrefs.getInt(KEY_DEFAULT_NAVIGATION_TOOL_2, 0);
+ }
+
+ public static void setDefaultNavigationTool2(final int defaultNavigationTool) {
+ editSharedSettings(new PrefRunnable() {
+
+ @Override
+ public void edit(Editor edit) {
+ edit.putInt(KEY_DEFAULT_NAVIGATION_TOOL_2, defaultNavigationTool);
+ }
+ });
+ }
}