From 5b031c603d06ffe4a545f738fc8343cc42924007 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Wed, 4 Nov 2015 15:38:06 +0300 Subject: [PATCH 1/3] Parking, favs, target context menu fixes --- OsmAnd/res/layout/point_editor_fragment.xml | 3 +++ .../ParkingPositionMenuController.java | 3 ++- .../TargetPointMenuController.java | 3 ++- .../parkingpoint/ParkingPositionPlugin.java | 21 +++++++++++++------ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/OsmAnd/res/layout/point_editor_fragment.xml b/OsmAnd/res/layout/point_editor_fragment.xml index 47b7bb7868..39d511e1ce 100644 --- a/OsmAnd/res/layout/point_editor_fragment.xml +++ b/OsmAnd/res/layout/point_editor_fragment.xml @@ -29,6 +29,9 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="right" + android:drawableLeft="@drawable/ic_action_done" + android:paddingLeft="10dp" + android:paddingRight="10dp" android:background="@android:color/transparent" android:text="@string/shared_string_save"/> diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ParkingPositionMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ParkingPositionMenuController.java index c974bda33c..d901221df1 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ParkingPositionMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ParkingPositionMenuController.java @@ -39,7 +39,8 @@ public class ParkingPositionMenuController extends MenuController { } } }; - leftTitleButtonController.caption = getMapActivity().getString(R.string.osmand_parking_delete); + leftTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_delete); + leftTitleButtonController.leftIconId = R.drawable.ic_action_delete_dark; } @Override diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TargetPointMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TargetPointMenuController.java index 908a7c6bf6..ddc0b534d5 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TargetPointMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TargetPointMenuController.java @@ -30,7 +30,8 @@ public class TargetPointMenuController extends MenuController { getMapActivity().getContextMenu().close(); } }; - leftTitleButtonController.caption = getMapActivity().getString(R.string.delete_target_point); + leftTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_delete); + leftTitleButtonController.leftIconId = R.drawable.ic_action_delete_dark; } @Override diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java index 7db5e4925e..0cddf2ae78 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java @@ -298,10 +298,7 @@ public class ParkingPositionPlugin extends OsmandPlugin { @Override public void onClick(DialogInterface dialog, int which) { showDeleteEventWarning(activity); - if (parkingLayer != null) { - parkingLayer.refresh(); - } - clearParkingPosition(); + cancelParking(); if (activity instanceof MapActivity) { ((MapActivity) activity).getContextMenu().close(); } @@ -323,7 +320,12 @@ public class ParkingPositionPlugin extends OsmandPlugin { Builder setTime = new AlertDialog.Builder(mapActivity); setTime.setView(setTimeParking); setTime.setTitle(mapActivity.getString(R.string.osmand_parking_time_limit_title)); - setTime.setNegativeButton(R.string.shared_string_cancel, null); + setTime.setNegativeButton(R.string.shared_string_cancel, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + cancelParking(); + } + }); final TextView textView = (TextView) setTimeParking.findViewById(R.id.parkTime); final TimePicker timePicker = (TimePicker) setTimeParking.findViewById(R.id.parking_time_picker); @@ -433,7 +435,14 @@ public class ParkingPositionPlugin extends OsmandPlugin { parkingLayer.refresh(); } } - + + private void cancelParking() { + if (parkingLayer != null) { + parkingLayer.refresh(); + } + clearParkingPosition(); + } + @Override public void registerOptionsMenuItems(final MapActivity mapActivity, ContextMenuAdapter helper) { } From 2aa362db5a0be19f7a65868e407f4a82cae222cd Mon Sep 17 00:00:00 2001 From: jan madsen Date: Wed, 4 Nov 2015 09:10:27 +0100 Subject: [PATCH 2/3] Translated using Weblate (Danish) Currently translated at 100.0% (1804 of 1804 strings) --- OsmAnd/res/values-da/strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index a631050f41..540a258285 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -2003,4 +2003,5 @@ Oprettede OSM IP Oprettede OSM fejlregistrering Signaturforklaring - +Overfør + From a1aae8fd03f5fd2bf87a16903721dd959bbfc44f Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Tue, 3 Nov 2015 17:04:45 +0100 Subject: [PATCH 3/3] Translated using Weblate (Chinese (Taiwan)) Currently translated at 100.0% (1804 of 1804 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 4153c92a7c..1219a40496 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -1961,4 +1961,5 @@ 建立 OSM 的興趣點 建立 OSM 的錯誤 地圖圖例 - +上傳 +