On Wed, Nov 21, 2012 at 10:31:51AM +0530, Arun Raghavan wrote: > On Fri, 2012-11-16 at 00:12 +0100, poljar (Damir Jeli?) wrote: > > From: "poljar (Damir Jeli?)" <poljarinho at gmail.com> > > > > If we know if a certain port is available/unavailable, we can print > > that out, as a help to the user (and as debugging for ourselves). > > A profile is also available/unavailable if all ports which have that > > profile are available/unavailable. > > I'm not sure how other UIs are handling this, but it's a bit odd to see > "Speakers (unplugged)" when headphones are plugged in. Anything we can > do about that? Maybe special-case speakers with s/unplugged/unavailable? > Sure thing. I've attached a simple patch which can be squashed together, or should I resend everything? -------------- next part -------------- >From 60d489dffed0ab3009f798fe38ea362db960e1be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?"poljar=20(Damir=20Jeli=C4=87)"?= <poljarinho@xxxxxxxxx> Date: Wed, 21 Nov 2012 16:28:21 +0100 Subject: [PATCH v3 3/3 pavucontrol] mainwindow: Add a special case for the speakers availability. --- src/mainwindow.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 5a1c8f4..45f0b72 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -268,8 +268,12 @@ static void updatePorts(DeviceWidget *w, std::map<Glib::ustring, PortInfo> &port if (p.available == PA_PORT_AVAILABLE_YES) desc += _(" (plugged in)"); - else if (p.available == PA_PORT_AVAILABLE_NO) - desc += _(" (unplugged)"); + else if (p.available == PA_PORT_AVAILABLE_NO) { + if (p.name == "analog-output-speaker") + desc += _(" (unavailable)"); + else + desc += _(" (unplugged)"); + } w->ports[i].second = desc; } -- 1.8.0