Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-07-12 01:52:25 +02:00
commit 1bc833f096
5 changed files with 21 additions and 13 deletions

3
OsmAnd/.gitignore vendored
View file

@ -11,4 +11,5 @@ jni/Local.mk
out/
use/
osmand.properties
osmand.xml
osmand.xml
src/help

View file

@ -34,6 +34,12 @@
<include name="*.xml"/>
</fileset>
</copy>
<copy todir="${src.absolute.dir}/help/">
<fileset dir="../../help/" >
<include name="*.html"/>
<include name="screens/**/*.png"/>
</fileset>
</copy>
<copy todir="${src.absolute.dir}/net/osmand/render/">
<fileset dir="../../resources/rendering_styles/" >
<include name="*.xml"/>

View file

@ -170,7 +170,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
MapInfoLayer layer = activity.getMapLayers().getMapInfoLayer();
osmoControl = createOsMoControl(activity, layer.getPaintText(), layer.getPaintSubText());
layer.getMapInfoControls().registerSideWidget(osmoControl,
R.drawable.mon_osmo_conn_big, R.string.osmo_control, "osmo_control", false, 18);
R.drawable.mon_osmo_signal_inactive, R.string.osmo_control, "osmo_control", false, 18);
layer.recreateControls();
if(olayer != null) {

View file

@ -117,22 +117,22 @@ public class OsMoPositionLayer extends OsmandMapLayer implements ContextMenuLaye
}
@Override
public void onDraw(Canvas canvas, RotatedTileBox tb, DrawSettings nightMode) {
final int r = getRadiusPoi(tb);
public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings nightMode) {
final int r = getRadiusPoi(tileBox);
long treshold = System.currentTimeMillis() - 15000;
for (OsMoDevice t : getTrackingDevices()) {
Location l = t.getLastLocation();
ConcurrentLinkedQueue<Location> plocations = t.getPreviousLocations(treshold);
if (!plocations.isEmpty() && l != null) {
int x = (int) tb.getPixXFromLatLon(l.getLatitude(), l.getLongitude());
int y = (int) tb.getPixYFromLatLon(l.getLatitude(), l.getLongitude());
int x = (int) tileBox.getPixXFromLonNoRot(l.getLongitude());
int y = (int) tileBox.getPixYFromLatNoRot(l.getLatitude());
pth.rewind();
Iterator<Location> it = plocations.iterator();
boolean f = true;
while (it.hasNext()) {
Location lo = it.next();
int xt = (int) tb.getPixXFromLatLon(lo.getLatitude(), lo.getLongitude());
int yt = (int) tb.getPixYFromLatLon(lo.getLatitude(), lo.getLongitude());
int xt = (int) tileBox.getPixXFromLonNoRot(lo.getLongitude());
int yt = (int) tileBox.getPixYFromLatNoRot(lo.getLatitude());
if (f) {
f = false;
pth.moveTo(xt, yt);
@ -145,14 +145,15 @@ public class OsMoPositionLayer extends OsmandMapLayer implements ContextMenuLaye
canvas.drawPath(pth, paintPath);
}
}
canvas.rotate(-tileBox.getRotate(), tileBox.getCenterPixelX(), tileBox.getCenterPixelY());
for (OsMoDevice t : getTrackingDevices()) {
Location l = t.getLastLocation();
if (l != null) {
int x = (int) tb.getPixXFromLatLon(l.getLatitude(), l.getLongitude());
int y = (int) tb.getPixYFromLatLon(l.getLatitude(), l.getLongitude());
int x = (int) tileBox.getPixXFromLatLon(l.getLatitude(), l.getLongitude());
int y = (int) tileBox.getPixYFromLatLon(l.getLatitude(), l.getLongitude());
pointInnerCircle.setColor(t.getColor());
canvas.drawCircle(x, y, r + (float)Math.ceil(tb.getDensity()), pointOuter);
canvas.drawCircle(x, y, r - (float)Math.ceil(tb.getDensity()), pointInnerCircle);
canvas.drawCircle(x, y, r + (float)Math.ceil(tileBox.getDensity()), pointOuter);
canvas.drawCircle(x, y, r - (float)Math.ceil(tileBox.getDensity()), pointInnerCircle);
paintTextIcon.setTextSize(r * 3 / 2);
canvas.drawText(t.getVisibleName().substring(0, 1).toUpperCase(), x, y + r / 2, paintTextIcon);
}

View file

@ -107,7 +107,7 @@ public class AppearanceWidgetsFactory {
visibleNames[j] = Algorithms.capitalizeFirstLetterAndLowercase(items[j].replace('_', ' ').replace(
'-', ' '));
}
bld.setSingleChoiceItems(items, selected, new DialogInterface.OnClickListener() {
bld.setSingleChoiceItems(visibleNames, selected, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {