Code review comment for lp:~3v1n0/unity/indicators-p

Revision history for this message
Andrea Azzarone (azzar1) wrote :

671 - Indicator::Ptr indicator(new Indicator(name));
672 + Indicator* indptr;
673 +
674 + if (name == "libappmenu.so")
675 + indptr = new AppmenuIndicator(name);
676 + else
677 + indptr = new Indicator(name);
678 +
679 + Indicator::Ptr indicator(indptr);

It's a kind of object factory, for me it's ok.

685 +
686 + if (indicator->IsAppmenu())
687 + {
688 + AppmenuIndicator *appmenu = dynamic_cast<AppmenuIndicator*>(indicator.get());
689 +
690 + if (appmenu)
691 + appmenu->on_show_appmenu.connect(sigc::mem_fun(owner_, &Indicators::OnShowAppMenu));
692 + }
693 +

If you can remove this please do... :) Otherwise it's ok for me.

« Back to merge proposal