diff options
author | SammysHP <sven@sammyshp.de> | 2012-04-22 13:19:45 +0200 |
---|---|---|
committer | SammysHP <sven@sammyshp.de> | 2012-04-22 14:01:47 +0200 |
commit | 98d161e71ba38b44c57a4c0dbf78a9759e057935 (patch) | |
tree | c74aea13001c69b5a15453c5a81bde9276901b65 /main | |
parent | 5435ff9037840f4829ca5fbaf7ffbb2189d000d8 (diff) | |
download | cgeo-98d161e71ba38b44c57a4c0dbf78a9759e057935.zip cgeo-98d161e71ba38b44c57a4c0dbf78a9759e057935.tar.gz cgeo-98d161e71ba38b44c57a4c0dbf78a9759e057935.tar.bz2 |
Refactoring: Move import entries to manage submenu
There is only one entry in the overflow submenu. If send2cgeo is configured, there will be two entries. They should be moved to a sub-submenu (e.g. AlertDialog), the string for the title is already present in R.string.gpx_import_title
Diffstat (limited to 'main')
-rw-r--r-- | main/src/cgeo/geocaching/cgeocaches.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/cgeocaches.java b/main/src/cgeo/geocaching/cgeocaches.java index af156d6..197c452 100644 --- a/main/src/cgeo/geocaching/cgeocaches.java +++ b/main/src/cgeo/geocaching/cgeocaches.java @@ -746,14 +746,14 @@ public class cgeocaches extends AbstractListActivity { 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 subMenu.add(0, MENU_MOVE_TO_LIST, 0, res.getString(R.string.cache_menu_move_list)); - subMenu.add(0, MENU_EXPORT, 0, res.getString(R.string.export)); // export caches - if (Settings.getWebDeviceCode() == null) { - menu.add(0, MENU_IMPORT_GPX, 0, res.getString(R.string.gpx_import_title)).setIcon(android.R.drawable.ic_menu_upload); // import gpx file - } else { - SubMenu subMenuImport = menu.addSubMenu(0, SUBMENU_IMPORT, 0, res.getString(R.string.import_title)).setIcon(android.R.drawable.ic_menu_upload); // import - subMenuImport.add(1, MENU_IMPORT_GPX, 0, res.getString(R.string.gpx_import_title)).setCheckable(false).setChecked(false); - subMenuImport.add(1, MENU_IMPORT_WEB, 0, res.getString(R.string.web_import_title)).setCheckable(false).setChecked(false); + + //TODO: add submenu/AlertDialog and use R.string.gpx_import_title + subMenu.add(0, MENU_IMPORT_GPX, 0, res.getString(R.string.gpx_import_title)); + if (Settings.getWebDeviceCode() != null) { + subMenu.add(0, MENU_IMPORT_WEB, 0, res.getString(R.string.web_import_title)); } + + subMenu.add(0, MENU_EXPORT, 0, res.getString(R.string.export)); // export caches } else { if (type == CacheListType.HISTORY) { SubMenu subMenu = menu.addSubMenu(0, SUBMENU_MANAGE_HISTORY, 0, res.getString(R.string.caches_manage)).setIcon(android.R.drawable.ic_menu_save); |