aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Settings.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2011-10-25 00:44:18 +0200
committerSamuel Tardieu <sam@rfc1149.net>2011-10-25 00:48:07 +0200
commit9b1d6f0bb7badaceb71a4b898b36bdc30ab48a00 (patch)
tree426cb1f074226e72762c5443457f330e3066ec7b /main/src/cgeo/geocaching/Settings.java
parent83ba46de1e195e8c93452b237df4855cfa76ae69 (diff)
downloadcgeo-9b1d6f0bb7badaceb71a4b898b36bdc30ab48a00.zip
cgeo-9b1d6f0bb7badaceb71a4b898b36bdc30ab48a00.tar.gz
cgeo-9b1d6f0bb7badaceb71a4b898b36bdc30ab48a00.tar.bz2
Add separate settings for elevation and vote data
Diffstat (limited to 'main/src/cgeo/geocaching/Settings.java')
-rw-r--r--main/src/cgeo/geocaching/Settings.java25
1 files changed, 20 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/Settings.java b/main/src/cgeo/geocaching/Settings.java
index 6b7d7c4..4da2314 100644
--- a/main/src/cgeo/geocaching/Settings.java
+++ b/main/src/cgeo/geocaching/Settings.java
@@ -45,7 +45,8 @@ public final class Settings {
private static final String KEY_TWITTER_TOKEN_PUBLIC = "tokenpublic";
private static final String KEY_VERSION = "version";
private static final String KEY_LOAD_DESCRIPTION = "autoloaddesc";
- private static final String KEY_ADDITIONAL_DETAILS = "additionaldetails";
+ private static final String KEY_RATING_WANTED = "ratingwanted";
+ private static final String KEY_ELEVATION_WANTED = "elevationwanted";
private static final String KEY_USE_ENGLISH = "useenglish";
private static final String KEY_AS_BROWSER = "asbrowser";
private static final String KEY_USE_COMPASS = "usecompass";
@@ -569,16 +570,30 @@ public final class Settings {
});
}
- public static boolean isAdditionalDetails() {
- return sharedPrefs.getBoolean(KEY_ADDITIONAL_DETAILS, true);
+ public static boolean isRatingWanted() {
+ return sharedPrefs.getBoolean(KEY_RATING_WANTED, true);
}
- public static void setAdditionalDetails(final boolean additionaldetails) {
+ public static void setRatingWanted(final boolean ratingWanted) {
editSharedSettings(new PrefRunnable() {
@Override
public void edit(Editor edit) {
- edit.putBoolean(KEY_ADDITIONAL_DETAILS, additionaldetails);
+ edit.putBoolean(KEY_RATING_WANTED, ratingWanted);
+ }
+ });
+ }
+
+ public static boolean isElevationWanted() {
+ return sharedPrefs.getBoolean(KEY_ELEVATION_WANTED, true);
+ }
+
+ public static void setElevationWanted(final boolean elevationWanted) {
+ editSharedSettings(new PrefRunnable() {
+
+ @Override
+ public void edit(Editor edit) {
+ edit.putBoolean(KEY_ELEVATION_WANTED, elevationWanted);
}
});
}