automountManager: Port to MetaSoundPlayer for emitting sounds
Move away from ShellGlobal API, which is too tightly coupled to libcanberra-gtk. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327
This commit is contained in:
parent
4259676f6e
commit
9a35c9902a
@ -87,9 +87,10 @@ var AutomountManager = new Lang.Class({
|
|||||||
if (!this._session.SessionIsActive)
|
if (!this._session.SessionIsActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
global.play_theme_sound(0, 'device-added-media',
|
let player = global.display.get_sound_player();
|
||||||
_("External drive connected"),
|
player.play_from_theme('device-added-media',
|
||||||
null);
|
_("External drive connected"),
|
||||||
|
null);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDriveDisconnected() {
|
_onDriveDisconnected() {
|
||||||
@ -98,9 +99,10 @@ var AutomountManager = new Lang.Class({
|
|||||||
if (!this._session.SessionIsActive)
|
if (!this._session.SessionIsActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
global.play_theme_sound(0, 'device-removed-media',
|
let sound = global.display.get_sound();
|
||||||
_("External drive disconnected"),
|
sound.play_from_theme('device-removed-media',
|
||||||
null);
|
_("External drive disconnected"),
|
||||||
|
null);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDriveEjectButton(monitor, drive) {
|
_onDriveEjectButton(monitor, drive) {
|
||||||
|
Loading…
Reference in New Issue
Block a user