diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2015-01-02 15:08:32 +0100 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2015-01-02 15:08:32 +0100 |
commit | 79ef4ea0291294e6f2935a92362ef5eb2c4e386d (patch) | |
tree | 8dc050f189098b9834e298566363ab90787ec6af /main | |
parent | 765033b28ddc32cfd74be9b9cf0466e6e0de5db8 (diff) | |
download | cgeo-79ef4ea0291294e6f2935a92362ef5eb2c4e386d.zip cgeo-79ef4ea0291294e6f2935a92362ef5eb2c4e386d.tar.gz cgeo-79ef4ea0291294e6f2935a92362ef5eb2c4e386d.tar.bz2 |
Do not use toasts for non-existing possibilities
Diffstat (limited to 'main')
-rw-r--r-- | main/res/values/strings.xml | 1 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/LogTrackableActivity.java | 8 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/StaticMapsActivity.java | 2 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/WaypointPopupFragment.java | 1 |
4 files changed, 3 insertions, 9 deletions
diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml index 3a40a18..df7c7bd 100644 --- a/main/res/values/strings.xml +++ b/main/res/values/strings.xml @@ -177,7 +177,6 @@ <string name="err_acquire_image_failed">Acquiring an image failed.</string> <string name="err_tb_display">c:geo can\'t display the trackable you want. Is it really a trackable?</string> <string name="err_tb_details_open">c:geo can\'t open trackable details.</string> - <string name="err_tb_forgot_saw">c:geo forgot which trackable you saw.</string> <string name="err_tb_find">c:geo can\'t find trackable</string> <string name="err_tb_find_that">c:geo can\'t find that trackable.</string> <string name="err_waypoint_cache_unknown">c:geo doesn\'t know to which cache you want to add a waypoint for.</string> diff --git a/main/src/cgeo/geocaching/LogTrackableActivity.java b/main/src/cgeo/geocaching/LogTrackableActivity.java index 15a1eef..fc4a066 100644 --- a/main/src/cgeo/geocaching/LogTrackableActivity.java +++ b/main/src/cgeo/geocaching/LogTrackableActivity.java @@ -137,8 +137,7 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat trackable = DataStore.loadTrackable(geocode); if (trackable == null) { - showToast(res.getString(R.string.err_tb_forgot_saw)); - + Log.e("LogTrackableActivity.onCreate: cannot load trackable " + geocode); finish(); return; } @@ -256,11 +255,6 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat public LoadDataThread() { super("Load data for logging trackable"); - if (guid == null) { - showToast(res.getString(R.string.err_tb_forgot_saw)); - - finish(); - } } @Override diff --git a/main/src/cgeo/geocaching/StaticMapsActivity.java b/main/src/cgeo/geocaching/StaticMapsActivity.java index 8d6148b..be363f0 100644 --- a/main/src/cgeo/geocaching/StaticMapsActivity.java +++ b/main/src/cgeo/geocaching/StaticMapsActivity.java @@ -94,7 +94,7 @@ public class StaticMapsActivity extends AbstractActionBarActivity { cache = DataStore.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB); if (cache == null) { - showToast("Sorry, c:geo forgot for what cache you want to load static maps."); + Log.e("StaticMapsActivity.onCreate: cannot find the cache " + geocode); finish(); return; } diff --git a/main/src/cgeo/geocaching/WaypointPopupFragment.java b/main/src/cgeo/geocaching/WaypointPopupFragment.java index 5a376aa..227e30d 100644 --- a/main/src/cgeo/geocaching/WaypointPopupFragment.java +++ b/main/src/cgeo/geocaching/WaypointPopupFragment.java @@ -64,6 +64,7 @@ public class WaypointPopupFragment extends AbstractDialogFragment { if (waypoint == null) { Log.e("WaypointPopupFragment.init: unable to get waypoint " + waypointId); getActivity().finish(); + return; } try { |