Changeset 1123:f0334593281d
- Timestamp:
- 12/10/23 09:50:04 (11 months ago)
- Branch:
- python3
- Phase:
- public
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
locale/en/mlx.po
r1098 r1123 1890 1890 "If checked, a speedbrake sound will be played after touchdown, " 1891 1891 "when the speedbrakes deploy." 1892 1893 msgid "prefs_sounds_alternativeSoundSet" 1894 msgstr "Use an a_lternative sound set" 1895 1896 msgid "prefs_sounds_alternativeSoundSet_tooltip" 1897 msgstr "" 1898 "If checked, an alternative set of sound recording will be used, when available. " 1899 "Currently, an extended version of the taxi sounds is played, which includes " 1900 "the original Malév safety demo when flying a Boeing 737 or 767 aircraft. " 1901 "The rest of the recordings remains unchanged." 1892 1902 1893 1903 msgid "prefs_sounds_frame_checklists" -
locale/hu/mlx.po
r1098 r1123 1902 1902 "Ha kijelölöd, egy, a spoilerek kibocsájtását imitáló hang " 1903 1903 "hallatszik földetérés után, ha a spoilerek automatikusan kinyílnak." 1904 1905 msgid "prefs_sounds_alternativeSoundSet" 1906 msgstr "Al_ternatív hangkészlet használata" 1907 1908 msgid "prefs_sounds_alternativeSoundSet_tooltip" 1909 msgstr "" 1910 "Ha bejelölöd, alternatív hangkészletet használ a program bizonyos esetekben. " 1911 "Jelenleg Boeing 737 és 767 típusú gépeknél a gurulás során lejátszott hangfelvétel " 1912 "a korábban és alapértelmezésben jelenleg is használtnak egy kibővített változata, " 1913 "amely a Malév eredeti biztonsági bemutatóját is tartalmazza. " 1914 "A többi hangfelvétel ugyanaz, mint korábban is." 1904 1915 1905 1916 msgid "prefs_sounds_frame_checklists" -
src/mlx/config.py
r1098 r1123 255 255 self._enableApproachCallouts = False 256 256 self._speedbrakeAtTD = True 257 self._soundSet = 0 257 258 258 259 self._enableChecklists = False … … 672 673 if speedbrakeAtTD!=self._speedbrakeAtTD: 673 674 self._speedbrakeAtTD = speedbrakeAtTD 675 self._modified = True 676 677 @property 678 def soundSet(self): 679 """Get the number of the sound set to use.""" 680 return self._soundSet 681 682 @soundSet.setter 683 def soundSet(self, soundSet): 684 """Set the number of the sound set.""" 685 if soundSet!=self._soundSet: 686 self._soundSet = soundSet 674 687 self._modified = True 675 688 … … 856 869 self._speedbrakeAtTD = self._getBoolean(config, "sounds", 857 870 "speedbrakeAtTD", True) 871 self._soundSet = self._getInteger(config, "sounds", 872 "soundSet", 0) 858 873 859 874 self._enableChecklists = self._getBoolean(config, "sounds", … … 963 978 config.set("sounds", "speedbrakeAtTD", 964 979 "yes" if self._speedbrakeAtTD else "no") 980 config.set("sounds", "soundSet", str(self._soundSet)) 965 981 966 982 config.set("sounds", "enableChecklists", … … 998 1014 otherwise the default.""" 999 1015 return config.getboolean(section, option) \ 1016 if config.has_option(section, option) \ 1017 else default 1018 1019 def _getInteger(self, config, section, option, default): 1020 """Get the given option as an integer, if found in the given config, 1021 otherwise the default.""" 1022 return config.getint(section, option) \ 1000 1023 if config.has_option(section, option) \ 1001 1024 else default … … 1109 1132 print(" enableApproachCallouts:", self._enableApproachCallouts) 1110 1133 print(" speedbrakeAtTD:", self._speedbrakeAtTD) 1134 print(" soundSet:", self._soundSet) 1111 1135 1112 1136 print(" enableChecklists:", self._enableChecklists) -
src/mlx/const.py
r1117 r1123 461 461 SOUND_TAXI_BOEING737NG = "737taxi.mp3" 462 462 463 ## Sound: taxi: Boeing 737 NG (alternative variant) 464 SOUND_TAXI_BOEING737NG_ALT1 = "737taxi_1.mp3" 465 463 466 ## Sound: taxi: Boeing 767 464 467 SOUND_TAXI_BOEING767 = "767taxi.mp3" 468 469 ## Sound: taxi: Boeing 767 (alternative variant) 470 SOUND_TAXI_BOEING767_ALT1 = "767taxi_1.mp3" 465 471 466 472 ## Sound: taxi: Fokker F70 -
src/mlx/gui/prefs.py
r1098 r1123 268 268 self._enableApproachCallouts.set_active(config.enableApproachCallouts) 269 269 self._speedbrakeAtTD.set_active(config.speedbrakeAtTD) 270 self._alternativeSoundSet.set_active(config.soundSet!=0) 270 271 271 272 self._enableChecklists.set_active(config.enableChecklists) … … 321 322 config.enableApproachCallouts = self._enableApproachCallouts.get_active() 322 323 config.speedbrakeAtTD = self._speedbrakeAtTD.get_active() 324 config.soundSet = 1 if self._alternativeSoundSet.get_active() else 0 323 325 324 326 config.enableChecklists = self._enableChecklists.get_active() … … 726 728 backgroundBox.pack_start(self._speedbrakeAtTD, False, False, 4) 727 729 730 self._alternativeSoundSet = Gtk.CheckButton(xstr("prefs_sounds_alternativeSoundSet")) 731 self._alternativeSoundSet.set_use_underline(True) 732 self._alternativeSoundSet.set_tooltip_text( 733 xstr("prefs_sounds_alternativeSoundSet_tooltip")) 734 backgroundBox.pack_start(self._alternativeSoundSet, False, False, 4) 735 728 736 checklistFrame = Gtk.Frame(label = xstr("prefs_sounds_frame_checklists")) 729 737 mainBox.pack_start(checklistFrame, False, False, 4) … … 769 777 self._enableApproachCallouts.set_sensitive(active) 770 778 self._speedbrakeAtTD.set_sensitive(active) 779 self._alternativeSoundSet.set_sensitive(active) 771 780 772 781 def _pilotControlsSoundsToggled(self, button): -
src/mlx/soundsched.py
r1094 r1123 139 139 played.""" 140 140 141 _sounds = { const.AIRCRAFT_B736 : const.SOUND_TAXI_BOEING737NG, 142 const.AIRCRAFT_B737 : const.SOUND_TAXI_BOEING737NG, 143 const.AIRCRAFT_B738 : const.SOUND_TAXI_BOEING737NG, 144 const.AIRCRAFT_B738C : const.SOUND_TAXI_BOEING737NG, 145 const.AIRCRAFT_B762 : const.SOUND_TAXI_BOEING767, 146 const.AIRCRAFT_B763 : const.SOUND_TAXI_BOEING767, 147 const.AIRCRAFT_F70 : const.SOUND_TAXI_F70 } 141 _sounds = [{ const.AIRCRAFT_B736 : const.SOUND_TAXI_BOEING737NG, 142 const.AIRCRAFT_B737 : const.SOUND_TAXI_BOEING737NG, 143 const.AIRCRAFT_B738 : const.SOUND_TAXI_BOEING737NG, 144 const.AIRCRAFT_B738C : const.SOUND_TAXI_BOEING737NG, 145 const.AIRCRAFT_B762 : const.SOUND_TAXI_BOEING767, 146 const.AIRCRAFT_B763 : const.SOUND_TAXI_BOEING767, 147 const.AIRCRAFT_F70 : const.SOUND_TAXI_F70 }, 148 { const.AIRCRAFT_B736 : const.SOUND_TAXI_BOEING737NG_ALT1, 149 const.AIRCRAFT_B737 : const.SOUND_TAXI_BOEING737NG_ALT1, 150 const.AIRCRAFT_B738 : const.SOUND_TAXI_BOEING737NG_ALT1, 151 const.AIRCRAFT_B738C : const.SOUND_TAXI_BOEING737NG_ALT1, 152 const.AIRCRAFT_B762 : const.SOUND_TAXI_BOEING767_ALT1, 153 const.AIRCRAFT_B763 : const.SOUND_TAXI_BOEING767_ALT1, 154 const.AIRCRAFT_F70 : const.SOUND_TAXI_F70 }, 155 ] 148 156 149 157 def __init__(self, flight, boardingSound = None): … … 165 173 super(TaxiSound, self)._playbackDone(success, extra) 166 174 aircraftType = self._flight.aircraftType 175 176 soundSet = self._flight.config.soundSet 167 177 sounds = TaxiSound._sounds 178 sounds = sounds[soundSet] if soundSet<len(sounds) else sounds[-1] 179 168 180 if aircraftType in sounds: 169 181 startSound(sounds[aircraftType])
Note:
See TracChangeset
for help on using the changeset viewer.