diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2016-10-05 14:32:06 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2016-10-05 15:53:29 +0000 |
commit | f29be50497a3a8510f9a4ef9a87f62f356e5bd24 (patch) | |
tree | e42defdf699958ec098be7a46839644e97c91e5b | |
parent | c9d5103d5088fe81490d035ff4141c89b3c923f2 (diff) | |
download | neptune-ui-f29be50497a3a8510f9a4ef9a87f62f356e5bd24.tar.gz |
Use appman's preload instead of auto launching the apps itself
Previously we maintained an own list of applications which should be
auto started and minimized.
Now we use appman's preload property in info.yaml to identify the
apps which are autostarted and should be started minimized
Change-Id: If0be0732de25da73ac6fce02dee2ffbd843bac47
Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
-rw-r--r-- | imports/system/models/ApplicationManagerInterface.qml | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/imports/system/models/ApplicationManagerInterface.qml b/imports/system/models/ApplicationManagerInterface.qml index 9196606..b2071f7 100644 --- a/imports/system/models/ApplicationManagerInterface.qml +++ b/imports/system/models/ApplicationManagerInterface.qml @@ -43,20 +43,11 @@ QtObject { property string activeAppId property variant blackListItems: [] - property var minimizedItems: [NavigationService.defaultNavApp] // Apps which will be started but not shown in full screen + property var minimizedItems: [] // Apps which will be started but not shown in full screen property Item windowItem property Item mapWidget property var itemsToRelease: [] - property Timer timer: Timer { - interval: 1000 - onTriggered: { - for (var i in root.minimizedItems) { - ApplicationManager.startApplication(root.minimizedItems[i]) - } - } - } - signal applicationSurfaceReady(Item item, bool isMinimized) signal releaseApplicationSurface() @@ -64,12 +55,20 @@ QtObject { signal clusterWidgetReady(string category, Item item) Component.onCompleted: { + // Maintain a set of applications which are autostarted(preloaded) + // This is needed to know that these applications should be minimized + for (var i = 0; i < ApplicationManager.count; ++i) { + var app = ApplicationManager.get(i); + if (app.application.preload) { + minimizedItems.push(app.applicationId) + } + } + WindowManager.windowReady.connect(windowReadyHandler) WindowManager.windowClosing.connect(windowClosingHandler) ApplicationManager.applicationWasActivated.connect(applicationActivated) WindowManager.windowLost.connect(windowLostHandler) WindowManager.windowPropertyChanged.connect(windowPropertyChanged) - timer.start() } function windowReadyHandler(index, item) { |