~mzanetti/unity8/modeswitchwarning

« back to all changes in this revision

Viewing changes to qml/Shell.qml

  • Committer: Michael Zanetti
  • Date: 2015-10-28 10:45:32 UTC
  • Revision ID: michael.zanetti@canonical.com-20151028104532-mri1lrgbew02oug3
cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
import Unity.Indicators 0.1 as Indicators
43
43
import Cursor 1.0
44
44
 
 
45
 
45
46
Item {
46
47
    id: shell
47
48
 
97
98
    property var modeSwitchWarningPopup: null
98
99
    onUsageScenarioChanged: {
99
100
        if (usageScenario != "desktop" && legacyAppsModel.count > 0 && !modeSwitchWarningPopup) {
100
 
            var popup = PopupUtils.open(Qt.resolvedUrl("Components/ModeSwitchWarningDialog.qml"), shell, {model: legacyAppsModel})
 
101
            var popup = PopupUtils.open(Qt.resolvedUrl("Components/ModeSwitchWarningDialog.qml"), shell, {model: legacyAppsModel});
101
102
            popup.forceClose.connect(function() {
102
103
                while (legacyAppsModel.count > 0) {
103
 
                    ApplicationManager.stopApplication(legacyAppsModel.get(0).appId)
 
104
                    ApplicationManager.stopApplication(legacyAppsModel.get(0).appId);
104
105
                }
105
106
            })
106
107
        } else if (usageScenario == "desktop" && modeSwitchWarningPopup) {
107
 
            PopupUtls.close(modeSwitchWarningPopup)
 
108
            PopupUtls.close(modeSwitchWarningPopup);
 
109
            modeSwitchWarningPopup = null;
108
110
        }
109
111
    }
110
112