Verified Commit c0d5d824 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

applets/kicker: Get rid of a separator just above title menu item

BUG: 449132
parent d26ba766
Pipeline #197190 passed with stage
in 6 minutes and 23 seconds
......@@ -230,12 +230,16 @@ QVariant RecentUsageModel::appData(const QString &resource, int role) const
const QVariantList &jumpList = Kicker::jumpListActions(service);
if (!jumpList.isEmpty()) {
actionList << jumpList << Kicker::createSeparatorActionItem();
actionList << jumpList;
}
const QVariantList &recentDocuments = Kicker::recentDocumentActions(service);
if (!recentDocuments.isEmpty()) {
actionList << recentDocuments << Kicker::createSeparatorActionItem();
actionList << recentDocuments;
}
if (!actionList.isEmpty()) {
actionList << Kicker::createSeparatorActionItem();
}
const QVariantMap &forgetAction = Kicker::createActionItem(i18n("Forget Application"), QStringLiteral("edit-clear-history"), QStringLiteral("forget"));
......
......@@ -122,13 +122,20 @@ QVariant RunnerMatchesModel::data(const QModelIndex &index, int role) const
}
const QVariantList &addLauncherActions = Kicker::createAddLauncherActionList(appletInterface, service);
bool needsSeparator = false;
if (!systemImmutable && !addLauncherActions.isEmpty()) {
actionList << addLauncherActions << Kicker::createSeparatorActionItem();
actionList << addLauncherActions;
needsSeparator = true;
}
const QVariantList &recentDocuments = Kicker::recentDocumentActions(service);
if (!recentDocuments.isEmpty()) {
actionList << recentDocuments << Kicker::createSeparatorActionItem();
actionList << recentDocuments;
needsSeparator = false;
}
if (needsSeparator) {
actionList << Kicker::createSeparatorActionItem();
}
const QVariantList &additionalActions = Kicker::additionalAppActions(service);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment