wrap around global.play_theme_sound() removal

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327
This commit is contained in:
abakkk 2019-03-17 00:59:49 +01:00
parent 764d18a090
commit 7712a7a92e
1 changed files with 6 additions and 1 deletions

View File

@ -534,7 +534,12 @@ var DrawingArea = new Lang.Class({
// pass the parent (bgContainer) to Flashspot because coords of this are relative
let flashspot = new Screenshot.Flashspot(this.get_parent());
flashspot.fire();
global.play_theme_sound(0, 'screen-capture', "Save as SVG", null);
if (global.play_theme_sound) {
global.play_theme_sound(0, 'screen-capture', "Save as SVG", null);
} else if (global.display && global.display.get_sound_player) {
let player = global.display.get_sound_player();
player.play_from_theme('screen-capture', "Save as SVG", null);
}
}
},