Code review comment for lp:~michael.rawson/unity/fix-show-desktop

Revision history for this message
Marco Trevisan (TreviƱo) (3v1n0) wrote :

> I don't think we do either. The problem is that if we do have that, the for
> loop immediately after that adds another ShowDesktop Icon to the switcher. I'm
> trying adding an if statement checking if it is of TYPE_DESKTOP or not.

Have you tried my code? It doesn't add a duplicated icon. No worry about that.

57 + if(icon->GetName()!="DesktopLauncherIcon") {
58 + results.push_back(icon);
59 + }

I don't think that it's really needed according to my tests, however that's not logically wrong, but please fix indentation and use GetIconType here.

I.e.

if (icon->GetIconType() != AbstractLauncherIcon::IconType::TYPE_DESKTOP)
{
  results.push_back(icon);
}

« Back to merge proposal