~aacid/unity-2d/panel_screen_can_change

« back to all changes in this revision

Viewing changes to libunity-2d-private/src/applicationslist.cpp

[Launcher] When the stickyness of an application instance changes and we decide to remove it from it's launcher applicationlist do the same for all the other launchers (monitors). Fixes: https://bugs.launchpad.net/bugs/988739. Approved by .

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
}
202
202
 
203
203
void
 
204
ApplicationsList::removeApplication(const QString& desktop_file)
 
205
{
 
206
    Q_FOREACH(Application *app, m_applications) {
 
207
        if (app->desktop_file() == desktop_file) {
 
208
            removeApplication(app);
 
209
            break;
 
210
        }
 
211
    }
 
212
}
 
213
 
 
214
void
204
215
ApplicationsList::onApplicationUserVisibleChanged(bool user_visible)
205
216
{
206
217
    BamfApplication* bamf_application = qobject_cast<BamfApplication*>(sender());
399
410
 
400
411
    if (!sticky && !application->running()) {
401
412
        removeApplication(application);
 
413
        Q_FOREACH(ApplicationsList *other, ApplicationsListManager::instance()->m_lists) {
 
414
            if (other != this) {
 
415
                other->removeApplication(application->desktop_file());
 
416
            }
 
417
        }
402
418
    }
403
419
}
404
420