on xenial help sign in
open the application when clicking on the title entry in the quicklist Fixes: 1336380
14dd4e3Michael Zanetti
plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -30,6 +30,6 @@ add_library(UnityLauncher-qml MODULE
30
30
31target_link_libraries(UnityLauncher-qml ${GSETTINGS_QT_LDFLAGS})
31target_link_libraries(UnityLauncher-qml ${GSETTINGS_QT_LDFLAGS})
32
32
33−qt5_use_modules(UnityLauncher-qml DBus Qml)
33+qt5_use_modules(UnityLauncher-qml DBus Qml Gui)
34
34
35add_unity8_plugin(Unity.Launcher 0.1 Unity/Launcher TARGETS UnityLauncher-qml)
35add_unity8_plugin(Unity.Launcher 0.1 Unity/Launcher TARGETS UnityLauncher-qml)
plugins/Unity/Launcher/launcheritem.cpp+1
@@ -36,6 +36,7 @@ LauncherItem::LauncherItem(const QString &appId, const QString &name, const QStr
36 m_quickList(new QuickListModel(this))
36 m_quickList(new QuickListModel(this))
37{
37{
38 QuickListEntry nameAction;
38 QuickListEntry nameAction;
39+ nameAction.setActionId("launch_item");
39 nameAction.setText(m_name);
40 nameAction.setText(m_name);
40 m_quickList->appendAction(nameAction);
41 m_quickList->appendAction(nameAction);
41 QuickListEntry pinningAction;
42 QuickListEntry pinningAction;
plugins/Unity/Launcher/launchermodel.cpp+3
@@ -23,6 +23,7 @@
23
23
24#include <unity/shell/application/ApplicationInfoInterface.h>
24#include <unity/shell/application/ApplicationInfoInterface.h>
25
25
26+#include <QDesktopServices>
26#include <QDebug>
27#include <QDebug>
27
28
28using namespace unity::shell::application;
29using namespace unity::shell::application;
@@ -191,6 +192,8 @@ void LauncherModel::quickListActionInvoked(const QString &appId, int actionIndex
191 } else {
192 } else {
192 pin(appId);
193 pin(appId);
193 }
194 }
195+ } else if (actionId == "launch_item") {
196+ QDesktopServices::openUrl(getUrlForAppId(appId));
194
197
195 // Nope, we don't know this action, let the backend forward it to the application
198 // Nope, we don't know this action, let the backend forward it to the application
196 } else {
199 } else {
qml/Shell.qml+2
@@ -147,6 +147,7 @@ Item {
147 lockscreen.show();
147 lockscreen.show();
148 }
148 }
149 greeter.hide();
149 greeter.hide();
150+ launcher.hide();
150 }
151 }
151
152
152 onFocusedApplicationIdChanged: {
153 onFocusedApplicationIdChanged: {
@@ -165,6 +166,7 @@ Item {
165 // for an emergency call or accepted an incoming call.
166 // for an emergency call or accepted an incoming call.
166 setFakeActiveForApp(appId)
167 setFakeActiveForApp(appId)
167 }
168 }
169+ launcher.hide();
168 }
170 }
169 }
171 }
170
172
tests/plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -50,7 +50,7 @@ add_executable(launchermodeltestExec
50 ${LAUNCHER_API_INCLUDEDIR}/unity/shell/application/ApplicationInfoInterface.h
50 ${LAUNCHER_API_INCLUDEDIR}/unity/shell/application/ApplicationInfoInterface.h
51 )
51 )
52target_link_libraries(launchermodeltestExec ${GSETTINGS_QT_LDFLAGS})
52target_link_libraries(launchermodeltestExec ${GSETTINGS_QT_LDFLAGS})
53−qt5_use_modules(launchermodeltestExec Test Core DBus)
53+qt5_use_modules(launchermodeltestExec Test Core DBus Gui)
54
54
55# copy .desktop files into build directory for shadow builds
55# copy .desktop files into build directory for shadow builds
56file(GLOB DESKTOP_FILES *.desktop)
56file(GLOB DESKTOP_FILES *.desktop)