summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2014-09-18 11:44:34 +0200
committerBastien Nocera <hadess@hadess.net>2015-04-01 14:10:14 +0200
commitfac3a900e5de2c60d667c54f2727e806d29cff4b (patch)
tree580775dda1c8209e2ea80fcca0894760b19a7f60
parente14dbe8aa6dfaeea4a9f3405cf2f3e238e88623b (diff)
downloadlibgnome-volume-control-fac3a900e5de2c60d667c54f2727e806d29cff4b.tar.gz
gvc-mixer-control: Fix bluetooth duplicates
Entries are only hidden when available == PA_PORT_AVAILABLE_NO, so if an entry toggles between PA_PORT_AVAILABLE_YES and PA_PORT_AVAILABLE_UNKNOWN (Bluetooth headset switching between HSP/HFP and A2DP for example), this should not result in new entries being created. https://bugzilla.gnome.org/show_bug.cgi?id=697545
-rw-r--r--gvc-mixer-control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gvc-mixer-control.c b/gvc-mixer-control.c
index b270523..f05cbf6 100644
--- a/gvc-mixer-control.c
+++ b/gvc-mixer-control.c
@@ -2136,7 +2136,7 @@ update_card (GvcMixerControl *control,
else {
for (i = 0; i < info->n_ports; i++) {
if (g_strcmp0 (card_port->port, info->ports[i]->name) == 0) {
- if (card_port->available != info->ports[i]->available) {
+ if ((card_port->available == PA_PORT_AVAILABLE_NO) != (info->ports[i]->available == PA_PORT_AVAILABLE_NO)) {
card_port->available = info->ports[i]->available;
g_debug ("sync port availability on card %i, card port name '%s', new available value %i",
gvc_mixer_card_get_index (card),