aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/apps/cache/navi
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2011-10-24 08:07:35 +0200
committerBananeweizen <bananeweizen@gmx.de>2011-10-24 08:07:35 +0200
commite5efa831a88cab7675b65a3fb596990d88975ee2 (patch)
treea2925262ccd9b3e9999a19b94036b64f3b4faff2 /main/src/cgeo/geocaching/apps/cache/navi
parentc7cdd4a13083094ef9160eacc88137a1befd7a03 (diff)
downloadcgeo-e5efa831a88cab7675b65a3fb596990d88975ee2.zip
cgeo-e5efa831a88cab7675b65a3fb596990d88975ee2.tar.gz
cgeo-e5efa831a88cab7675b65a3fb596990d88975ee2.tar.bz2
new: invoke all other navigation tools from map options menu
Diffstat (limited to 'main/src/cgeo/geocaching/apps/cache/navi')
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
index 15ee464..1ee7c23 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
@@ -1,8 +1,8 @@
package cgeo.geocaching.apps.cache.navi;
+import cgeo.geocaching.Settings;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgGeo;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.cgWaypoint;
import cgeo.geocaching.apps.AbstractAppFactory;
import cgeo.geocaching.geopoint.Geopoint;
@@ -37,11 +37,18 @@ public final class NavigationAppFactory extends AbstractAppFactory {
return apps;
}
- public static void addMenuItems(Menu menu, Activity activity,
- Resources res) {
+ public static void addMenuItems(final Menu menu, final Activity activity,
+ final Resources res) {
+ addMenuItems(menu, activity, res, true);
+ }
+
+ public static void addMenuItems(final Menu menu, final Activity activity,
+ final Resources res, final boolean showInternalMap) {
for (NavigationApp app : getNavigationApps(res)) {
if (app.isInstalled(activity)) {
- menu.add(0, app.getId(), 0, app.getName());
+ if (showInternalMap || !(app instanceof InternalMap)) {
+ menu.add(0, app.getId(), 0, app.getName());
+ }
}
}
}