From d5af85bde9a7af6b5ceef86c930eae524c7d0ef5 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 1 Jun 2012 19:42:43 +0200 Subject: Fix #1702: do not allow refreshing the "all caches" list Not only refreshing the "all caches" list may cause performance problems if the list is large, but also it moves the cache to a real (non-virtual) list with the same id as the "all caches" list. --- main/src/cgeo/geocaching/cgeocaches.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/main/src/cgeo/geocaching/cgeocaches.java b/main/src/cgeo/geocaching/cgeocaches.java index 9d6c9d8..08de15e 100644 --- a/main/src/cgeo/geocaching/cgeocaches.java +++ b/main/src/cgeo/geocaching/cgeocaches.java @@ -741,7 +741,9 @@ public class cgeocaches extends AbstractListActivity { SubMenu subMenu = menu.addSubMenu(0, SUBMENU_MANAGE_OFFLINE, 0, res.getString(R.string.caches_manage)).setIcon(R.drawable.ic_menu_save); subMenu.add(0, MENU_DROP_CACHES, 0, res.getString(R.string.caches_drop_all)); // delete saved caches subMenu.add(0, MENU_DROP_CACHES_AND_LIST, 0, res.getString(R.string.caches_drop_all_and_list)); - subMenu.add(0, MENU_REFRESH_STORED, 0, res.getString(R.string.cache_offline_refresh)); // download details for all caches + if (listId != StoredList.ALL_LIST_ID) { + subMenu.add(0, MENU_REFRESH_STORED, 0, res.getString(R.string.cache_offline_refresh)); // download details for all caches + } subMenu.add(0, MENU_MOVE_TO_LIST, 0, res.getString(R.string.cache_menu_move_list)); //TODO: add submenu/AlertDialog and use R.string.gpx_import_title @@ -757,7 +759,9 @@ public class cgeocaches extends AbstractListActivity { subMenu.add(0, MENU_REMOVE_FROM_HISTORY, 0, res.getString(R.string.cache_clear_history)); // remove from history subMenu.add(0, MENU_EXPORT, 0, res.getString(R.string.export)); // export caches } - menu.add(0, MENU_REFRESH_STORED, 0, res.getString(R.string.caches_store_offline)).setIcon(R.drawable.ic_menu_set_as); // download details for all caches + if (listId != StoredList.ALL_LIST_ID) { + menu.add(0, MENU_REFRESH_STORED, 0, res.getString(R.string.caches_store_offline)).setIcon(R.drawable.ic_menu_set_as); // download details for all caches + } } navigationMenu = CacheListAppFactory.addMenuItems(menu, this, res); @@ -820,9 +824,11 @@ public class cgeocaches extends AbstractListActivity { if (type == CacheListType.OFFLINE) { // only offline list setMenuItemLabel(menu, MENU_DROP_CACHES, R.string.caches_drop_selected, R.string.caches_drop_all); menu.findItem(MENU_DROP_CACHES_AND_LIST).setVisible(!hasSelection && isNonDefaultList && !adapter.isFiltered()); - setMenuItemLabel(menu, MENU_REFRESH_STORED, R.string.caches_refresh_selected, R.string.caches_refresh_all); + if (listId != StoredList.ALL_LIST_ID) { + setMenuItemLabel(menu, MENU_REFRESH_STORED, R.string.caches_refresh_selected, R.string.caches_refresh_all); + } setMenuItemLabel(menu, MENU_MOVE_TO_LIST, R.string.caches_move_selected, R.string.caches_move_all); - } else { // search and history list (all other than offline) + } else if (listId != StoredList.ALL_LIST_ID) { // search and history list (all other than offline) setMenuItemLabel(menu, MENU_REFRESH_STORED, R.string.caches_store_selected, R.string.caches_store_offline); } -- cgit v1.1 From 9f7090ef8ca712cd6734602f8e5e22b84a18860a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kunc?= Date: Fri, 1 Jun 2012 19:31:00 +0200 Subject: Fix #1699: give resources to the "unknown" attribute --- main/res/values/strings.xml | 3 +++ main/src/cgeo/geocaching/enumerations/CacheAttribute.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml index 122ab01..7304a9e 100644 --- a/main/res/values/strings.xml +++ b/main/res/values/strings.xml @@ -824,6 +824,9 @@ Creating Field Notes… GPX + + Unknown attribute present + Unknown attribute not present Dogs allowed Dogs not allowed diff --git a/main/src/cgeo/geocaching/enumerations/CacheAttribute.java b/main/src/cgeo/geocaching/enumerations/CacheAttribute.java index 4a502fb..6456f71 100644 --- a/main/src/cgeo/geocaching/enumerations/CacheAttribute.java +++ b/main/src/cgeo/geocaching/enumerations/CacheAttribute.java @@ -11,7 +11,7 @@ import java.util.Map; public enum CacheAttribute { - UNKNOWN(0, "", R.drawable.attribute__strikethru, 0, 0), + UNKNOWN(0, "unknown", R.drawable.attribute__strikethru, R.string.attribute_unknown_yes, R.string.attribute_unknown_no), DOGS(1, "dogs", R.drawable.attribute_dogs, R.string.attribute_dogs_yes, R.string.attribute_dogs_no), FEE(2, "fee", R.drawable.attribute_fee, R.string.attribute_fee_yes, R.string.attribute_fee_no), RAPPELLING(3, "rappelling", R.drawable.attribute_rappelling, R.string.attribute_rappelling_yes, R.string.attribute_rappelling_no), -- cgit v1.1 From 0294c2133e833bd1741d34ce47653aad2714b2e6 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 1 Jun 2012 19:57:56 +0200 Subject: Add French translation for issue #1699 fix --- main/res/values-fr/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/res/values-fr/strings.xml b/main/res/values-fr/strings.xml index 964e924..2e44468 100644 --- a/main/res/values-fr/strings.xml +++ b/main/res/values-fr/strings.xml @@ -800,6 +800,9 @@ Création des notes de terrain… GPX + + Attribut inconnu + Attribut inconnu négatif Chiens autorisés Chiens interdits -- cgit v1.1 From 32baf729157be6eaee4f50014147d22c46691f52 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 1 Jun 2012 19:58:38 +0200 Subject: Update bugfixes description --- main/res/values/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml index 7304a9e..f0ae0c3 100644 --- a/main/res/values/strings.xml +++ b/main/res/values/strings.xml @@ -1061,6 +1061,10 @@ \n + Next maintenance release\n\n + Bugfixing:\n + · Do not crash when exporting GPX with unknown attribute\n + · Do not allow refresh of the virtual "all caches" list\n\n\n 2012.06.01\n\n New Features/Functions:\n · Add/remove cache to/from Favorites\n -- cgit v1.1