on xenial help sign in
Add more comments
ac626e7Ying-Chun Liu
qml/Shell.qml+4
@@ -283,9 +283,12 @@ FocusScope {
283 target: DBusUnitySessionService
283 target: DBusUnitySessionService
284
284
285 onLogoutRequested: {
285 onLogoutRequested: {
286+ // TODO: Display a dialog to ask the user to confirm.
287+ DBusUnitySessionService.Logout();
286 }
288 }
287
289
288 onLogoutReady: {
290 onLogoutReady: {
291+ // close all the apps.
289 while (true) {
292 while (true) {
290 var app = ApplicationManager.get(0);
293 var app = ApplicationManager.get(0);
291 if (app === null) {
294 if (app === null) {
@@ -293,6 +296,7 @@ FocusScope {
293 }
296 }
294 ApplicationManager.stopApplication(app.appId);
297 ApplicationManager.stopApplication(app.appId);
295 }
298 }
299+
296 Qt.quit();
300 Qt.quit();
297 }
301 }
298 }
302 }