on xenial help sign in
make closeAllApps as separate function.
commitb1c04020df88d30042968a45f4a189b0ca5809df authorYing-Chun Liu <paul.liu@canonical.com> dateWed 14 May 2014, 22:04 (12 years ago) parent1f4ce25
1 file changed+9−7
qml/Shell.qml+9−7
qml/Shell.qml+9−7
@@ -282,13 +282,7 @@ FocusScope {
282282 Connections {
283283 target: DBusUnitySessionService
284284
285− onLogoutRequested: {
286− // TODO: Display a dialog to ask the user to confirm.
287− DBusUnitySessionService.Logout();
288− }
289−
290− onLogoutReady: {
291− // close all the apps.
285+ function closeAllApps() {
292286 while (true) {
293287 var app = ApplicationManager.get(0);
294288 if (app === null) {
@@ -296,7 +290,15 @@ FocusScope {
296290 }
297291 ApplicationManager.stopApplication(app.appId);
298292 }
293+ }
299294
295+ onLogoutRequested: {
296+ // TODO: Display a dialog to ask the user to confirm.
297+ DBusUnitySessionService.Logout();
298+ }
299+
300+ onLogoutReady: {
301+ closeAllApps();
300302 Qt.quit();
301303 }
302304 }