diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-06-11 20:49:43 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-06-11 20:49:43 +0200 |
| commit | 6cba3b0a9ec95436bd10259975112a8b17755e11 (patch) | |
| tree | 8e86b62e26f24dc51d5d79cb2cec64f57a62482e /main/src | |
| parent | 4f3d5b3ff7a0ae80940fd12a345dee745e404ed8 (diff) | |
| download | cgeo-6cba3b0a9ec95436bd10259975112a8b17755e11.zip cgeo-6cba3b0a9ec95436bd10259975112a8b17755e11.tar.gz cgeo-6cba3b0a9ec95436bd10259975112a8b17755e11.tar.bz2 | |
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".
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/CacheListActivity.java | 10 |
1 files changed, 6 insertions, 4 deletions
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; } |
