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.
Credit goes to David Henningson for the original idea and some of the code.
The prepareMenu() call can change the active profile selection, which
in turn will cause a "set card profile" command to be sent to the
server if the "updating" flag is not set, so the "updating" flag needs
to be set when calling prepareMenu() from updateCard().
This caused a problem with disconnecting bluetooth headsets: as part
of the disconnection procedure, module-bluetooth-device sets the card
profile to "off". At that point module-card-restore doesn't do
anything, because the change is marked as "don't save". But the
profile change event is then sent to pavucontrol, which updates its
view, and pavucontrol sends the new profile ("off") back to
pulseaudio, and this time the profile change iss marked as "please
save", so module-card-restore restores the "off" profile when the
device is connected again, even though the user never requested the
"off" profile to be chosen.
As a developper, I find it annoying to restart pavucontrol everytime I restart
pulseaudio, moreover the error dialog sometimes needs an additional click
before restarting.
Add it as a command line option so that default behavior is not changed.
This makes sure we inhibit autosuspend only for network sources (which
was the main purpose of adding autosuspend, since constantly monitoring
those is network heavy).
This only seemed to affect GTK3 and it seems to introduce
a GTK warning relating to 'gtk_widget_size_allocate' similar
to those fixed in the previous commit, but nothing seems to
be the worse for it.
As pavucontrol is often used for debugging PA, it should
be quite robust and not popup messages etc. under 'normal'
testing conditions. This adds quite a verbose message under
some specific conditions that do crop up from time to time.
This allows us to set volumes up to ~153% aka +11dB.
Also show the current dB value in the UI - as pavucontrol is a bit more
developer-friendly than other volume UIs displaying this by default makes
sense.
Currently this module only really allows for devices to be renamed, so we add a new
dialog that can be activated by right clicking on devices (i.e. sinks/sources).
This dialog allows you to enter a new name which will be set via the extension
provided by the device-manager module.
Future work will allow you to manage (i.e. rename, delete etc) offline devices too.
Showing these streams causes UI issues due to the repainting when the app that generates the
sound events is pavucontrol itself (e.g. changing volume, trying to move stream to a new device etc.)