[pulseaudio-discuss] [PATCH v2 1/2 pavucontrol] mainwindow: Show the availability of the ports and profiles.

Damir Jelić poljarinho at gmail.com
Sat Nov 24 07:06:18 PST 2012


On Sat, Nov 24, 2012 at 04:29:05PM +0200, Tanu Kaskinen wrote:
> 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?
> 
I think I saw that somewhere else so I tried to be consistent, but I'm
not completely sure anymore.


More information about the pulseaudio-discuss mailing list