From 6cba3b0a9ec95436bd10259975112a8b17755e11 Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Wed, 11 Jun 2014 20:49:43 +0200 Subject: fix #3953: have number of caches in deletion confirmation This also renames a number of involved string resources to enforce a new translation which avoids the term "drop" and instead uses "remove". --- main/src/cgeo/geocaching/CacheListActivity.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'main/src') diff --git a/main/src/cgeo/geocaching/CacheListActivity.java b/main/src/cgeo/geocaching/CacheListActivity.java index 0fd3826..92072b6 100644 --- a/main/src/cgeo/geocaching/CacheListActivity.java +++ b/main/src/cgeo/geocaching/CacheListActivity.java @@ -596,7 +596,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA final boolean isNonDefaultList = isConcrete && listId != StoredList.STANDARD_LIST_ID; if (isOffline || type == CacheListType.HISTORY) { // only offline list - setMenuItemLabel(menu, R.id.menu_drop_caches, R.string.caches_drop_selected, R.string.caches_drop_all); + setMenuItemLabel(menu, R.id.menu_drop_caches, R.string.caches_remove_selected, R.string.caches_remove_all); setMenuItemLabel(menu, R.id.menu_refresh_stored, R.string.caches_refresh_selected, R.string.caches_refresh_all); setMenuItemLabel(menu, R.id.menu_move_to_list, R.string.caches_move_selected, R.string.caches_move_all); } else { // search and global list (all other than offline and history) @@ -1144,8 +1144,10 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA } public void dropStored(final boolean removeListAfterwards) { - final int message = (adapter.getCheckedCount() > 0) ? R.string.caches_drop_selected_ask : R.string.caches_drop_all_ask; - Dialogs.confirmYesNo(this, R.string.caches_drop_stored, message, new DialogInterface.OnClickListener() { + final int titleId = (adapter.getCheckedCount() > 0) ? R.string.caches_remove_selected : R.string.caches_remove_all; + final int messageId = (adapter.getCheckedCount() > 0) ? R.string.caches_remove_selected_confirm : R.string.caches_remove_all_confirm; + final String message = getString(messageId, adapter.getCheckedOrAllCount()); + Dialogs.confirmYesNo(this, titleId, message, new DialogInterface.OnClickListener() { @Override public void onClick(final DialogInterface dialog, final int id) { @@ -1277,7 +1279,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA private final boolean removeListAfterwards; public DropDetailsTask(final boolean removeListAfterwards) { - super(CacheListActivity.this, null, res.getString(R.string.caches_drop_progress), true); + super(CacheListActivity.this, null, res.getString(R.string.caches_remove_progress), true); this.removeListAfterwards = removeListAfterwards; } -- cgit v1.1