[gnome-shell] volume: Suppress a critical warning
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] volume: Suppress a critical warning
- Date: Mon, 4 Feb 2013 11:42:57 +0000 (UTC)
commit d07c8dcd9c8dc19aa686130aaa9b65ea7b12095f
Author: Florian MÃllner <fmuellner gnome org>
Date: Fri Feb 1 20:19:02 2013 +0100
volume: Suppress a critical warning
gvc_mixer_stream_get_port() emits a warning in the no-ports case,
which we can avoid by rearranging the check for that case.
https://bugzilla.gnome.org/show_bug.cgi?id=693049
js/ui/status/volume.js | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index b25060c..8075496 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -169,9 +169,8 @@ const OutputStreamSlider = new Lang.Class({
// a bit hackish, but ALSA/PulseAudio have a number
// of different identifiers for headphones, and I could
// not find the complete list
- let port = sink.get_port();
- if (port)
- return port.port.indexOf('headphone') >= 0;
+ if (sink.get_ports().length > 0)
+ return sink.get_port().port.indexOf('headphone') >= 0;
return false;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]