[gnome-shell/wip/carlosg/sound-abstraction: 6/10] automountManager: Port to MetaSoundPlayer for emitting sounds
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/sound-abstraction: 6/10] automountManager: Port to MetaSoundPlayer for emitting sounds
- Date: Tue, 8 Jan 2019 16:20:29 +0000 (UTC)
commit adb333bd195ed2a9597e0a67d2970c176274ca99
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Dec 13 20:30:22 2018 +0100
automountManager: Port to MetaSoundPlayer for emitting sounds
Move away from ShellGlobal API, which is too tightly coupled to
libcanberra-gtk.
js/ui/components/automountManager.js | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/components/automountManager.js b/js/ui/components/automountManager.js
index a64fc0d35..579c8a6b3 100644
--- a/js/ui/components/automountManager.js
+++ b/js/ui/components/automountManager.js
@@ -87,9 +87,10 @@ var AutomountManager = new Lang.Class({
if (!this._session.SessionIsActive)
return;
- global.play_theme_sound(0, 'device-added-media',
- _("External drive connected"),
- null);
+ let player = global.display.get_sound_player();
+ player.play_from_theme('device-added-media',
+ _("External drive connected"),
+ null);
},
_onDriveDisconnected() {
@@ -98,9 +99,10 @@ var AutomountManager = new Lang.Class({
if (!this._session.SessionIsActive)
return;
- global.play_theme_sound(0, 'device-removed-media',
- _("External drive disconnected"),
- null);
+ let sound = global.display.get_sound();
+ sound.play_from_theme('device-removed-media',
+ _("External drive disconnected"),
+ null);
},
_onDriveEjectButton(monitor, drive) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]