aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgeocaches.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2012-04-25 06:39:06 +0200
committerBananeweizen <bananeweizen@gmx.de>2012-04-25 06:39:06 +0200
commit983133b0d9fe008a3f74a592a43f91b133db03e7 (patch)
tree2104e8551256c19f41973ec7b1c20c33f059ec81 /main/src/cgeo/geocaching/cgeocaches.java
parentfaa78bfcdaadf15aa9760fb3da43e61208fffde5 (diff)
downloadcgeo-983133b0d9fe008a3f74a592a43f91b133db03e7.zip
cgeo-983133b0d9fe008a3f74a592a43f91b133db03e7.tar.gz
cgeo-983133b0d9fe008a3f74a592a43f91b133db03e7.tar.bz2
fix #1442: re-enable import menu item for empty lists
Diffstat (limited to 'main/src/cgeo/geocaching/cgeocaches.java')
-rw-r--r--main/src/cgeo/geocaching/cgeocaches.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/cgeocaches.java b/main/src/cgeo/geocaching/cgeocaches.java
index 86ebaca..6e62e09 100644
--- a/main/src/cgeo/geocaching/cgeocaches.java
+++ b/main/src/cgeo/geocaching/cgeocaches.java
@@ -801,11 +801,16 @@ public class cgeocaches extends AbstractListActivity {
// Hide menus if cache-list is empty
int[] hideIfEmptyList = new int[] {
MENU_SWITCH_SELECT_MODE,
- SUBMENU_MANAGE_OFFLINE,
SUBMENU_MANAGE_HISTORY,
SUBMENU_SHOW_MAP,
SUBMENU_SORT,
- MENU_REFRESH_STORED };
+ MENU_REFRESH_STORED,
+ MENU_DROP_CACHES,
+ MENU_DROP_CACHES_AND_LIST,
+ MENU_MOVE_TO_LIST,
+ MENU_EXPORT,
+ MENU_REMOVE_FROM_HISTORY
+ };
boolean menuVisible = cacheList.size() > 0;
for (int itemId : hideIfEmptyList) {
@@ -835,7 +840,7 @@ public class cgeocaches extends AbstractListActivity {
}
item = menu.findItem(MENU_MOVE_TO_LIST);
if (item != null) {
- item.setVisible(multipleLists);
+ item.setVisible(multipleLists && cacheList.size() > 0);
}
setMenuItemLabel(menu, MENU_REMOVE_FROM_HISTORY, R.string.cache_remove_from_history, R.string.cache_clear_history);