on xenial help sign in
rename some parameters from desktopFile to appId as scopes are now changed to give us the appId
commit976d829e58564098bc2a595803824e9b2b076061 authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 29 Nov 2013, 10:57 (13 years ago) parent99f3f0e
3 files changed+9−11
Dash/GenericScopeView.qml+2−2 Shell.qml+5−5 plugins/Unity/Launcher/backend/launcherbackend.cpp+2−4
Dash/GenericScopeView.qml+2−2
@@ -46,8 +46,8 @@ FocusScope {
4646 }
4747 }
4848
49− function activateApp(desktopFilePath) {
50− shell.activateApplication(desktopFilePath);
49+ function activateApp(appId) {
50+ shell.activateApplication(appId);
5151 }
5252
5353 Binding {
Shell.qml+5−5
@@ -96,21 +96,21 @@ FocusScope {
9696 }
9797 }
9898
99− function activateApplication(desktopFile, argument) {
99+ function activateApplication(appId, argument) {
100100 if (applicationManager) {
101101 // For newly started applications, as it takes them time to draw their first frame
102102 // we add a delay before we hide the animation screenshots to compensate.
103− var addDelay = !applicationManager.getApplicationFromDesktopFile(desktopFile);
103+ var addDelay = !applicationManager.getApplicationFromDesktopFile(appId);
104104
105105 var application;
106− application = applicationManager.activateApplication(desktopFile, argument);
106+ application = applicationManager.activateApplication(appId, argument);
107107 if (application == null) {
108108 return;
109109 }
110110 if (application.stage == ApplicationInfo.MainStage || !sideStage.enabled) {
111− mainStage.activateApplication(desktopFile, addDelay);
111+ mainStage.activateApplication(appId, addDelay);
112112 } else {
113− sideStage.activateApplication(desktopFile, addDelay);
113+ sideStage.activateApplication(appId, addDelay);
114114 }
115115 stages.show();
116116 }
plugins/Unity/Launcher/backend/launcherbackend.cpp+2−4
@@ -26,6 +26,7 @@
2626#include <QFileInfo>
2727#include <QGSettings>
2828#include <QDebug>
29+#include <QStandardPaths>
2930
3031class LauncherBackendItem
3132{
@@ -232,10 +233,7 @@ QString LauncherBackend::findDesktopFile(const QString &appId) const
232233 int dashPos = -1;
233234 QString helper = appId;
234235
235− QStringList searchDirs;
236− searchDirs << QDir::homePath() + "/.local/share/applications";
237− searchDirs << "/usr/share/applications";
238−
236+ QStringList searchDirs = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation);
239237#ifdef LAUNCHER_TESTING
240238 searchDirs << "";
241239#endif