Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2012-09-04 00:00:10 +02:00
commit 72d3fabd5b
10 changed files with 20 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<resources><string name="show_warnings_title">Warnungen anzeigen…</string>
<string name="show_warnings_descr">Warnungen für Tempolimits, stationäre Radarfallen, Rüttelschwellen, u.Ä.</string>
<string name="use_compass_navigation_descr">Verwende Kompass, wenn keine andere Richtungsbestimmung möglich</string>
@ -81,9 +81,10 @@
<string name="route_kr">Rechts halten, dann</string>
<string name="rendering_attr_noPolygons_description">Unterdrückt die Anzeige aller Flächenelemente in der Karte</string>
<string name="rendering_attr_noPolygons_name">Transparente Flächen</string>
<string name="rendering_attr_appMode_description">Optimierung der Kartendarstellung gemäß Nutzerprofil</string>
<string name="rendering_attr_appMode_description">Optimierung der Kartendarstellung für</string>
<string name="rendering_attr_appMode_name">Darstellungsmodus</string>
<string name="rendering_attr_contourLines_description">Minimale Vergrößerung, ab der Höhenlinien angezegt werden sollen. Höhenlinien müssen meist in Form von zusätzlichen SRTM-Dateien vorhanden sein.</string>
<!-- string name="rendering_attr_contourLines_description">Minimale Vergrößerung, ab der Höhenlinien angezeigt werden sollen. Höhenlinien müssen meist in Form von zusätzlichen SRTM-Dateien vorhanden sein.</string -->
<string name="rendering_attr_contourLines_description">Zeige ab Vergrößerung (benötigt SRTM Datei):</string>
<string name="rendering_attr_contourLines_name">Höhenlinien</string>
<string name="rendering_attr_hmRendered_description">Erhöht die in der Karte angezeigte Detaildichte</string>
<string name="rendering_attr_hmRendered_name">Mehr Details in Karte</string>

View file

@ -201,8 +201,9 @@
<string name="rendering_attr_noPolygons_description">Make all areal land features on map transparent</string>
<string name="rendering_attr_noPolygons_name">No polygons</string>
<string name="rendering_attr_appMode_name">Rendering mode</string>
<string name="rendering_attr_appMode_description">Map optimization for respective User Profile</string>
<string name="rendering_attr_contourLines_description">Select minimum zoom level to display in map if available. Separate SRTM-file may be needed.</string>
<string name="rendering_attr_appMode_description">Optimize map for</string>
<!-- string name="rendering_attr_contourLines_description">Select minimum zoom level to display in map if available. Separate SRTM-file may be needed.</string -->
<string name="rendering_attr_contourLines_description">Display from zoom level (needs SRTM file):</string>
<string name="rendering_attr_contourLines_name">Show contour lines</string>
<string name="rendering_attr_hmRendered_description">Increase amount of map detail shown</string>
<string name="rendering_attr_hmRendered_name">Show more map detail</string>

View file

@ -60,7 +60,7 @@ public class AsyncLoadingThread extends Thread {
if (resourceManger.getMapTileDownloader() != null && resourceManger.getMapTileDownloader().isSomethingBeingDownloaded()) {
progress = BusyIndicator.STATUS_GREEN;
} else if (resourceManger.getContext().getRoutingHelper().isRouteBeingCalculated()) {
progress = BusyIndicator.STATUS_BLUE;
progress = BusyIndicator.STATUS_ORANGE;
} else if (!requests.isEmpty()) {
progress = BusyIndicator.STATUS_BLACK;
} else if (poiLoadRequest != null && poiLoadRequest.isRunning()) {

View file

@ -17,7 +17,7 @@ public class BusyIndicator {
public static final int STATUS_INVISIBLE = 0;
public static final int STATUS_GREEN = 1;
public static final int STATUS_BLUE = 2;
public static final int STATUS_ORANGE = 2;
public static final int STATUS_BLACK = 3;
public BusyIndicator(Context ctx, View bar){
@ -45,8 +45,8 @@ public class BusyIndicator {
final Drawable drawable;
if(this.status == STATUS_BLACK){
drawable = ctx.getResources().getDrawable(R.drawable.progress_grey);
} else if(this.status == STATUS_BLUE){
drawable = ctx.getResources().getDrawable(R.drawable.progress_blue);
} else if(this.status == STATUS_ORANGE){
drawable = ctx.getResources().getDrawable(R.drawable.progress_orange);
} else if(this.status == STATUS_GREEN){
drawable = ctx.getResources().getDrawable(R.drawable.progress_green);
} else {

View file

@ -127,15 +127,16 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
return defValue;
}
public String getStringPropertyDescription(String propertyName, String defValue) {
public static String getStringPropertyDescription(Context ctx, String propertyName, String defValue) {
try {
Field f = R.string.class.getField("rendering_attr_" + propertyName + "_description");
if (f != null) {
Integer in = (Integer) f.get(null);
return getString(in);
return ctx.getString(in);
}
} catch (Exception e) {
e.printStackTrace();
//e.printStackTrace();
System.err.println(e.getMessage());
}
return defValue;
}

View file

@ -75,6 +75,7 @@ public class OsmandExtraSettings extends OsmandPlugin {
entries[i] = (int) (floatValues[i] * 100) +" %";
}
Builder b = new AlertDialog.Builder(view.getContext());
b.setTitle(R.string.map_text_size);
int i = Arrays.binarySearch(floatValues, textSizePref.get());
b.setSingleChoiceItems(entries, i, new OnClickListener() {
@Override

View file

@ -347,6 +347,8 @@ public class MapInfoLayer extends OsmandMapLayer {
final OsmandApplication app = view.getApplication();
for (final RenderingRuleProperty p : renderer.PROPS.getCustomRules()) {
String propertyName = SettingsActivity.getStringPropertyName(view.getContext(), p.getAttrName(), p.getName());
//test old descr as title
final String propertyDescr = SettingsActivity.getStringPropertyDescription(view.getContext(), p.getAttrName(), p.getName());
if(p.isBoolean()) {
final CommonPreference<Boolean> pref = view.getApplication().getSettings().getCustomRenderBooleanProperty(p.getAttrName());
int icon = 0;
@ -378,6 +380,8 @@ public class MapInfoLayer extends OsmandMapLayer {
@Override
public void run() {
Builder b = new AlertDialog.Builder(view.getContext());
//test old descr as title
b.setTitle(propertyDescr);
int i = Arrays.asList(p.getPossibleValues()).indexOf(pref.get());
b.setSingleChoiceItems(p.getPossibleValues(), i, new OnClickListener() {
@Override