shared_string_add_to_favorites (2)

This commit is contained in:
sonora 2015-03-08 23:09:13 +01:00
parent 1af1215948
commit 9c35f7944b
3 changed files with 3 additions and 4 deletions

View file

@ -2039,7 +2039,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="search_address_building_option">Building</string> <string name="search_address_building_option">Building</string>
<string name="search_address_street_option">Intersecting street</string> <string name="search_address_street_option">Intersecting street</string>
<string name="search_tabs_location">Location</string> <string name="search_tabs_location">Location</string>
<string name="context_menu_item_add_favorite">Add to favorites</string>
<string name="context_menu_item_update_map">Update map</string> <string name="context_menu_item_update_map">Update map</string>
<string name="context_menu_item_open_bug">Open OSM bug</string> <string name="context_menu_item_open_bug">Open OSM bug</string>
<string name="context_menu_item_create_poi">Create POI</string> <string name="context_menu_item_create_poi">Create POI</string>

View file

@ -309,7 +309,7 @@ public class MapActivityActions implements DialogProvider {
R.drawable.ic_action_search_light).reg(); R.drawable.ic_action_search_light).reg();
adapter.item(R.string.context_menu_item_share_location).icons( adapter.item(R.string.context_menu_item_share_location).icons(
R.drawable.ic_action_gshare_dark, R.drawable.ic_action_gshare_light).reg(); R.drawable.ic_action_gshare_dark, R.drawable.ic_action_gshare_light).reg();
adapter.item(R.string.context_menu_item_add_favorite).icons( adapter.item(R.string.shared_string_add_to_favorites).icons(
R.drawable.ic_action_fav_dark, R.drawable.ic_action_fav_light ).reg(); R.drawable.ic_action_fav_dark, R.drawable.ic_action_fav_light ).reg();
@ -353,7 +353,7 @@ public class MapActivityActions implements DialogProvider {
} else if (standardId == R.string.context_menu_item_share_location) { } else if (standardId == R.string.context_menu_item_share_location) {
enhance(dialogBundle,latitude,longitude,mapActivity.getMapView().getZoom()); enhance(dialogBundle,latitude,longitude,mapActivity.getMapView().getZoom());
new ShareLocation(mapActivity).run(); new ShareLocation(mapActivity).run();
} else if (standardId == R.string.context_menu_item_add_favorite) { } else if (standardId == R.string.shared_string_add_to_favorites) {
addFavouritePoint(latitude, longitude); addFavouritePoint(latitude, longitude);
} }
} }

View file

@ -482,7 +482,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
public void prepareLocationMenu(final MapActivity mapActivity, ContextMenuAdapter adapter) { public void prepareLocationMenu(final MapActivity mapActivity, ContextMenuAdapter adapter) {
filter(adapter, R.string.context_menu_item_directions_to, filter(adapter, R.string.context_menu_item_directions_to,
R.string.context_menu_item_destination_point, R.string.context_menu_item_search, R.string.context_menu_item_destination_point, R.string.context_menu_item_search,
R.string.context_menu_item_share_location/*, R.string.context_menu_item_add_favorite*/); R.string.context_menu_item_share_location/*, R.string.shared_string_add_to_favorites*/);
MapActivityLayers layers = mapActivity.getMapLayers(); MapActivityLayers layers = mapActivity.getMapLayers();
if(layers.getContextMenuLayer().getFirstSelectedObject() instanceof StageFavorite) { if(layers.getContextMenuLayer().getFirstSelectedObject() instanceof StageFavorite) {
final StageFavorite sf = ((StageFavorite)layers.getContextMenuLayer().getFirstSelectedObject()); final StageFavorite sf = ((StageFavorite)layers.getContextMenuLayer().getFirstSelectedObject());