From 75664c118ad2353a33e25ace15781190432708d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Mon, 15 Jun 2015 21:28:28 -0700 Subject: [PATCH] Filter more useless desktop files We now also exclude the apps which are not suitable for the current platform (some apps may be X11 only), and the ones that run in a terminal, such as vim and ipython -- they're just not useful to show on the homescreen. Reviewed-by:notmart --- containments/homescreen/applicationlistmodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/containments/homescreen/applicationlistmodel.cpp b/containments/homescreen/applicationlistmodel.cpp index 81fcd8d9..a14adc86 100644 --- a/containments/homescreen/applicationlistmodel.cpp +++ b/containments/homescreen/applicationlistmodel.cpp @@ -109,7 +109,10 @@ void ApplicationListModel::loadApplications() if (entry->property("Exec").isValid()) { KService::Ptr service(static_cast(entry.data())); if (service->isApplication() && - !blacklist.contains(service->desktopEntryName() + QStringLiteral(".desktop")) ) { + !blacklist.contains(service->desktopEntryName() + QStringLiteral(".desktop")) && + !service->showOnCurrentPlatform() && + !service->property("Terminal", QVariant::Bool).toBool()) { + data.name = service->name(); data.icon = service->icon(); data.storageId = service->storageId();