@@ -166,40 +166,6 @@ Item {
170− id: shutdownDialogComponent
173− title: i18n.ctr("Title: Reboot/Shut down dialog", "Shut down")
174− text: i18n.tr("Are you sure you want to shut down?")
176− text: i18n.ctr("Button: Reboot the system", "Reboot")
178− root.closeAllApps();
179− unitySessionService.reboot();
180− shutdownDialog.hide();
182− color: UbuntuColors.lightGrey
185− text: i18n.ctr("Button: Shut down the system", "Shut down")
187− root.closeAllApps();
188− unitySessionService.shutdown();
189− shutdownDialog.hide();
191− color: UbuntuColors.red
194− text: i18n.tr("Cancel")
196− shutdownDialog.hide();
198− color: UbuntuColors.lightGrey
203 Component {
169 Component {
204 id: rebootDialogComponent
170 id: rebootDialogComponent
205 ShellDialog {
171 ShellDialog {
@@ -273,23 +239,16 @@ Item {
274 onShutdownRequested: {
240 onShutdownRequested: {
275 // Display a dialog to ask the user to confirm.
241 // Display a dialog to ask the user to confirm.
276− if (!dialogLoader.active) {
242+ showPowerDialog();
277− dialogLoader.sourceComponent = shutdownDialogComponent;
278− dialogLoader.focus = true;
279− dialogLoader.active = true;
283 onRebootRequested: {
245 onRebootRequested: {
284 // Display a dialog to ask the user to confirm.
246 // Display a dialog to ask the user to confirm.
285− if (!dialogLoader.active) {
247+
286− // display a combined reboot/shutdown dialog, sadly the session indicator calls rather the "Reboot()" method
248+ // display a combined reboot/shutdown dialog, sadly the session indicator calls rather the "Reboot()" method
287− // than shutdown when clicking on the "Shutdown..." menu item
249+ // than shutdown when clicking on the "Shutdown..." menu item
288− // FIXME: when/if session indicator is fixed, put the rebootDialogComponent here
250+ // FIXME: when/if session indicator is fixed, put the rebootDialogComponent here
289− dialogLoader.sourceComponent = shutdownDialogComponent;
251+ showPowerDialog();
290− dialogLoader.focus = true;
291− dialogLoader.active = true;
295 onLogoutReady: {
254 onLogoutReady: {