On Wed, Nov 21, 2012 at 07:03:30PM +0100, David Henningsson wrote: > On 11/21/2012 04:33 PM, Damir Jeli? wrote: > >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? > > If so the same should apply to "Internal Mic" as well. Oh thats right. New version attached. -------------- next part -------------- >From b308c786afbbd02227c1052a4ea10281bc3b2f99 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 v4 3/3 pavucontrol] mainwindow: Add a special case for the speakers/internal mic availability. --- src/mainwindow.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 5a1c8f4..b5f3081 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -268,8 +268,13 @@ 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" || + p.name == "analog-input-microphone-internal") + desc += _(" (unavailable)"); + else + desc += _(" (unplugged)"); + } w->ports[i].second = desc; } -- 1.8.0