on xenial help sign in
sset the item to "running" in all cases when it appears
c31e139Lukáš Tinkl
plugins/Unity/Launcher/launchermodel.cpp+2−3
@@ -492,10 +492,9 @@ void LauncherModel::applicationAdded(const QModelIndex &parent, int row)
492 LauncherItem *item = m_list.at(itemIndex);
492 LauncherItem *item = m_list.at(itemIndex);
493 if (!item->recent()) {
493 if (!item->recent()) {
494 item->setRecent(true);
494 item->setRecent(true);
495− item->setRunning(true);
496− m_asAdapter->syncItems(m_list);
497 Q_EMIT dataChanged(index(itemIndex), index(itemIndex), {RoleRecent});
495 Q_EMIT dataChanged(index(itemIndex), index(itemIndex), {RoleRecent});
498 }
496 }
497+ item->setRunning(true);
499 // TODO Shall we paint some running/recent app highlight? If yes, do it here.
498 // TODO Shall we paint some running/recent app highlight? If yes, do it here.
500 } else {
499 } else {
501 LauncherItem *item = new LauncherItem(app->appId(), app->name(), app->icon().toString(), this);
500 LauncherItem *item = new LauncherItem(app->appId(), app->name(), app->icon().toString(), this);
@@ -506,8 +505,8 @@ void LauncherModel::applicationAdded(const QModelIndex &parent, int row)
506 beginInsertRows(QModelIndex(), m_list.count(), m_list.count());
505 beginInsertRows(QModelIndex(), m_list.count(), m_list.count());
507 m_list.append(item);
506 m_list.append(item);
508 endInsertRows();
507 endInsertRows();
509− m_asAdapter->syncItems(m_list);
510 }
508 }
509+ m_asAdapter->syncItems(m_list);
511 Q_EMIT dataChanged(index(itemIndex), index(itemIndex), {RoleRunning});
510 Q_EMIT dataChanged(index(itemIndex), index(itemIndex), {RoleRunning});
512}
511}
513
512