aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-06-01 17:20:20 +0200
committerBananeweizen <bananeweizen@gmx.de>2014-06-01 17:20:20 +0200
commit8d9881707c31de1da357081701a40fe013b0f2fa (patch)
treeba75b68e8b7e00b3bd2a02a4432d163043a0f042 /main/src
parent13293f786a31bb664fe3509c108805edb327363c (diff)
downloadcgeo-8d9881707c31de1da357081701a40fe013b0f2fa.zip
cgeo-8d9881707c31de1da357081701a40fe013b0f2fa.tar.gz
cgeo-8d9881707c31de1da357081701a40fe013b0f2fa.tar.bz2
convert map settings to checkbox based menus
This avoids the confusion that is always connected with label changing menu items (Is the label showing the current state or the state that I get when clicking?)
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index 87d5366..15b2667 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -645,11 +645,7 @@ public class CGeoMap extends AbstractMap implements ViewFactory {
try {
MenuItem item = menu.findItem(R.id.menu_trail_mode);
- if (Settings.isMapTrail()) {
- item.setTitle(res.getString(R.string.map_trail_hide));
- } else {
- item.setTitle(res.getString(R.string.map_trail_show));
- }
+ item.setChecked(Settings.isMapTrail());
item = menu.findItem(R.id.menu_map_live); // live map
if (isLiveEnabled) {
@@ -659,21 +655,13 @@ public class CGeoMap extends AbstractMap implements ViewFactory {
}
item = menu.findItem(R.id.menu_mycaches_mode); // own & found caches
- if (Settings.isExcludeMyCaches()) {
- item.setTitle(res.getString(R.string.map_mycaches_show));
- } else {
- item.setTitle(res.getString(R.string.map_mycaches_hide));
- }
+ item.setChecked(Settings.isExcludeMyCaches());
final Set<String> geocodesInViewport = getGeocodesForCachesInViewport();
menu.findItem(R.id.menu_store_caches).setVisible(!isLoading() && CollectionUtils.isNotEmpty(geocodesInViewport) && new SearchResult(geocodesInViewport).hasUnsavedCaches());
item = menu.findItem(R.id.menu_circle_mode); // show circles
- if (overlayCaches != null && overlayCaches.getCircles()) {
- item.setTitle(res.getString(R.string.map_circles_hide));
- } else {
- item.setTitle(res.getString(R.string.map_circles_show));
- }
+ item.setChecked(overlayCaches != null && overlayCaches.getCircles());
item = menu.findItem(R.id.menu_theme_mode); // show theme selection
item.setVisible(mapView.hasMapThemes());