@@ -18,15 +18,18 @@ import QtQuick 2.0
19import Unity.Application 0.1
19import Unity.Application 0.1
20import Unity.Session 0.1
20import Unity.Session 0.1
21−import Ubuntu.Components 0.1
21+import Ubuntu.Components 1.1
22import Ubuntu.Components.Popups 0.1
22import Ubuntu.Components.Popups 0.1
27 function onPowerKeyPressed() {
27 function onPowerKeyPressed() {
28+ // FIXME: event.isAutoRepeat is always false on Nexus 4.
29+ // So we use powerKeyTimer.running to avoid the PowerOff key repeat
30+ // https://launchpad.net/bugs/1349416
28 if (!powerKeyTimer.running) {
31 if (!powerKeyTimer.running) {
29− powerKeyTimer.start();
32+ powerKeyTimer.restart();
@@ -148,15 +151,7 @@ Item {
148 d.dialogShown = false;
151 d.dialogShown = false;
149 root.powerOffClicked();
152 root.powerOffClicked();
151− }
154+ color: UbuntuColors.red
153− text: i18n.tr("Restart")
155− dBusUnitySessionServiceConnection.closeAllApps();
156− DBusUnitySessionService.Reboot();
157− PopupUtils.close(dialoguePower);
158− d.dialogShown = false;
162 text: i18n.tr("Cancel")
157 text: i18n.tr("Cancel")
@@ -164,6 +159,7 @@ Item {
164 PopupUtils.close(dialoguePower);
159 PopupUtils.close(dialoguePower);
165 d.dialogShown = false;
160 d.dialogShown = false;
162+ color: UbuntuColors.coolGrey