on xenial help sign in
rename some parameters from desktopFile to appId as scopes are now changed to give us the appId
976d829Michael Zanetti
Dash/GenericScopeView.qml+2−2
@@ -46,8 +46,8 @@ FocusScope {
46 }
46 }
47 }
47 }
48
48
49− function activateApp(desktopFilePath) {
49+ function activateApp(appId) {
50− shell.activateApplication(desktopFilePath);
50+ shell.activateApplication(appId);
51 }
51 }
52
52
53 Binding {
53 Binding {
Shell.qml+5−5
@@ -96,21 +96,21 @@ FocusScope {
96 }
96 }
97 }
97 }
98
98
99− function activateApplication(desktopFile, argument) {
99+ function activateApplication(appId, argument) {
100 if (applicationManager) {
100 if (applicationManager) {
101 // For newly started applications, as it takes them time to draw their first frame
101 // For newly started applications, as it takes them time to draw their first frame
102 // we add a delay before we hide the animation screenshots to compensate.
102 // we add a delay before we hide the animation screenshots to compensate.
103− var addDelay = !applicationManager.getApplicationFromDesktopFile(desktopFile);
103+ var addDelay = !applicationManager.getApplicationFromDesktopFile(appId);
104
104
105 var application;
105 var application;
106− application = applicationManager.activateApplication(desktopFile, argument);
106+ application = applicationManager.activateApplication(appId, argument);
107 if (application == null) {
107 if (application == null) {
108 return;
108 return;
109 }
109 }
110 if (application.stage == ApplicationInfo.MainStage || !sideStage.enabled) {
110 if (application.stage == ApplicationInfo.MainStage || !sideStage.enabled) {
111− mainStage.activateApplication(desktopFile, addDelay);
111+ mainStage.activateApplication(appId, addDelay);
112 } else {
112 } else {
113− sideStage.activateApplication(desktopFile, addDelay);
113+ sideStage.activateApplication(appId, addDelay);
114 }
114 }
115 stages.show();
115 stages.show();
116 }
116 }
plugins/Unity/Launcher/backend/launcherbackend.cpp+2−4
@@ -26,6 +26,7 @@
26#include <QFileInfo>
26#include <QFileInfo>
27#include <QGSettings>
27#include <QGSettings>
28#include <QDebug>
28#include <QDebug>
29+#include <QStandardPaths>
29
30
30class LauncherBackendItem
31class LauncherBackendItem
31{
32{
@@ -232,10 +233,7 @@ QString LauncherBackend::findDesktopFile(const QString &appId) const
232 int dashPos = -1;
233 int dashPos = -1;
233 QString helper = appId;
234 QString helper = appId;
234
235
235− QStringList searchDirs;
236+ QStringList searchDirs = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation);
236− searchDirs << QDir::homePath() + "/.local/share/applications";
237− searchDirs << "/usr/share/applications";
238−
239#ifdef LAUNCHER_TESTING
237#ifdef LAUNCHER_TESTING
240 searchDirs << "";
238 searchDirs << "";
241#endif
239#endif