[pulseaudio-discuss] [PATCH v2 1/2 pavucontrol] mainwindow: Show the availability of the ports and profiles.
Tanu Kaskinen
tanuk at iki.fi
Sat Nov 24 06:29:05 PST 2012
On Fri, 2012-11-16 at 00:12 +0100, poljar (Damir Jelić) wrote:
> diff --git a/src/mainwindow.cc b/src/mainwindow.cc
> index 1041eab..63e02e8 100644
> --- a/src/mainwindow.cc
> +++ b/src/mainwindow.cc
> @@ -254,12 +254,31 @@ static void set_icon_name_fallback(Gtk::Image *i, const char *name, Gtk::IconSiz
>
> static void updatePorts(DeviceWidget *w, std::map<Glib::ustring, PortInfo> &ports) {
> std::map<Glib::ustring, PortInfo>::iterator it;
> + PortInfo p;
> +
> + for (uint32_t i = 0; i < w->ports.size(); i++) {
> + Glib::ustring desc;
> + it = ports.find(w->ports[i].first);
> +
> + if (it == ports.end())
> + continue;
> +
> + p = (*it).second;
Out of curiosity, is the reason for using (*it).second instead of
it->second that you think it looks better, or something else?
--
Tanu
More information about the pulseaudio-discuss
mailing list