~ubuntu-branches/ubuntu/precise/unity-2d/precise-security

« back to all changes in this revision

Viewing changes to panel/applets/indicator/indicatorapplet.cpp

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2011-09-15 11:43:52 UTC
  • mfrom: (1.1.22 upstream)
  • Revision ID: package-import@ubuntu.com-20110915114352-4r8z8vbm4s4v9q6h
Tags: 4.8.0-0ubuntu1
* New upstream release
  - [window management] Alt tab does not switch to the desired application
    but instead set the urgency flag on the window (LP: #735205)
  - [dash] search field default text not cleared immediately when using
    chinese input method (LP: #745246)
  - [dash] Apps lens shows no result by default (LP: #834571)
  - unity-2d-panel crashed with SIGSEGV in
    IndicatorsWidget::onEntryRemoved() (LP: #846836)
  - [panel] graphics corruption in top line of pixels (LP: #846335)
  - Repeated indicators in unity-2d panel when second screen added
    (LP: #846441)
  - [dash] Lens navigation bar (buttons on lower edge of dash window) is
    accessible (LP: #826560)
  - [dash] Category filters is sorted according to their english names, even
    when another language is used (LP: #838023)

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        sigc::mem_fun(this, &IndicatorApplet::onObjectAdded)
48
48
        );
49
49
 
 
50
    m_indicatorsManager->indicators()->on_object_removed.connect(
 
51
        sigc::mem_fun(this, &IndicatorApplet::onObjectRemoved)
 
52
        );
 
53
 
50
54
    m_indicatorsWidget = new IndicatorsWidget(m_indicatorsManager);
51
55
    layout->addWidget(m_indicatorsWidget);
52
56
}
54
58
void IndicatorApplet::onObjectAdded(Indicator::Ptr const& indicator)
55
59
{
56
60
    QString name = QString::fromStdString(indicator->name());
57
 
    if (name == "libappmenu.so") {
58
 
        // appmenu indicator is handled by AppNameApplet
59
 
        return;
60
 
    }
61
 
    m_indicatorsWidget->addIndicator(indicator);
 
61
 
 
62
    // appmenu indicator is handled by AppNameApplet
 
63
    if (name != "libappmenu.so") {
 
64
        m_indicatorsWidget->addIndicator(indicator);
 
65
    }
 
66
}
 
67
 
 
68
void IndicatorApplet::onObjectRemoved(Indicator::Ptr const& indicator)
 
69
{
 
70
    QString name = QString::fromStdString(indicator->name());
 
71
 
 
72
    // appmenu indicator is handled by AppNameApplet
 
73
    if (name != "libappmenu.so") {
 
74
        m_indicatorsWidget->removeIndicator(indicator);
 
75
    }
62
76
}
63
77
 
64
78
#include "indicatorapplet.moc"