Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-12-20 22:14:40 +01:00
commit e8c3ff7bf7
5 changed files with 16 additions and 2 deletions

View file

@ -9,6 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="speak_pedestrian">Announce pedestrian crosswalks</string>
<string name="rendering_attr_roadStyle_name">Road style</string>
<string name="rendering_value_default_name">Default</string>
<string name="rendering_value_orange_name">Orange</string>

View file

@ -824,6 +824,7 @@ public class OsmandSettings {
SHOW_LANES.setModeDefaultValue(ApplicationMode.DEFAULT, false);
}
public final OsmandPreference<Boolean> SPEAK_TRAFFIC_WARNINGS = new BooleanPreference("speak_traffic_warnings", true).makeProfile().cache();
public final OsmandPreference<Boolean> SPEAK_PEDESTRIAN = new BooleanPreference("speak_pedestrian", true).makeProfile().cache();
public final OsmandPreference<Boolean> SPEAK_STREET_NAMES = new BooleanPreference("speak_street_names", true).makeProfile().cache();
public final OsmandPreference<Boolean> SPEAK_SPEED_CAMERA = new BooleanPreference("speak_cameras", true).makeProfile().cache();
public final OsmandPreference<Boolean> SPEAK_SPEED_LIMIT = new BooleanPreference("speak_speed_limit", true).makeProfile().cache();

View file

@ -334,11 +334,13 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
return true;
} else if (preference == speakAlarms) {
showBooleanSettings(new String[] { getString(R.string.speak_street_names), getString(R.string.speak_traffic_warnings),
getString(R.string.speak_pedestrian),
getString(R.string.speak_speed_limit), getString(R.string.speak_cameras),
getString(R.string.announce_gpx_waypoints),
getString(R.string.speak_favorites),
getString(R.string.speak_poi)},
new OsmandPreference[] { settings.SPEAK_STREET_NAMES, settings.SPEAK_TRAFFIC_WARNINGS,
settings.SPEAK_PEDESTRIAN,
settings.SPEAK_SPEED_LIMIT, settings.SPEAK_SPEED_CAMERA,
settings.ANNOUNCE_WPT, settings.ANNOUNCE_NEARBY_FAVORITES, settings.ANNOUNCE_NEARBY_POI}, preference.getTitle());
return true;

View file

@ -199,6 +199,8 @@ public class WaypointHelper {
if(type == ALARMS) {
app.getSettings().SHOW_TRAFFIC_WARNINGS.set(enable);
app.getSettings().SPEAK_TRAFFIC_WARNINGS.set(enable);
app.getSettings().SHOW_PEDESTRIAN.set(enable);
app.getSettings().SPEAK_PEDESTRIAN.set(enable);
} else if(type == POI) {
app.getSettings().SHOW_NEARBY_POI.set(enable);
app.getSettings().ANNOUNCE_NEARBY_POI.set(enable);

View file

@ -338,6 +338,14 @@ public class VoiceRouter {
p.attention(type+"").play();
}
}
} else if (type == AlarmInfoType.PEDESTRIAN) {
if (router.getSettings().SPEAK_PEDESTRIAN.get()) {
CommandBuilder p = getNewCommandPlayerToPlay();
if (p != null) {
notifyOnVoiceMessage();
p.attention(type+"").play();
}
}
} else {
if (router.getSettings().SPEAK_TRAFFIC_WARNINGS.get()) {
CommandBuilder p = getNewCommandPlayerToPlay();