~gerboland/unity8/initialSurfaceGeometry

« back to all changes in this revision

Viewing changes to qml/Components/Dialogs.qml

  • Committer: Gerry Boland
  • Date: 2014-12-09 12:55:58 UTC
  • mfrom: (1139.1.343 unity8)
  • Revision ID: gerry.boland@canonical.com-20141209125558-d68labgupwxfz91r
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
Item {
25
25
    id: root
26
26
 
27
 
    // Explicitly use the right domain for this widget because it might be used
28
 
    // in other applications like the welcome wizard.
29
 
    readonly property string domain: "unity8"
30
 
 
31
27
    function onPowerKeyPressed() {
32
28
        // FIXME: event.isAutoRepeat is always false on Nexus 4.
33
29
        // So we use powerKeyTimer.running to avoid the PowerOff key repeat
71
67
        id: logoutDialog
72
68
        Dialog {
73
69
            id: dialogueLogout
74
 
            title: i18n.dtr(root.domain, "Log out")
75
 
            text: i18n.dtr(root.domain, "Are you sure you want to log out?")
 
70
            title: i18n.tr("Log out")
 
71
            text: i18n.tr("Are you sure you want to log out?")
76
72
            Button {
77
 
                text: i18n.dtr(root.domain, "No")
 
73
                text: i18n.tr("No")
78
74
                onClicked: {
79
75
                    PopupUtils.close(dialogueLogout);
80
76
                    d.dialogShown = false;
81
77
                }
82
78
            }
83
79
            Button {
84
 
                text: i18n.dtr(root.domain, "Yes")
 
80
                text: i18n.tr("Yes")
85
81
                onClicked: {
86
82
                    DBusUnitySessionService.Logout();
87
83
                    PopupUtils.close(dialogueLogout);
95
91
        id: shutdownDialog
96
92
        Dialog {
97
93
            id: dialogueShutdown
98
 
            title: i18n.dtr(root.domain, "Shut down")
99
 
            text: i18n.dtr(root.domain, "Are you sure you want to shut down?")
 
94
            title: i18n.tr("Shut down")
 
95
            text: i18n.tr("Are you sure you want to shut down?")
100
96
            Button {
101
 
                text: i18n.dtr(root.domain, "No")
 
97
                text: i18n.tr("No")
102
98
                onClicked: {
103
99
                    PopupUtils.close(dialogueShutdown);
104
100
                    d.dialogShown = false;
105
101
                }
106
102
            }
107
103
            Button {
108
 
                text: i18n.dtr(root.domain, "Yes")
 
104
                text: i18n.tr("Yes")
109
105
                onClicked: {
110
106
                    dBusUnitySessionServiceConnection.closeAllApps();
111
107
                    DBusUnitySessionService.Shutdown();
120
116
        id: rebootDialog
121
117
        Dialog {
122
118
            id: dialogueReboot
123
 
            title: i18n.dtr(root.domain, "Reboot")
124
 
            text: i18n.dtr(root.domain, "Are you sure you want to reboot?")
 
119
            title: i18n.tr("Reboot")
 
120
            text: i18n.tr("Are you sure you want to reboot?")
125
121
            Button {
126
 
                text: i18n.dtr(root.domain, "No")
 
122
                text: i18n.tr("No")
127
123
                onClicked: {
128
124
                    PopupUtils.close(dialogueReboot)
129
125
                    d.dialogShown = false;
130
126
                }
131
127
            }
132
128
            Button {
133
 
                text: i18n.dtr(root.domain, "Yes")
 
129
                text: i18n.tr("Yes")
134
130
                onClicked: {
135
131
                    dBusUnitySessionServiceConnection.closeAllApps();
136
132
                    DBusUnitySessionService.Reboot();
145
141
        id: powerDialog
146
142
        Dialog {
147
143
            id: dialoguePower
148
 
            title: i18n.dtr(root.domain, "Power")
149
 
            text: i18n.dtr(root.domain, "Are you sure you would like\nto power off?")
 
144
            title: i18n.tr("Power")
 
145
            text: i18n.tr("Are you sure you would like\nto power off?")
150
146
            Button {
151
 
                text: i18n.dtr(root.domain, "Power off")
 
147
                text: i18n.tr("Power off")
152
148
                onClicked: {
153
149
                    dBusUnitySessionServiceConnection.closeAllApps();
154
150
                    PopupUtils.close(dialoguePower);
158
154
                color: UbuntuColors.red
159
155
            }
160
156
            Button {
161
 
                text: i18n.dtr(root.domain, "Restart")
 
157
                text: i18n.tr("Restart")
162
158
                onClicked: {
163
159
                    dBusUnitySessionServiceConnection.closeAllApps();
164
160
                    DBusUnitySessionService.Reboot();
168
164
                color: UbuntuColors.green
169
165
            }
170
166
            Button {
171
 
                text: i18n.dtr(root.domain, "Cancel")
 
167
                text: i18n.tr("Cancel")
172
168
                onClicked: {
173
169
                    PopupUtils.close(dialoguePower);
174
170
                    d.dialogShown = false;