Made namealarm & honk sounds changable by themes

This commit is contained in:
anne 2023-06-14 02:38:33 +02:00
parent 013dd5a635
commit 54f31daf27
4 changed files with 10 additions and 3 deletions

View file

@ -2168,13 +2168,17 @@ class PesterWindow(MovingWindow):
QtCore.QUrl.fromLocalFile(self.theme["main/sounds/memosound"]) QtCore.QUrl.fromLocalFile(self.theme["main/sounds/memosound"])
) )
self.namesound = QtMultimedia.QSoundEffect() self.namesound = QtMultimedia.QSoundEffect()
self.namesound.setSource(QtCore.QUrl.fromLocalFile("themes/namealarm.wav")) self.namesound.setSource(
QtCore.QUrl.fromLocalFile(self.theme["main/sounds/namealarm"])
)
self.ceasesound = QtMultimedia.QSoundEffect() self.ceasesound = QtMultimedia.QSoundEffect()
self.ceasesound.setSource( self.ceasesound.setSource(
QtCore.QUrl.fromLocalFile(self.theme["main/sounds/ceasesound"]) QtCore.QUrl.fromLocalFile(self.theme["main/sounds/ceasesound"])
) )
self.honksound = QtMultimedia.QSoundEffect() self.honksound = QtMultimedia.QSoundEffect()
self.honksound.setSource(QtCore.QUrl.fromLocalFile("themes/honk.wav")) self.honksound.setSource(
QtCore.QUrl.fromLocalFile(self.theme["main/sounds/honk"])
)
except: except:
PchumLog.exception("Warning: Error loading sounds!") PchumLog.exception("Warning: Error loading sounds!")

BIN
themes/pesterchum/honk.wav Executable file

Binary file not shown.

BIN
themes/pesterchum/namealarm.wav Executable file

Binary file not shown.

View file

@ -18,7 +18,10 @@
}, },
"sounds": { "alertsound": "$path/alarm.wav", "sounds": { "alertsound": "$path/alarm.wav",
"memosound": "$path/alarm2.wav", "memosound": "$path/alarm2.wav",
"ceasesound": "$path/cease.wav" }, "ceasesound": "$path/cease.wav",
"namealarm": "$path/namealarm.wav",
"honk": "$path/honk.wav"
},
"menus": {"client": {"_name": "CLIENT", "menus": {"client": {"_name": "CLIENT",
"options": "OPTIONS", "options": "OPTIONS",
"memos": "MEMOS", "memos": "MEMOS",