Merge pull request #140 from mocchapi/theme-sounds-additions

expose "honk" and "namealarm" sounds to themes
This commit is contained in:
Dpeta 2023-06-14 20:38:10 +02:00 committed by GitHub
commit 66d6e44864
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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"])
)
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.setSource(
QtCore.QUrl.fromLocalFile(self.theme["main/sounds/ceasesound"])
)
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:
PchumLog.exception("Warning: Error loading sounds!")

View file

@ -18,7 +18,10 @@
},
"sounds": { "alertsound": "$path/alarm.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",
"options": "OPTIONS",
"memos": "MEMOS",