Merge lp:~cyphermox/ubuntu-system-settings/providePinCode into lp:ubuntu-system-settings/rtm-14.09
- providePinCode
- Merge into rtm-14.09
Proposed by
Mathieu Trudel-Lapierre
Status: | Rejected |
---|---|
Rejected by: | Sebastien Bacher |
Proposed branch: | lp:~cyphermox/ubuntu-system-settings/providePinCode |
Merge into: | lp:ubuntu-system-settings/rtm-14.09 |
Diff against target: |
5437 lines (+2440/-689) 94 files modified
debian/changelog (+33/-0) debian/control (+1/-1) plugins/about/storageabout.cpp (+11/-7) plugins/battery/PageComponent.qml (+1/-2) plugins/battery/SleepValues.qml (+19/-9) plugins/battery/battery.cpp (+4/-6) plugins/bluetooth/PageComponent.qml (+183/-148) plugins/bluetooth/agent.h (+1/-1) plugins/bluetooth/bluetooth.cpp (+1/-3) plugins/bluetooth/bluetooth.h (+5/-5) plugins/bluetooth/device.cpp (+1/-0) plugins/cellular/CMakeLists.txt (+1/-0) plugins/cellular/Components/CMakeLists.txt (+4/-1) plugins/cellular/Components/CellularMultiSim.qml (+18/-20) plugins/cellular/Components/CellularSingleSim.qml (+13/-14) plugins/cellular/Components/DefaultSim.qml (+3/-4) plugins/cellular/Components/MultiSim.qml (+120/-0) plugins/cellular/Components/NoSim.qml (+51/-0) plugins/cellular/Components/Sim.qml (+2/-0) plugins/cellular/Components/SimEditor.qml (+8/-8) plugins/cellular/Components/SingleSim.qml (+76/-0) plugins/cellular/PageChooseCarriers.qml (+9/-10) plugins/cellular/PageComponent.qml (+42/-159) plugins/cellular/sims.js (+34/-0) plugins/notifications/notification_item.cpp (+2/-1) plugins/phone/CMakeLists.txt (+5/-0) plugins/phone/CallForwarding.qml (+17/-13) plugins/phone/CallWaiting.qml (+14/-3) plugins/phone/MultiSim.qml (+135/-0) plugins/phone/NoSims.qml (+46/-0) plugins/phone/Ofono.qml (+50/-0) plugins/phone/PageComponent.qml (+64/-39) plugins/phone/Services.qml (+4/-1) plugins/phone/SingleSim.qml (+57/-0) plugins/phone/sims.js (+34/-0) plugins/security-privacy/LockSecurity.qml (+3/-2) plugins/security-privacy/PageComponent.qml (+55/-37) plugins/security-privacy/PhoneLocking.qml (+26/-4) plugins/security-privacy/trust-store-model.cpp (+1/-1) plugins/system-update/update_manager.cpp (+2/-1) plugins/time-date/timezonelocationmodel.cpp (+2/-2) po/am.po (+1/-1) po/en_AU.po (+22/-21) po/en_GB.po (+23/-21) po/es.po (+5/-5) po/fi.po (+43/-41) po/fr.po (+4/-2) po/gl.po (+7/-7) po/he.po (+12/-12) po/hu.po (+5/-5) po/ro.po (+18/-16) po/uk.po (+22/-21) src/i18n.cpp (+1/-1) src/plugin-manager.cpp (+1/-1) src/plugin.cpp (+4/-4) tests/autopilot/ubuntu_system_settings/__init__.py (+150/-0) tests/autopilot/ubuntu_system_settings/tests/__init__.py (+60/-6) tests/autopilot/ubuntu_system_settings/tests/ofono.py (+215/-0) tests/autopilot/ubuntu_system_settings/tests/test_cellular.py (+96/-1) tests/autopilot/ubuntu_system_settings/tests/test_phone.py (+111/-0) tests/autopilot/ubuntu_system_settings/tests/test_security.py (+173/-0) tests/plugins/bluetooth/tst_bluetooth.cpp (+1/-1) tests/plugins/bluetooth/tst_devicemodel.cpp (+1/-1) tests/plugins/system-update/tst_update.cpp (+1/-1) tests/plugins/system-update/tst_updatemanager.cpp (+1/-1) tests/test-plugin2.cpp (+2/-2) tests/tst_arguments.cpp (+1/-1) tests/tst_plugins.cpp (+1/-1) wizard/qml/Components/CheckableSetting.qml (+80/-0) wizard/qml/Components/Page.qml (+4/-1) wizard/qml/Pages/30-location.qml (+72/-0) wizard/qml/Pages/40-reporting.qml (+2/-4) wizard/qml/Pages/80-finished.qml (+2/-4) wizard/qml/Pages/data/HEREposconsent_da-DK.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_de-DE.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_en-GB.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_en-US.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_es-ES.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_es-MX.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_fr-FR.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_it-IT.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_ja-JP.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_ko-KR.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_nl-NL.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_pl-PL.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_pt-BR.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_pt-PT.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_ru-RU.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_sv-SE.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_zh-CN.html (+1/-0) wizard/qml/Pages/data/HEREposconsent_zh-TW.html (+1/-0) wizard/qml/Pages/no-sim.qml (+2/-4) wizard/qml/Pages/terms.qml (+119/-0) wizard/qml/main.qml (+2/-1) |
To merge this branch: | bzr merge lp:~cyphermox/ubuntu-system-settings/providePinCode |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sebastien Bacher (community) | Needs Fixing | ||
Review via email: mp+232319@code.launchpad.net |
Commit message
Fix the PIN code handling for bluetooth device authentication.
Description of the change
Fix the PIN code handling for bluetooth device authentication.
To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote : | # |
rejecting since we don't use a specific rtm serie
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' |
2 | --- debian/changelog 2014-08-19 15:26:56 +0000 |
3 | +++ debian/changelog 2014-08-26 21:07:36 +0000 |
4 | @@ -1,3 +1,36 @@ |
5 | +ubuntu-system-settings (0.3+14.10.20140825-0ubuntu1) utopic; urgency=low |
6 | + |
7 | + [ Ken VanDine ] |
8 | + * Added autopilot tests for security-privacy |
9 | + |
10 | + [ jonas-drange ] |
11 | + * [phone] adding dual sim functionality to phone panel |
12 | + |
13 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 25 Aug 2014 15:19:31 +0000 |
14 | + |
15 | +ubuntu-system-settings (0.3+14.10.20140822.1-0ubuntu1) utopic; urgency=low |
16 | + |
17 | + [ Charles Kerr ] |
18 | + * In the welcome wizard, refresh the text in the 'no sim card' and |
19 | + 'all done' pages to match the latest from design. |
20 | + |
21 | + [ Michael Terry ] |
22 | + * Add a location page and a terms and conditions page for the HERE |
23 | + service. |
24 | + |
25 | + [ Ken VanDine ] |
26 | + * Settings for idle/lock timeout (LP: #1230345) |
27 | + * Added flickable to fix scrolling (LP: #1354161) |
28 | + |
29 | + [ Jussi Pakkanen ] |
30 | + * Fix a bunch of compiler warnings. |
31 | + |
32 | + [ jonas-drange ] |
33 | + * [cellular] displays cellular UIs based on how many SIMs are present. |
34 | + (LP: #1357393) |
35 | + |
36 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 22 Aug 2014 18:57:00 +0000 |
37 | + |
38 | ubuntu-system-settings (0.3+14.10.20140819.1-0ubuntu1) utopic; urgency=low |
39 | |
40 | [ Sebastien Bacher ] |
41 | |
42 | === modified file 'debian/control' |
43 | --- debian/control 2014-08-19 14:56:31 +0000 |
44 | +++ debian/control 2014-08-26 21:07:36 +0000 |
45 | @@ -56,7 +56,7 @@ |
46 | bluez (>= 4.36), |
47 | dbus-property-service [amd64 armhf i386], |
48 | gsettings-desktop-schemas, |
49 | - gsettings-ubuntu-schemas (>= 0.0.2+14.10.20140813), |
50 | + gsettings-ubuntu-schemas (>= 0.0.2+14.10.20140815), |
51 | indicator-bluetooth (>> 0.0.6+13.10.20131010), |
52 | indicator-network (>= 0.5.0+13.10.20130918), |
53 | powerd (>= 0.15) | gnome-settings-daemon, |
54 | |
55 | === modified file 'plugins/about/storageabout.cpp' |
56 | --- plugins/about/storageabout.cpp 2014-07-24 10:57:43 +0000 |
57 | +++ plugins/about/storageabout.cpp 2014-08-26 21:07:36 +0000 |
58 | @@ -60,7 +60,7 @@ |
59 | GAsyncReadyCallback callback, |
60 | gpointer user_data) |
61 | { |
62 | - MeasureData *data = (MeasureData *) user_data; |
63 | + auto *data = static_cast<MeasureData *>(user_data); |
64 | |
65 | GFile *file = g_file_new_for_path (filename); |
66 | |
67 | @@ -103,7 +103,7 @@ |
68 | GError *err = NULL; |
69 | GFile *file = G_FILE (source_object); |
70 | |
71 | - MeasureData *data = (MeasureData *) user_data; |
72 | + auto data = static_cast<MeasureData *>(user_data); |
73 | |
74 | guint64 *size = (guint64 *) data->size; |
75 | |
76 | @@ -137,6 +137,11 @@ |
77 | QObject(parent), |
78 | m_clickModel(), |
79 | m_clickFilterProxy(&m_clickModel), |
80 | + m_moviesSize(0), |
81 | + m_audioSize(0), |
82 | + m_picturesSize(0), |
83 | + m_otherSize(0), |
84 | + m_homeSize(0), |
85 | m_propertyService(new QDBusInterface(PROPERTY_SERVICE_OBJ, |
86 | PROPERTY_SERVICE_PATH, |
87 | PROPERTY_SERVICE_OBJ, |
88 | @@ -147,10 +152,10 @@ |
89 | |
90 | QString StorageAbout::serialNumber() |
91 | { |
92 | - static char serialBuffer[PROP_NAME_MAX]; |
93 | |
94 | if (m_serialNumber.isEmpty() || m_serialNumber.isNull()) |
95 | { |
96 | + char serialBuffer[PROP_VALUE_MAX]; |
97 | property_get("ro.serialno", serialBuffer, ""); |
98 | m_serialNumber = QString(serialBuffer); |
99 | } |
100 | @@ -160,11 +165,10 @@ |
101 | |
102 | QString StorageAbout::vendorString() |
103 | { |
104 | - static char manufacturerBuffer[PROP_NAME_MAX]; |
105 | - static char modelBuffer[PROP_NAME_MAX]; |
106 | - |
107 | if (m_vendorString.isEmpty() || m_vendorString.isNull()) |
108 | { |
109 | + char manufacturerBuffer[PROP_VALUE_MAX]; |
110 | + char modelBuffer[PROP_VALUE_MAX]; |
111 | property_get("ro.product.manufacturer", manufacturerBuffer, ""); |
112 | property_get("ro.product.model", modelBuffer, ""); |
113 | m_vendorString = QString("%1 %2").arg(manufacturerBuffer).arg(modelBuffer); |
114 | @@ -175,10 +179,10 @@ |
115 | |
116 | QString StorageAbout::deviceBuildDisplayID() |
117 | { |
118 | - static char serialBuffer[PROP_NAME_MAX]; |
119 | |
120 | if (m_deviceBuildDisplayID.isEmpty() || m_deviceBuildDisplayID.isNull()) |
121 | { |
122 | + char serialBuffer[PROP_VALUE_MAX]; |
123 | property_get("ro.build.display.id", serialBuffer, ""); |
124 | m_deviceBuildDisplayID = QString(serialBuffer); |
125 | } |
126 | |
127 | === modified file 'plugins/battery/PageComponent.qml' |
128 | --- plugins/battery/PageComponent.qml 2014-08-12 19:22:39 +0000 |
129 | +++ plugins/battery/PageComponent.qml 2014-08-26 21:07:36 +0000 |
130 | @@ -57,7 +57,7 @@ |
131 | |
132 | GSettings { |
133 | id: powerSettings |
134 | - schema.id: batteryBackend.powerdRunning ? "com.canonical.powerd" : "org.gnome.desktop.session" |
135 | + schema.id: batteryBackend.powerdRunning ? "com.ubuntu.touch.system" : "org.gnome.desktop.session" |
136 | } |
137 | |
138 | UbuntuSecurityPrivacyPanel { |
139 | @@ -322,7 +322,6 @@ |
140 | onClicked: pageStack.push( |
141 | Qt.resolvedUrl("SleepValues.qml"), |
142 | { title: text, lockOnSuspend: lockOnSuspend }) |
143 | - visible: showAllUI // TODO: re-enable once bug #1230345 is resolved |
144 | } |
145 | ListItem.Standard { |
146 | text: i18n.tr("Wi-Fi") |
147 | |
148 | === modified file 'plugins/battery/SleepValues.qml' |
149 | --- plugins/battery/SleepValues.qml 2013-09-30 16:48:16 +0000 |
150 | +++ plugins/battery/SleepValues.qml 2014-08-26 21:07:36 +0000 |
151 | @@ -31,11 +31,12 @@ |
152 | |
153 | ItemPage { |
154 | id: root |
155 | - |
156 | + objectName: "sleepValues" |
157 | flickable: scrollWidget |
158 | |
159 | property alias usePowerd: batteryBackend.powerdRunning |
160 | property bool lockOnSuspend |
161 | + property variant idleValues: [60,120,180,240,300,600] |
162 | |
163 | UbuntuBatteryPanel { |
164 | id: batteryBackend |
165 | @@ -43,19 +44,20 @@ |
166 | |
167 | GSettings { |
168 | id: powerSettings |
169 | - schema.id: usePowerd ? "com.canonical.powerd" : "org.gnome.desktop.session" |
170 | + schema.id: usePowerd ? "com.ubuntu.touch.system" : "org.gnome.desktop.session" |
171 | onChanged: { |
172 | if (key == "activityTimeout" || key == "idleDelay") |
173 | - if([60,120,180,240,300].indexOf(value) != -1) |
174 | - sleepSelector.selectedIndex = (value/60)-1 |
175 | + var curIndex = idleValues.indexOf(value) |
176 | + if( curIndex != -1) |
177 | + sleepSelector.selectedIndex = curIndex |
178 | else if(value === 0) |
179 | - sleepSelector.selectedIndex = 5 |
180 | + sleepSelector.selectedIndex = 6 |
181 | } |
182 | Component.onCompleted: { |
183 | if (usePowerd) |
184 | - sleepSelector.selectedIndex = (powerSettings.activityTimeout === 0) ? 5 : powerSettings.activityTimeout/60-1 |
185 | + sleepSelector.selectedIndex = (powerSettings.activityTimeout === 0) ? 6 : idleValues.indexOf(powerSettings.activityTimeout) |
186 | else |
187 | - sleepSelector.selectedIndex = (powerSettings.idleDelay === 0) ? 5 : powerSettings.idleDelay/60-1 |
188 | + sleepSelector.selectedIndex = (powerSettings.idleDelay === 0) ? 6 : idleValues.indexOf(powerSettings.idleDelay) |
189 | } |
190 | } |
191 | |
192 | @@ -71,7 +73,11 @@ |
193 | |
194 | ListItem.ItemSelector { |
195 | id: sleepSelector |
196 | + objectName: "sleepSelector" |
197 | text: lockOnSuspend ? i18n.tr("Lock the phone when it's not in use:") : i18n.tr("Put the phone to sleep when it is not in use:") |
198 | + delegate: OptionSelectorDelegate { |
199 | + text: modelData |
200 | + } |
201 | model: [ |
202 | // TRANSLATORS: %1 is the number of minutes |
203 | i18n.tr("After %1 minute", |
204 | @@ -93,13 +99,17 @@ |
205 | i18n.tr("After %1 minute", |
206 | "After %1 minutes", |
207 | 5).arg(5), |
208 | + // TRANSLATORS: %1 is the number of minutes |
209 | + i18n.tr("After %1 minute", |
210 | + "After %1 minutes", |
211 | + 10).arg(10), |
212 | i18n.tr("Never")] |
213 | expanded: true |
214 | onDelegateClicked: { |
215 | if (usePowerd) |
216 | - powerSettings.activityTimeout = (index == 5) ? 0 : (index+1)*60 |
217 | + powerSettings.activityTimeout = (index == 6) ? 0 : idleValues[index] |
218 | else |
219 | - powerSettings.idleDelay = (index == 5) ? 0 : (index+1)*60 |
220 | + powerSettings.idleDelay = (index == 6) ? 0 : idleValues[index] |
221 | } |
222 | } |
223 | |
224 | |
225 | === modified file 'plugins/battery/battery.cpp' |
226 | --- plugins/battery/battery.cpp 2013-09-30 11:09:29 +0000 |
227 | +++ plugins/battery/battery.cpp 2014-08-26 21:07:36 +0000 |
228 | @@ -28,7 +28,7 @@ |
229 | GParamSpec *pspec G_GNUC_UNUSED, |
230 | gpointer user_data) |
231 | { |
232 | - Battery * object = (Battery *) user_data; |
233 | + auto object = static_cast<Battery *>(user_data); |
234 | |
235 | Q_EMIT (object->wifiEnabledChanged()); |
236 | } |
237 | @@ -65,7 +65,6 @@ |
238 | UpClient *client; |
239 | gboolean returnIsOk; |
240 | GPtrArray *devices; |
241 | - UpDevice *device; |
242 | UpDeviceKind kind; |
243 | |
244 | client = up_client_new(); |
245 | @@ -77,6 +76,7 @@ |
246 | devices = up_client_get_devices(client); |
247 | |
248 | for (uint i=0; i < devices->len; i++) { |
249 | + UpDevice *device; |
250 | device = (UpDevice *)g_ptr_array_index(devices, i); |
251 | g_object_get(device, "kind", &kind, NULL); |
252 | if (kind == UP_DEVICE_KIND_BATTERY) { |
253 | @@ -111,7 +111,6 @@ |
254 | |
255 | void Battery::getLastFullCharge() |
256 | { |
257 | - UpHistoryItem *item; |
258 | GPtrArray *values = NULL; |
259 | gint32 offset = 0; |
260 | GTimeVal timeval; |
261 | @@ -130,7 +129,7 @@ |
262 | g_object_get (m_device, "capacity", &maxCapacity, NULL); |
263 | |
264 | for (uint i=0; i < values->len; i++) { |
265 | - item = (UpHistoryItem *) g_ptr_array_index(values, i); |
266 | + auto item = static_cast<UpHistoryItem *>(g_ptr_array_index(values, i)); |
267 | |
268 | /* Getting the next point after full charge, since upower registers only on state changes, |
269 | typically you get no data while the device is fully charged and plugged and you get a discharging |
270 | @@ -155,7 +154,6 @@ |
271 | if (deviceString.isNull() || deviceString.isEmpty()) |
272 | return QVariantList(); |
273 | |
274 | - UpHistoryItem *item; |
275 | GPtrArray *values = NULL; |
276 | gint32 offset = 0; |
277 | GTimeVal timeval; |
278 | @@ -174,7 +172,7 @@ |
279 | } |
280 | |
281 | for (uint i=values->len-1; i > 0; i--) { |
282 | - item = (UpHistoryItem *) g_ptr_array_index(values, i); |
283 | + auto item = static_cast<UpHistoryItem *>(g_ptr_array_index(values, i)); |
284 | |
285 | if (up_history_item_get_state(item) == UP_DEVICE_STATE_UNKNOWN) |
286 | continue; |
287 | |
288 | === modified file 'plugins/bluetooth/PageComponent.qml' |
289 | --- plugins/bluetooth/PageComponent.qml 2014-07-29 15:09:23 +0000 |
290 | +++ plugins/bluetooth/PageComponent.qml 2014-08-26 21:07:36 +0000 |
291 | @@ -29,6 +29,8 @@ |
292 | |
293 | ItemPage { |
294 | id: root |
295 | + title: i18n.tr("Bluetooth") |
296 | + |
297 | UbuntuBluetoothPanel { id: backend } |
298 | |
299 | Component { |
300 | @@ -49,19 +51,22 @@ |
301 | Connections { |
302 | target: backend.agent |
303 | onPasskeyConfirmationNeeded: { |
304 | + var request_tag = tag |
305 | var popup = PopupUtils.open(confirmPasskeyDialog, root, {passkey: passkey, name: device.name}) |
306 | - popup.canceled.connect(function() {target.confirmPasskey(tag, false)}) |
307 | - popup.confirmed.connect(function() {target.confirmPasskey(tag, true)}) |
308 | + popup.canceled.connect(function() {target.confirmPasskey(request_tag, false)}) |
309 | + popup.confirmed.connect(function() {target.confirmPasskey(request_tag, true)}) |
310 | } |
311 | onPasskeyNeeded: { |
312 | + var request_tag = tag |
313 | var popup = PopupUtils.open(providePasskeyDialog, root, {name: device.name}) |
314 | - popup.canceled.connect(function() {target.providePasskey(tag, false, 0)}) |
315 | - popup.provided.connect(function(passkey) {target.providePasskey(tag, true, passkey)}) |
316 | + popup.canceled.connect(function() {target.providePasskey(request_tag, false, 0)}) |
317 | + popup.provided.connect(function(passkey) {target.providePasskey(request_tag, true, passkey)}) |
318 | } |
319 | onPinCodeNeeded: { |
320 | + var request_tag = tag |
321 | var popup = PopupUtils.open(providePinCodeDialog, root, {name: device.name}) |
322 | - popup.canceled.connect(function() {target.providePinCode(tag, false, "")}) |
323 | - popup.provided.connect(function(pinCode) {target.providePinCode(tag, true, pinCode)}) |
324 | + popup.canceled.connect(function() {target.providePinCode(request_tag, false, "")}) |
325 | + popup.provided.connect(function(pinCode) {target.providePinCode(request_tag, true, pinCode)}) |
326 | } |
327 | } |
328 | |
329 | @@ -112,14 +117,20 @@ |
330 | } |
331 | } |
332 | |
333 | - Page { |
334 | - id: mainPage |
335 | - title: i18n.tr("Bluetooth") |
336 | - visible: true |
337 | + |
338 | + Flickable { |
339 | anchors.fill: parent |
340 | + contentHeight: contentItem.childrenRect.height |
341 | + boundsBehavior: (contentHeight > root.height) ? |
342 | + Flickable.DragAndOvershootBounds : |
343 | + Flickable.StopAtBounds |
344 | + /* Set the direction to workaround https://bugreports.qt-project.org/browse/QTBUG-31905 |
345 | + otherwise the UI might end up in a situation where scrolling doesn't work */ |
346 | + flickableDirection: Flickable.VerticalFlick |
347 | |
348 | Column { |
349 | - anchors.fill: parent |
350 | + anchors.left: parent.left |
351 | + anchors.right: parent.right |
352 | |
353 | QDBusActionGroup { |
354 | id: bluetoothActionGroup |
355 | @@ -205,27 +216,30 @@ |
356 | visible: connectedList.visible |
357 | } |
358 | |
359 | - ListView { |
360 | + Column { |
361 | id: connectedList |
362 | - width: parent.width |
363 | - height: connectedHeader.height * count |
364 | - |
365 | + anchors { |
366 | + left: parent.left |
367 | + right: parent.right |
368 | + } |
369 | visible: bluetoothActionGroup.enabled && (count > 0) |
370 | |
371 | - model: backend.connectedDevices |
372 | - delegate: ListItem.Standard { |
373 | - iconSource: iconPath |
374 | - iconFrame: false |
375 | - text: getDisplayName(type, displayName) |
376 | - control: ActivityIndicator { |
377 | - visible: connection == Device.Connecting |
378 | - running: true |
379 | - } |
380 | - onClicked: { |
381 | - backend.setSelectedDevice(addressName); |
382 | - pageStack.push(connectedDevicePage); |
383 | - } |
384 | - progression: true |
385 | + Repeater { |
386 | + model: backend.connectedDevices |
387 | + delegate: ListItem.Standard { |
388 | + iconSource: iconPath |
389 | + iconFrame: false |
390 | + text: getDisplayName(type, displayName) |
391 | + control: ActivityIndicator { |
392 | + visible: connection == Device.Connecting |
393 | + running: true |
394 | + } |
395 | + onClicked: { |
396 | + backend.setSelectedDevice(addressName); |
397 | + pageStack.push(connectedDevicePage); |
398 | + } |
399 | + progression: true |
400 | + } |
401 | } |
402 | } |
403 | |
404 | @@ -241,24 +255,27 @@ |
405 | } |
406 | } |
407 | |
408 | - ListView { |
409 | + Column { |
410 | id: disconnectedList |
411 | - width: parent.width |
412 | - height: disconnectedHeader.height * count |
413 | - |
414 | + anchors { |
415 | + left: parent.left |
416 | + right: parent.right |
417 | + } |
418 | visible: bluetoothActionGroup.enabled && (count > 0) |
419 | |
420 | - model: backend.disconnectedDevices |
421 | - delegate: ListItem.Standard { |
422 | - iconSource: iconPath |
423 | - iconFrame: false |
424 | - text: getDisplayName(type, displayName) |
425 | - enabled: backend.isSupportedType(type) |
426 | - onClicked: { |
427 | - backend.setSelectedDevice(addressName); |
428 | - pageStack.push(connectedDevicePage); |
429 | + Repeater { |
430 | + model: backend.disconnectedDevices |
431 | + delegate: ListItem.Standard { |
432 | + iconSource: iconPath |
433 | + iconFrame: false |
434 | + text: getDisplayName(type, displayName) |
435 | + enabled: backend.isSupportedType(type) |
436 | + onClicked: { |
437 | + backend.setSelectedDevice(addressName); |
438 | + pageStack.push(connectedDevicePage); |
439 | + } |
440 | + progression: true |
441 | } |
442 | - progression: true |
443 | } |
444 | } |
445 | ListItem.Standard { |
446 | @@ -275,23 +292,27 @@ |
447 | visible: autoconnectList.visible |
448 | enabled: bluetoothActionGroup.enabled |
449 | } |
450 | - ListView { |
451 | + Column { |
452 | id: autoconnectList |
453 | - width: parent.width |
454 | - height: autoconnectHeader.height * count |
455 | + anchors { |
456 | + left: parent.left |
457 | + right: parent.right |
458 | + } |
459 | |
460 | visible: bluetoothActionGroup.enabled && (count > 0) |
461 | |
462 | - model: backend.autoconnectDevices |
463 | - delegate: ListItem.Standard { |
464 | - iconSource: iconPath |
465 | - iconFrame: false |
466 | - text: getDisplayName(type, displayName) |
467 | - onClicked: { |
468 | - backend.setSelectedDevice(addressName); |
469 | - pageStack.push(connectedDevicePage); |
470 | + Repeater { |
471 | + model: backend.autoconnectDevices |
472 | + delegate: ListItem.Standard { |
473 | + iconSource: iconPath |
474 | + iconFrame: false |
475 | + text: getDisplayName(type, displayName) |
476 | + onClicked: { |
477 | + backend.setSelectedDevice(addressName); |
478 | + pageStack.push(connectedDevicePage); |
479 | + } |
480 | + progression: true |
481 | } |
482 | - progression: true |
483 | } |
484 | } |
485 | } |
486 | @@ -302,100 +323,114 @@ |
487 | title: backend.selectedDevice ? backend.selectedDevice.name : i18n.tr("None") |
488 | visible: false |
489 | |
490 | - Column { |
491 | + Flickable { |
492 | anchors.fill: parent |
493 | - |
494 | - ListItem.SingleValue { |
495 | - text: i18n.tr("Name") |
496 | - value: backend.selectedDevice ? backend.selectedDevice.name : i18n.tr("None") |
497 | - } |
498 | - ListItem.Standard { |
499 | - Rectangle { |
500 | - color: "transparent" |
501 | - anchors.fill: parent |
502 | - anchors.topMargin: units.gu(1) |
503 | - anchors.leftMargin: units.gu(2) |
504 | - anchors.rightMargin: units.gu(2) |
505 | - |
506 | - Label { |
507 | - anchors { |
508 | - top: parent.top |
509 | - left: parent.left |
510 | - topMargin: units.gu(1) |
511 | - } |
512 | - height: units.gu(3) |
513 | - text: i18n.tr("Type") |
514 | - } |
515 | - Image { |
516 | - anchors { |
517 | - right: deviceType.left |
518 | - rightMargin: units.gu(1) |
519 | - } |
520 | - height: units.gu(4) |
521 | - width: units.gu(4) |
522 | - source: backend.selectedDevice ? backend.selectedDevice.iconName : "" |
523 | - } |
524 | - Label { |
525 | - id: deviceType |
526 | - anchors { |
527 | - top: parent.top |
528 | - right: parent.right |
529 | - topMargin: units.gu(1) |
530 | - } |
531 | - height: units.gu(3) |
532 | - text: getTypeString(backend.selectedDevice ? backend.selectedDevice.type : Device.OTHER) |
533 | - } |
534 | - } |
535 | - } |
536 | - ListItem.SingleValue { |
537 | - text: i18n.tr("Status") |
538 | - value: getStatusString(backend.selectedDevice ? backend.selectedDevice.connection : Device.Disconnected) |
539 | - } |
540 | - ListItem.SingleValue { |
541 | - text: i18n.tr("Signal Strength") |
542 | - value: getSignalString(backend.selectedDevice ? backend.selectedDevice.strength : Device.None) |
543 | - } |
544 | - ListItem.Standard { |
545 | - id: trustedCheck |
546 | - text: i18n.tr("Connect automatically when detected:") |
547 | - control: CheckBox { |
548 | - onClicked: { |
549 | - if (backend.selectedDevice) { |
550 | - backend.selectedDevice.trusted = !backend.selectedDevice.trusted |
551 | - } |
552 | - } |
553 | - checked: backend.selectedDevice ? backend.selectedDevice.trusted : false |
554 | - } |
555 | - Component.onCompleted: |
556 | - clicked.connect(trustedCheck.clicked) |
557 | - } |
558 | - ListItem.SingleControl { |
559 | - control: Button { |
560 | - text: backend.selectedDevice && (backend.selectedDevice.connection == Device.Connected || backend.selectedDevice.connection == Device.Connecting) ? i18n.tr("Disconnect") : i18n.tr("Connect") |
561 | - width: parent.width - units.gu(8) |
562 | - onClicked: { |
563 | - if (backend.selectedDevice |
564 | - && (backend.selectedDevice.connection == Device.Connected |
565 | - || backend.selectedDevice.connection == Device.Connecting)) { |
566 | - backend.disconnectDevice(); |
567 | - } else { |
568 | - backend.stopDiscovery() |
569 | - backend.connectDevice(backend.selectedDevice.address); |
570 | - } |
571 | - pageStack.pop(); |
572 | - } |
573 | - visible: backend.selectedDevice ? true : false |
574 | - } |
575 | - } |
576 | - ListItem.SingleControl { |
577 | - control: Button { |
578 | - text: i18n.tr("Forget this device") |
579 | - width: parent.width - units.gu(8) |
580 | - onClicked: { |
581 | - backend.removeDevice(); |
582 | - pageStack.pop(); |
583 | - } |
584 | - enabled: backend.selectedDevice && backend.selectedDevice.path.length > 0 ? true : false |
585 | + contentHeight: contentItem.childrenRect.height |
586 | + boundsBehavior: (contentHeight > root.height) ? |
587 | + Flickable.DragAndOvershootBounds : |
588 | + Flickable.StopAtBounds |
589 | + /* Set the direction to workaround https://bugreports.qt-project.org/browse/QTBUG-31905 |
590 | + otherwise the UI might end up in a situation where scrolling doesn't work */ |
591 | + flickableDirection: Flickable.VerticalFlick |
592 | + |
593 | + Column { |
594 | + anchors { |
595 | + left: parent.left |
596 | + right: parent.right |
597 | + } |
598 | + |
599 | + ListItem.SingleValue { |
600 | + text: i18n.tr("Name") |
601 | + value: backend.selectedDevice ? backend.selectedDevice.name : i18n.tr("None") |
602 | + } |
603 | + ListItem.Standard { |
604 | + Rectangle { |
605 | + color: "transparent" |
606 | + anchors.fill: parent |
607 | + anchors.topMargin: units.gu(1) |
608 | + anchors.leftMargin: units.gu(2) |
609 | + anchors.rightMargin: units.gu(2) |
610 | + |
611 | + Label { |
612 | + anchors { |
613 | + top: parent.top |
614 | + left: parent.left |
615 | + topMargin: units.gu(1) |
616 | + } |
617 | + height: units.gu(3) |
618 | + text: i18n.tr("Type") |
619 | + } |
620 | + Image { |
621 | + anchors { |
622 | + right: deviceType.left |
623 | + rightMargin: units.gu(1) |
624 | + } |
625 | + height: units.gu(4) |
626 | + width: units.gu(4) |
627 | + source: backend.selectedDevice ? backend.selectedDevice.iconName : "" |
628 | + } |
629 | + Label { |
630 | + id: deviceType |
631 | + anchors { |
632 | + top: parent.top |
633 | + right: parent.right |
634 | + topMargin: units.gu(1) |
635 | + } |
636 | + height: units.gu(3) |
637 | + text: getTypeString(backend.selectedDevice ? backend.selectedDevice.type : Device.OTHER) |
638 | + } |
639 | + } |
640 | + } |
641 | + ListItem.SingleValue { |
642 | + text: i18n.tr("Status") |
643 | + value: getStatusString(backend.selectedDevice ? backend.selectedDevice.connection : Device.Disconnected) |
644 | + } |
645 | + ListItem.SingleValue { |
646 | + text: i18n.tr("Signal Strength") |
647 | + value: getSignalString(backend.selectedDevice ? backend.selectedDevice.strength : Device.None) |
648 | + } |
649 | + ListItem.Standard { |
650 | + id: trustedCheck |
651 | + text: i18n.tr("Connect automatically when detected:") |
652 | + control: CheckBox { |
653 | + onClicked: { |
654 | + if (backend.selectedDevice) { |
655 | + backend.selectedDevice.trusted = !backend.selectedDevice.trusted |
656 | + } |
657 | + } |
658 | + checked: backend.selectedDevice ? backend.selectedDevice.trusted : false |
659 | + } |
660 | + Component.onCompleted: |
661 | + clicked.connect(trustedCheck.clicked) |
662 | + } |
663 | + ListItem.SingleControl { |
664 | + control: Button { |
665 | + text: backend.selectedDevice && (backend.selectedDevice.connection == Device.Connected || backend.selectedDevice.connection == Device.Connecting) ? i18n.tr("Disconnect") : i18n.tr("Connect") |
666 | + width: parent.width - units.gu(8) |
667 | + onClicked: { |
668 | + if (backend.selectedDevice |
669 | + && (backend.selectedDevice.connection == Device.Connected |
670 | + || backend.selectedDevice.connection == Device.Connecting)) { |
671 | + backend.disconnectDevice(); |
672 | + } else { |
673 | + backend.stopDiscovery() |
674 | + backend.connectDevice(backend.selectedDevice.address); |
675 | + } |
676 | + pageStack.pop(); |
677 | + } |
678 | + visible: backend.selectedDevice ? true : false |
679 | + } |
680 | + } |
681 | + ListItem.SingleControl { |
682 | + control: Button { |
683 | + text: i18n.tr("Forget this device") |
684 | + width: parent.width - units.gu(8) |
685 | + onClicked: { |
686 | + backend.removeDevice(); |
687 | + pageStack.pop(); |
688 | + } |
689 | + enabled: backend.selectedDevice && backend.selectedDevice.path.length > 0 ? true : false |
690 | + } |
691 | } |
692 | } |
693 | } |
694 | |
695 | === modified file 'plugins/bluetooth/agent.h' |
696 | --- plugins/bluetooth/agent.h 2013-09-27 14:55:53 +0000 |
697 | +++ plugins/bluetooth/agent.h 2014-08-26 21:07:36 +0000 |
698 | @@ -57,7 +57,7 @@ |
699 | void onPairingDone(); |
700 | |
701 | private: |
702 | - Q_DISABLE_COPY(Agent); |
703 | + Q_DISABLE_COPY(Agent) |
704 | |
705 | QDBusConnection m_connection; |
706 | DeviceModel &m_devices; |
707 | |
708 | === modified file 'plugins/bluetooth/bluetooth.cpp' |
709 | --- plugins/bluetooth/bluetooth.cpp 2014-07-30 02:25:07 +0000 |
710 | +++ plugins/bluetooth/bluetooth.cpp 2014-08-26 21:07:36 +0000 |
711 | @@ -151,10 +151,8 @@ |
712 | |
713 | void Bluetooth::disconnectDevice() |
714 | { |
715 | - Device::Type type; |
716 | - |
717 | if (m_selectedDevice) { |
718 | - type = m_selectedDevice->getType(); |
719 | + auto type = m_selectedDevice->getType(); |
720 | if (type == Device::Type::Headset) |
721 | m_selectedDevice->disconnect(Device::ConnectionMode::Audio); |
722 | else if (type == Device::Type::Headphones) |
723 | |
724 | === modified file 'plugins/bluetooth/bluetooth.h' |
725 | --- plugins/bluetooth/bluetooth.h 2014-07-29 16:44:03 +0000 |
726 | +++ plugins/bluetooth/bluetooth.h 2014-08-26 21:07:36 +0000 |
727 | @@ -45,22 +45,22 @@ |
728 | |
729 | Q_PROPERTY (QObject * selectedDevice |
730 | READ getSelectedDevice |
731 | - NOTIFY selectedDeviceChanged); |
732 | + NOTIFY selectedDeviceChanged) |
733 | |
734 | Q_PROPERTY (QObject * agent |
735 | - READ getAgent); |
736 | + READ getAgent) |
737 | |
738 | Q_PROPERTY (bool powered |
739 | READ isPowered |
740 | - NOTIFY poweredChanged); |
741 | + NOTIFY poweredChanged) |
742 | |
743 | Q_PROPERTY (bool discovering |
744 | READ isDiscovering |
745 | - NOTIFY discoveringChanged); |
746 | + NOTIFY discoveringChanged) |
747 | |
748 | Q_PROPERTY (bool discoverable |
749 | READ isDiscoverable |
750 | - NOTIFY discoverableChanged); |
751 | + NOTIFY discoverableChanged) |
752 | |
753 | Q_SIGNALS: |
754 | void selectedDeviceChanged(); |
755 | |
756 | === modified file 'plugins/bluetooth/device.cpp' |
757 | --- plugins/bluetooth/device.cpp 2014-07-30 14:51:27 +0000 |
758 | +++ plugins/bluetooth/device.cpp 2014-08-26 21:07:36 +0000 |
759 | @@ -453,6 +453,7 @@ |
760 | default: |
761 | return Type::OtherAudio; |
762 | } |
763 | + break; |
764 | |
765 | case 0x05: |
766 | switch ((c & 0xc0) >> 6) { |
767 | |
768 | === modified file 'plugins/cellular/CMakeLists.txt' |
769 | --- plugins/cellular/CMakeLists.txt 2014-07-17 20:59:15 +0000 |
770 | +++ plugins/cellular/CMakeLists.txt 2014-08-26 21:07:36 +0000 |
771 | @@ -9,6 +9,7 @@ |
772 | PageComponent.qml |
773 | Hotspot.qml |
774 | HotspotSetup.qml |
775 | + sims.js |
776 | ) |
777 | |
778 | |
779 | |
780 | === modified file 'plugins/cellular/Components/CMakeLists.txt' |
781 | --- plugins/cellular/Components/CMakeLists.txt 2014-07-31 20:10:40 +0000 |
782 | +++ plugins/cellular/Components/CMakeLists.txt 2014-08-26 21:07:36 +0000 |
783 | @@ -1,6 +1,9 @@ |
784 | set(QML_SOURCES |
785 | + NoSim.qml |
786 | + SingleSim.qml |
787 | + MultiSim.qml |
788 | CellularSingleSim.qml |
789 | - CellularDualSim.qml |
790 | + CellularMultiSim.qml |
791 | data-helpers.js |
792 | DefaultSim.qml |
793 | Sim.qml |
794 | |
795 | === renamed file 'plugins/cellular/Components/CellularDualSim.qml' => 'plugins/cellular/Components/CellularMultiSim.qml' |
796 | --- plugins/cellular/Components/CellularDualSim.qml 2014-08-14 13:59:57 +0000 |
797 | +++ plugins/cellular/Components/CellularMultiSim.qml 2014-08-26 21:07:36 +0000 |
798 | @@ -24,20 +24,18 @@ |
799 | |
800 | Column { |
801 | id: root |
802 | - property var sim1 |
803 | - property var sim2 |
804 | property var selector: selector |
805 | property var prefMap: ['gsm', 'umts'] |
806 | |
807 | function getNameFromIndex (index) { |
808 | - return [i18n.tr("Off"), sim1.title, sim2.title][index]; |
809 | + return [i18n.tr("Off"), sims[0].title, sims[1].title][index]; |
810 | } |
811 | |
812 | function getUsedSim () { |
813 | if (state === "sim1Online") { |
814 | - return sim1; |
815 | + return sims[0]; |
816 | } else if (state === "sim2Online") { |
817 | - return sim2; |
818 | + return sims[1]; |
819 | } else { |
820 | return null; |
821 | } |
822 | @@ -47,27 +45,27 @@ |
823 | states: [ |
824 | State { |
825 | name: "sim1Online" |
826 | - when: sim1.connMan.powered && !sim2.connMan.powered |
827 | + when: sims[0].connMan.powered && !sims[1].connMan.powered |
828 | StateChangeScript { script: { |
829 | selector.selectedIndex = |
830 | DataHelpers.dualSimKeyToIndex( |
831 | - sim1.radioSettings.technologyPreference) |
832 | + sims[0].radioSettings.technologyPreference) |
833 | }} |
834 | }, |
835 | State { |
836 | name: "sim2Online" |
837 | - when: sim2.connMan.powered && !sim1.connMan.powered |
838 | + when: sims[1].connMan.powered && !sims[0].connMan.powered |
839 | StateChangeScript { script: { |
840 | selector.selectedIndex = |
841 | DataHelpers.dualSimKeyToIndex( |
842 | - sim2.radioSettings.technologyPreference) |
843 | + sims[1].radioSettings.technologyPreference) |
844 | }} |
845 | }, |
846 | State { |
847 | name: "bothOnline" |
848 | - when: sim1.connMan.powered && sim2.connMan.powered |
849 | + when: sims[0].connMan.powered && sims[1].connMan.powered |
850 | StateChangeScript { script: { |
851 | - sim2.connMan.powered = false; |
852 | + sims[1].connMan.powered = false; |
853 | }} |
854 | } |
855 | ] |
856 | @@ -82,16 +80,16 @@ |
857 | objectName: "use" + modelData |
858 | text: getNameFromIndex(index) |
859 | } |
860 | - selectedIndex: [true, sim1.connMan.powered, sim2.connMan.powered] |
861 | + selectedIndex: [true, sims[0].connMan.powered, sims[1].connMan.powered] |
862 | .lastIndexOf(true) |
863 | onDelegateClicked: { |
864 | - sim1.connMan.powered = (index === 1) |
865 | - sim2.connMan.powered = (index === 2) |
866 | + sims[0].connMan.powered = (index === 1) |
867 | + sims[1].connMan.powered = (index === 2) |
868 | } |
869 | } |
870 | |
871 | Connections { |
872 | - target: sim1.connMan |
873 | + target: sims[0].connMan |
874 | onPoweredChanged: { |
875 | if (powered) { |
876 | use.selectedIndex = 1; |
877 | @@ -100,7 +98,7 @@ |
878 | } |
879 | |
880 | Connections { |
881 | - target: sim2.connMan |
882 | + target: sims[1].connMan |
883 | onPoweredChanged: { |
884 | if (powered) { |
885 | use.selectedIndex = 2; |
886 | @@ -124,9 +122,9 @@ |
887 | } |
888 | |
889 | Connections { |
890 | - target: sim1.radioSettings |
891 | + target: sims[0].radioSettings |
892 | onTechnologyPreferenceChanged: { |
893 | - if (sim1.connMan.powered) { |
894 | + if (sims[0].connMan.powered) { |
895 | selector.selectedIndex = |
896 | DataHelpers.dualSimKeyToIndex(preference); |
897 | } |
898 | @@ -134,9 +132,9 @@ |
899 | } |
900 | |
901 | Connections { |
902 | - target: sim2.radioSettings |
903 | + target: sims[1].radioSettings |
904 | onTechnologyPreferenceChanged: { |
905 | - if (sim2.connMan.powered) { |
906 | + if (sims[1].connMan.powered) { |
907 | selector.selectedIndex = |
908 | DataHelpers.dualSimKeyToIndex(preference); |
909 | } |
910 | |
911 | === modified file 'plugins/cellular/Components/CellularSingleSim.qml' |
912 | --- plugins/cellular/Components/CellularSingleSim.qml 2014-08-14 13:59:57 +0000 |
913 | +++ plugins/cellular/Components/CellularSingleSim.qml 2014-08-26 21:07:36 +0000 |
914 | @@ -25,7 +25,6 @@ |
915 | Column { |
916 | height: childrenRect.height |
917 | |
918 | - property var sim1 |
919 | property var selector: selector |
920 | |
921 | ListItem.ItemSelector { |
922 | @@ -33,15 +32,15 @@ |
923 | objectName: "technologyPreferenceSelector" |
924 | text: i18n.tr("Cellular data:") |
925 | expanded: true |
926 | - enabled: sim1.radioSettings.technologyPreference !== "" |
927 | + enabled: sim.radioSettings.technologyPreference !== "" |
928 | model: [ |
929 | i18n.tr("Off"), |
930 | i18n.tr("2G only (saves battery)"), |
931 | i18n.tr("2G/3G/4G (faster)")] |
932 | selectedIndex: { |
933 | - if (sim1.connMan.powered) { |
934 | + if (sim.connMan.powered) { |
935 | return DataHelpers.singleSimKeyToIndex( |
936 | - sim1.radioSettings.technologyPreference); |
937 | + sim.radioSettings.technologyPreference); |
938 | } else { |
939 | return 0; |
940 | } |
941 | @@ -52,20 +51,20 @@ |
942 | id: dataRoamingItem |
943 | objectName: "dataRoamingSwitch" |
944 | text: i18n.tr("Data roaming") |
945 | - enabled: sim1.connMan.powered |
946 | + enabled: sim.connMan.powered |
947 | control: Switch { |
948 | id: dataRoamingControl |
949 | - checked: sim1.connMan.roamingAllowed |
950 | - onClicked: sim1.connMan.roamingAllowed = checked |
951 | + checked: sim.connMan.roamingAllowed |
952 | + onClicked: sim.connMan.roamingAllowed = checked |
953 | } |
954 | } |
955 | |
956 | Connections { |
957 | - target: sim1.connMan |
958 | + target: sim.connMan |
959 | onPoweredChanged: { |
960 | if (powered) { |
961 | selector.selectedIndex = DataHelpers.singleSimKeyToIndex( |
962 | - sim1.radioSettings.technologyPreference); |
963 | + sim.radioSettings.technologyPreference); |
964 | } else { |
965 | selector.selectedIndex = 0; |
966 | } |
967 | @@ -73,24 +72,24 @@ |
968 | } |
969 | |
970 | Connections { |
971 | - target: sim1.radioSettings |
972 | + target: sim.radioSettings |
973 | onTechnologyPreferenceChanged: { |
974 | var selIndex = selector.selectedIndex; |
975 | if (selIndex > 0) { |
976 | - sim1.radioSettings.technologyPreference = |
977 | + sim.radioSettings.technologyPreference = |
978 | DataHelpers.singleSimIndexToKey(selIndex); |
979 | } |
980 | } |
981 | } |
982 | |
983 | Binding { |
984 | - target: sim1.connMan |
985 | + target: sim.connMan |
986 | property: "powered" |
987 | value: selector.selectedIndex !== 0 |
988 | } |
989 | |
990 | Binding { |
991 | - target: sim1.radioSettings |
992 | + target: sim.radioSettings |
993 | property: "technologyPreference" |
994 | value: { |
995 | var i = selector.selectedIndex; |
996 | @@ -99,7 +98,7 @@ |
997 | } else if (i === 2) { |
998 | return 'umts'; |
999 | } else { |
1000 | - return sim1.radioSettings.technologyPreference |
1001 | + return sim.radioSettings.technologyPreference |
1002 | } |
1003 | } |
1004 | } |
1005 | |
1006 | === modified file 'plugins/cellular/Components/DefaultSim.qml' |
1007 | --- plugins/cellular/Components/DefaultSim.qml 2014-08-14 09:59:56 +0000 |
1008 | +++ plugins/cellular/Components/DefaultSim.qml 2014-08-26 21:07:36 +0000 |
1009 | @@ -23,10 +23,10 @@ |
1010 | |
1011 | Column { |
1012 | |
1013 | - property var m: ["ask", sim1.path, sim2.path] |
1014 | + property var m: ["ask", sims[0].path, sims[1].path] |
1015 | |
1016 | function getNameFromIndex (index) { |
1017 | - return [i18n.tr("Ask me each time"), sim1.title, sim2.title][index]; |
1018 | + return [i18n.tr("Ask me each time"), sims[0].title, sims[1].title][index]; |
1019 | } |
1020 | |
1021 | ListItem.ItemSelector { |
1022 | @@ -45,8 +45,7 @@ |
1023 | } |
1024 | |
1025 | ListItem.Caption { |
1026 | - text: i18n.tr("You can change the SIM for individual calls, |
1027 | - or for contacts in the address book.") |
1028 | + text: i18n.tr("You can change the SIM for individual calls, or for contacts in the address book.") |
1029 | } |
1030 | |
1031 | ListItem.Divider {} |
1032 | |
1033 | === added file 'plugins/cellular/Components/MultiSim.qml' |
1034 | --- plugins/cellular/Components/MultiSim.qml 1970-01-01 00:00:00 +0000 |
1035 | +++ plugins/cellular/Components/MultiSim.qml 2014-08-26 21:07:36 +0000 |
1036 | @@ -0,0 +1,120 @@ |
1037 | +/* |
1038 | + * Copyright (C) 2014 Canonical Ltd |
1039 | + * |
1040 | + * This program is free software: you can redistribute it and/or modify |
1041 | + * it under the terms of the GNU General Public License version 3 as |
1042 | + * published by the Free Software Foundation. |
1043 | + * |
1044 | + * This program is distributed in the hope that it will be useful, |
1045 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1046 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1047 | + * GNU General Public License for more details. |
1048 | + * |
1049 | + * You should have received a copy of the GNU General Public License |
1050 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1051 | + * |
1052 | + * Authors: |
1053 | + * Jonas G. Drange <jonas.drange@canonical.com> |
1054 | + * |
1055 | +*/ |
1056 | +import QtQuick 2.0 |
1057 | +import GSettings 1.0 |
1058 | +import Ubuntu.Components 0.1 |
1059 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
1060 | + |
1061 | +Column { |
1062 | + |
1063 | + objectName: "multiSim" |
1064 | + |
1065 | + property var sims |
1066 | + property var modems |
1067 | + |
1068 | + // make settings available to all children of root |
1069 | + property var settings: phoneSettings |
1070 | + |
1071 | + CellularMultiSim { |
1072 | + anchors { left: parent.left; right: parent.right } |
1073 | + } |
1074 | + |
1075 | + ListItem.Divider {} |
1076 | + |
1077 | + ListItem.SingleValue { |
1078 | + text : i18n.tr("Hotspot disabled because Wi-Fi is off.") |
1079 | + visible: showAllUI && !hotspotItem.visible |
1080 | + } |
1081 | + |
1082 | + ListItem.SingleValue { |
1083 | + id: hotspotItem |
1084 | + text: i18n.tr("Wi-Fi hotspot") |
1085 | + progression: true |
1086 | + onClicked: { |
1087 | + pageStack.push(Qt.resolvedUrl("Hotspot.qml")) |
1088 | + } |
1089 | + visible: showAllUI && (actionGroup.actionObject.valid ? actionGroup.actionObject.state : false) |
1090 | + } |
1091 | + |
1092 | + ListItem.Standard { |
1093 | + id: dataUsage |
1094 | + text: i18n.tr("Data usage statistics") |
1095 | + progression: true |
1096 | + visible: showAllUI |
1097 | + } |
1098 | + |
1099 | + ListItem.Divider { |
1100 | + visible: hotspotItem.visible || dataUsage.visible |
1101 | + } |
1102 | + |
1103 | + ListItem.SingleValue { |
1104 | + text: i18n.tr("Carriers") |
1105 | + id: chooseCarrier |
1106 | + objectName: "chooseCarrier" |
1107 | + progression: enabled |
1108 | + onClicked: { |
1109 | + pageStack.push(Qt.resolvedUrl("../PageChooseCarriers.qml"), { |
1110 | + sims: sims |
1111 | + }); |
1112 | + } |
1113 | + } |
1114 | + |
1115 | + ListItem.Divider {} |
1116 | + |
1117 | + SimEditor { |
1118 | + anchors { left: parent.left; right: parent.right } |
1119 | + } |
1120 | + |
1121 | + ListItem.Divider {} |
1122 | + |
1123 | + DefaultSim { |
1124 | + anchors { left: parent.left; right: parent.right } |
1125 | + } |
1126 | + |
1127 | + GSettings { |
1128 | + id: phoneSettings |
1129 | + schema.id: "com.ubuntu.phone" |
1130 | + Component.onCompleted: { |
1131 | + // set default names |
1132 | + var simNames = phoneSettings.simNames; |
1133 | + var m0 = modems[0]; |
1134 | + var m1 = modems[1]; |
1135 | + if (!simNames[m0]) { |
1136 | + simNames[m0] = "SIM 1"; |
1137 | + } |
1138 | + if (!simNames[m1]) { |
1139 | + simNames[m1] = "SIM 2"; |
1140 | + } |
1141 | + phoneSettings.simNames = simNames; |
1142 | + } |
1143 | + } |
1144 | + |
1145 | + Binding { |
1146 | + target: sims[0] |
1147 | + property: "name" |
1148 | + value: phoneSettings.simNames[modems[0]] |
1149 | + } |
1150 | + |
1151 | + Binding { |
1152 | + target: sims[1] |
1153 | + property: "name" |
1154 | + value: phoneSettings.simNames[modems[1]] |
1155 | + } |
1156 | +} |
1157 | |
1158 | === added file 'plugins/cellular/Components/NoSim.qml' |
1159 | --- plugins/cellular/Components/NoSim.qml 1970-01-01 00:00:00 +0000 |
1160 | +++ plugins/cellular/Components/NoSim.qml 2014-08-26 21:07:36 +0000 |
1161 | @@ -0,0 +1,51 @@ |
1162 | +/* |
1163 | + * Copyright (C) 2014 Canonical Ltd |
1164 | + * |
1165 | + * This program is free software: you can redistribute it and/or modify |
1166 | + * it under the terms of the GNU General Public License version 3 as |
1167 | + * published by the Free Software Foundation. |
1168 | + * |
1169 | + * This program is distributed in the hope that it will be useful, |
1170 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1171 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1172 | + * GNU General Public License for more details. |
1173 | + * |
1174 | + * You should have received a copy of the GNU General Public License |
1175 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1176 | + * |
1177 | + * Authors: |
1178 | + * Jonas G. Drange <jonas.drange@canonical.com> |
1179 | + * |
1180 | +*/ |
1181 | +import QtQuick 2.0 |
1182 | +import Ubuntu.Components 0.1 |
1183 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
1184 | + |
1185 | +Column { |
1186 | + |
1187 | + objectName: "noSim" |
1188 | + |
1189 | + ListItem.ItemSelector { |
1190 | + text: i18n.tr("Cellular data:") |
1191 | + expanded: true |
1192 | + enabled: false |
1193 | + model: [i18n.tr("Off"), i18n.tr("2G only (saves battery)"), i18n.tr("2G/3G/4G (faster)")] |
1194 | + selectedIndex: -1 |
1195 | + } |
1196 | + |
1197 | + ListItem.Standard { |
1198 | + text: i18n.tr("Data roaming") |
1199 | + enabled: false |
1200 | + control: Switch { |
1201 | + checked: false |
1202 | + } |
1203 | + } |
1204 | + |
1205 | + ListItem.Divider {} |
1206 | + |
1207 | + ListItem.SingleValue { |
1208 | + text: i18n.tr("Carrier"); |
1209 | + value: i18n.tr("N/A") |
1210 | + enabled: false |
1211 | + } |
1212 | +} |
1213 | |
1214 | === modified file 'plugins/cellular/Components/Sim.qml' |
1215 | --- plugins/cellular/Components/Sim.qml 2014-07-25 13:33:36 +0000 |
1216 | +++ plugins/cellular/Components/Sim.qml 2014-08-26 21:07:36 +0000 |
1217 | @@ -21,12 +21,14 @@ |
1218 | import MeeGo.QOfono 0.2 |
1219 | |
1220 | Item { |
1221 | + id: root |
1222 | property alias modem: modem |
1223 | property alias netReg: netReg |
1224 | property alias radioSettings: radioSettings |
1225 | property alias simMng: simMng |
1226 | property alias connMan: connMan |
1227 | |
1228 | + property alias present: simMng.present |
1229 | property string path |
1230 | property string name |
1231 | property string title: { |
1232 | |
1233 | === modified file 'plugins/cellular/Components/SimEditor.qml' |
1234 | --- plugins/cellular/Components/SimEditor.qml 2014-08-15 19:58:34 +0000 |
1235 | +++ plugins/cellular/Components/SimEditor.qml 2014-08-26 21:07:36 +0000 |
1236 | @@ -44,7 +44,7 @@ |
1237 | name: "editingSim1" |
1238 | PropertyChanges { |
1239 | target: nameField |
1240 | - text: sim1.name |
1241 | + text: sims[0].name |
1242 | } |
1243 | ParentChange { |
1244 | target: editor |
1245 | @@ -60,7 +60,7 @@ |
1246 | name: "editingSim2" |
1247 | PropertyChanges { |
1248 | target: nameField |
1249 | - text: sim2.name |
1250 | + text: sims[1].name |
1251 | } |
1252 | ParentChange { |
1253 | target: editor |
1254 | @@ -108,7 +108,7 @@ |
1255 | right: parent.right |
1256 | verticalCenter: parent.verticalCenter |
1257 | } |
1258 | - text: sim1.title |
1259 | + text: sims[0].title |
1260 | } |
1261 | } |
1262 | Column { |
1263 | @@ -144,7 +144,7 @@ |
1264 | right: parent.right |
1265 | verticalCenter: parent.verticalCenter |
1266 | } |
1267 | - text: sim2.title |
1268 | + text: sims[1].title |
1269 | } |
1270 | } |
1271 | Column { |
1272 | @@ -213,11 +213,11 @@ |
1273 | onTriggered: { |
1274 | var tmpSimNames = {}; |
1275 | if (simList.state === "editingSim1") { |
1276 | - tmpSimNames[sim1.path] = nameField.text; |
1277 | - tmpSimNames[sim2.path] = sim2.name; |
1278 | + tmpSimNames[sims[0].path] = nameField.text; |
1279 | + tmpSimNames[sims[1].path] = sims[1].name; |
1280 | } else if (simList.state === "editingSim2") { |
1281 | - tmpSimNames[sim1.path] = sim1.name; |
1282 | - tmpSimNames[sim2.path] = nameField.text; |
1283 | + tmpSimNames[sims[0].path] = sims[0].name; |
1284 | + tmpSimNames[sims[1].path] = nameField.text; |
1285 | } |
1286 | phoneSettings.simNames = tmpSimNames; |
1287 | simList.state = ""; |
1288 | |
1289 | === added file 'plugins/cellular/Components/SingleSim.qml' |
1290 | --- plugins/cellular/Components/SingleSim.qml 1970-01-01 00:00:00 +0000 |
1291 | +++ plugins/cellular/Components/SingleSim.qml 2014-08-26 21:07:36 +0000 |
1292 | @@ -0,0 +1,76 @@ |
1293 | +/* |
1294 | + * Copyright (C) 2014 Canonical Ltd |
1295 | + * |
1296 | + * This program is free software: you can redistribute it and/or modify |
1297 | + * it under the terms of the GNU General Public License version 3 as |
1298 | + * published by the Free Software Foundation. |
1299 | + * |
1300 | + * This program is distributed in the hope that it will be useful, |
1301 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1302 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1303 | + * GNU General Public License for more details. |
1304 | + * |
1305 | + * You should have received a copy of the GNU General Public License |
1306 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1307 | + * |
1308 | + * Authors: |
1309 | + * Jonas G. Drange <jonas.drange@canonical.com> |
1310 | + * |
1311 | +*/ |
1312 | +import QtQuick 2.0 |
1313 | +import Ubuntu.Components 0.1 |
1314 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
1315 | + |
1316 | +Column { |
1317 | + |
1318 | + objectName: "singleSim" |
1319 | + |
1320 | + property var sim |
1321 | + |
1322 | + CellularSingleSim { |
1323 | + anchors { left: parent.left; right: parent.right } |
1324 | + } |
1325 | + |
1326 | + ListItem.Divider {} |
1327 | + |
1328 | + ListItem.SingleValue { |
1329 | + text : i18n.tr("Hotspot disabled because Wi-Fi is off.") |
1330 | + visible: showAllUI && !hotspotItem.visible |
1331 | + } |
1332 | + |
1333 | + ListItem.SingleValue { |
1334 | + id: hotspotItem |
1335 | + text: i18n.tr("Wi-Fi hotspot") |
1336 | + progression: true |
1337 | + onClicked: { |
1338 | + pageStack.push(Qt.resolvedUrl("Hotspot.qml")) |
1339 | + } |
1340 | + visible: showAllUI && (actionGroup.actionObject.valid ? actionGroup.actionObject.state : false) |
1341 | + } |
1342 | + |
1343 | + ListItem.Standard { |
1344 | + text: i18n.tr("Data usage statistics") |
1345 | + progression: true |
1346 | + visible: showAllUI |
1347 | + } |
1348 | + |
1349 | + ListItem.SingleValue { |
1350 | + text: i18n.tr("Carrier"); |
1351 | + id: chooseCarrier |
1352 | + objectName: "chooseCarrier" |
1353 | + progression: enabled |
1354 | + value: sim.netReg.name || i18n.tr("N/A") |
1355 | + onClicked: { |
1356 | + pageStack.push(Qt.resolvedUrl("../PageChooseCarrier.qml"), { |
1357 | + netReg: sim.netReg, |
1358 | + title: i18n.tr("Carrier") |
1359 | + }) |
1360 | + } |
1361 | + } |
1362 | + |
1363 | + ListItem.Standard { |
1364 | + text: i18n.tr("APN") |
1365 | + progression: true |
1366 | + visible: showAllUI |
1367 | + } |
1368 | +} |
1369 | |
1370 | === modified file 'plugins/cellular/PageChooseCarriers.qml' |
1371 | --- plugins/cellular/PageChooseCarriers.qml 2014-07-24 19:00:45 +0000 |
1372 | +++ plugins/cellular/PageChooseCarriers.qml 2014-08-26 21:07:36 +0000 |
1373 | @@ -28,8 +28,7 @@ |
1374 | title: i18n.tr("Carriers") |
1375 | objectName: "chooseCarriersPage" |
1376 | |
1377 | - property var sim1 |
1378 | - property var sim2 |
1379 | + property var sims |
1380 | |
1381 | Flickable { |
1382 | anchors.fill: parent |
1383 | @@ -42,33 +41,33 @@ |
1384 | anchors.right: parent.right |
1385 | |
1386 | ListItem.Standard { |
1387 | - text: sim1.title |
1388 | + text: sims[0].title |
1389 | } |
1390 | |
1391 | ListItem.SingleValue { |
1392 | objectName: "chooseCarrierSim1" |
1393 | - value: sim1.netReg.name ? sim1.netReg.name : i18n.tr("N/A") |
1394 | + value: sims[0].netReg.name ? sims[0].netReg.name : i18n.tr("N/A") |
1395 | progression: true |
1396 | onClicked: { |
1397 | pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), { |
1398 | - netReg: sim1.netReg, |
1399 | - title: sim1.title |
1400 | + netReg: sims[0].netReg, |
1401 | + title: sims[0].title |
1402 | }) |
1403 | } |
1404 | } |
1405 | |
1406 | ListItem.Standard { |
1407 | - text: sim2.title |
1408 | + text: sims[1].title |
1409 | } |
1410 | |
1411 | ListItem.SingleValue { |
1412 | objectName: "chooseCarrierSim2" |
1413 | - value: sim2.netReg.name ? sim2.netReg.name : i18n.tr("N/A") |
1414 | + value: sims[1].netReg.name ? sims[1].netReg.name : i18n.tr("N/A") |
1415 | progression: true |
1416 | onClicked: { |
1417 | pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), { |
1418 | - netReg: sim2.netReg, |
1419 | - title: sim2.title |
1420 | + netReg: sims[1].netReg, |
1421 | + title: sims[1].title |
1422 | }) |
1423 | } |
1424 | } |
1425 | |
1426 | === modified file 'plugins/cellular/PageComponent.qml' |
1427 | --- plugins/cellular/PageComponent.qml 2014-08-12 16:25:26 +0000 |
1428 | +++ plugins/cellular/PageComponent.qml 2014-08-26 21:07:36 +0000 |
1429 | @@ -19,53 +19,69 @@ |
1430 | */ |
1431 | |
1432 | import QtQuick 2.0 |
1433 | -import GSettings 1.0 |
1434 | import SystemSettings 1.0 |
1435 | import Ubuntu.Components 0.1 |
1436 | import Ubuntu.Components.ListItems 0.1 as ListItem |
1437 | import MeeGo.QOfono 0.2 |
1438 | import QMenuModel 0.1 |
1439 | -import "Components" |
1440 | +import "Components" as LocalComponents |
1441 | +import "sims.js" as Sims |
1442 | |
1443 | ItemPage { |
1444 | id: root |
1445 | title: i18n.tr("Cellular") |
1446 | objectName: "cellularPage" |
1447 | |
1448 | - // pointers to sim 1 and 2, lazy loaded |
1449 | - property alias sim1: simOneLoader.item |
1450 | - property alias sim2: simTwoLoader.item |
1451 | property var modemsSorted: manager.modems.slice(0).sort() |
1452 | + property int simsLoaded: 0 |
1453 | |
1454 | states: [ |
1455 | State { |
1456 | + name: "noSim" |
1457 | + when: (simsLoaded === 0) || (Sims.getPresentCount() === 0) |
1458 | + StateChangeScript { |
1459 | + script: loader.source = "Components/NoSim.qml" |
1460 | + } |
1461 | + }, |
1462 | + State { |
1463 | name: "singleSim" |
1464 | StateChangeScript { |
1465 | - name: "loadSim" |
1466 | - script: { |
1467 | - var p = modemsSorted[0]; |
1468 | - simOneLoader.setSource("Components/Sim.qml", { |
1469 | - path: p |
1470 | - }); |
1471 | - } |
1472 | + script: loader.setSource("Components/SingleSim.qml", { |
1473 | + sim: Sims.get(0) |
1474 | + }) |
1475 | } |
1476 | + when: simsLoaded && (Sims.getPresentCount() === 1) |
1477 | }, |
1478 | State { |
1479 | - name: "dualSim" |
1480 | - extend: "singleSim" |
1481 | + name: "multiSim" |
1482 | StateChangeScript { |
1483 | - name: "loadSecondSim" |
1484 | - script: { |
1485 | - var p = modemsSorted[1]; |
1486 | - simTwoLoader.setSource("Components/Sim.qml", { |
1487 | - path: p |
1488 | - }); |
1489 | - defaultSimLoader.source = "Components/DefaultSim.qml"; |
1490 | - } |
1491 | + script: loader.setSource("Components/MultiSim.qml", { |
1492 | + sims: Sims.getAll(), |
1493 | + modems: modemsSorted |
1494 | + }) |
1495 | } |
1496 | + when: simsLoaded && (Sims.getPresentCount() > 1) |
1497 | } |
1498 | ] |
1499 | |
1500 | + OfonoManager { |
1501 | + id: manager |
1502 | + Component.onCompleted: { |
1503 | + var component = Qt.createComponent("Components/Sim.qml"); |
1504 | + modemsSorted.forEach(function (path) { |
1505 | + console.warn('creating sim object for', path) |
1506 | + var sim = component.createObject(root, { |
1507 | + path: path |
1508 | + }); |
1509 | + if (sim === null) { |
1510 | + console.warn('failed to create sim object'); |
1511 | + } else { |
1512 | + Sims.add(sim); |
1513 | + } |
1514 | + }); |
1515 | + } |
1516 | + } |
1517 | + |
1518 | QDBusActionGroup { |
1519 | id: actionGroup |
1520 | busType: 1 |
1521 | @@ -78,42 +94,6 @@ |
1522 | start() |
1523 | } |
1524 | } |
1525 | - |
1526 | - OfonoManager { |
1527 | - id: manager |
1528 | - Component.onCompleted: { |
1529 | - if (modems.length === 1) { |
1530 | - root.state = "singleSim"; |
1531 | - } else if (modems.length === 2) { |
1532 | - root.state = "dualSim"; |
1533 | - } |
1534 | - } |
1535 | - } |
1536 | - |
1537 | - Loader { |
1538 | - id: simOneLoader |
1539 | - onLoaded: { |
1540 | - if (parent.state === "singleSim") { |
1541 | - cellData.setSource("Components/CellularSingleSim.qml", { |
1542 | - sim1: sim1 |
1543 | - }); |
1544 | - } |
1545 | - } |
1546 | - } |
1547 | - |
1548 | - Loader { |
1549 | - id: simTwoLoader |
1550 | - onLoaded: { |
1551 | - // unload any single sim setup |
1552 | - cellData.source = ""; |
1553 | - cellData.setSource("Components/CellularDualSim.qml", { |
1554 | - sim1: sim1, |
1555 | - sim2: sim2 |
1556 | - }); |
1557 | - simEditorLoader.source = "Components/SimEditor.qml"; |
1558 | - } |
1559 | - } |
1560 | - |
1561 | Flickable { |
1562 | anchors.fill: parent |
1563 | contentWidth: parent.width |
1564 | @@ -124,106 +104,9 @@ |
1565 | anchors { left: parent.left; right: parent.right } |
1566 | |
1567 | Loader { |
1568 | - id: cellData |
1569 | - anchors { left: parent.left; right: parent.right } |
1570 | - } |
1571 | - |
1572 | - ListItem.SingleValue { |
1573 | - text : i18n.tr("Hotspot disabled because Wi-Fi is off.") |
1574 | - visible: showAllUI && !hotspotItem.visible |
1575 | - } |
1576 | - |
1577 | - ListItem.SingleValue { |
1578 | - id: hotspotItem |
1579 | - text: i18n.tr("Wi-Fi hotspot") |
1580 | - progression: true |
1581 | - onClicked: { |
1582 | - pageStack.push(Qt.resolvedUrl("Hotspot.qml")) |
1583 | - } |
1584 | - visible: showAllUI && (actionGroup.actionObject.valid ? actionGroup.actionObject.state : false) |
1585 | - } |
1586 | - |
1587 | - ListItem.Standard { |
1588 | - text: i18n.tr("Data usage statistics") |
1589 | - progression: true |
1590 | - visible: showAllUI |
1591 | - } |
1592 | - |
1593 | - ListItem.SingleValue { |
1594 | - text: i18n.tr("Carrier", "Carriers", manager.modems.length); |
1595 | - id: chooseCarrier |
1596 | - objectName: "chooseCarrier" |
1597 | - progression: enabled |
1598 | - onClicked: { |
1599 | - if (root.state === 'singleSim') { |
1600 | - pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), { |
1601 | - netReg: sim1.netReg, |
1602 | - title: i18n.tr("Carrier") |
1603 | - }) |
1604 | - } else if (root.state === 'dualSim') { |
1605 | - pageStack.push(Qt.resolvedUrl("PageChooseCarriers.qml"), { |
1606 | - sim1: sim1, |
1607 | - sim2: sim2 |
1608 | - }); |
1609 | - } |
1610 | - } |
1611 | - } |
1612 | - |
1613 | - Binding { |
1614 | - target: chooseCarrier |
1615 | - property: "value" |
1616 | - value: sim1.netReg.name || i18n.tr("N/A") |
1617 | - when: (simOneLoader.status === Loader.Ready) && root.state === "singleSim" |
1618 | - } |
1619 | - |
1620 | - ListItem.Standard { |
1621 | - text: i18n.tr("APN") |
1622 | - progression: true |
1623 | - visible: showAllUI |
1624 | - } |
1625 | - |
1626 | - Loader { |
1627 | - id: simEditorLoader |
1628 | - anchors { left: parent.left; right: parent.right } |
1629 | - } |
1630 | - |
1631 | - ListItem.Divider {} |
1632 | - |
1633 | - Loader { |
1634 | - id: defaultSimLoader |
1635 | - anchors.left: parent.left |
1636 | - anchors.right: parent.right |
1637 | - } |
1638 | - } |
1639 | - } |
1640 | - |
1641 | - GSettings { |
1642 | - id: phoneSettings |
1643 | - schema.id: "com.ubuntu.phone" |
1644 | - Component.onCompleted: { |
1645 | - // set default names |
1646 | - var simNames = phoneSettings.simNames; |
1647 | - var m0 = modemsSorted[0]; |
1648 | - var m1 = modemsSorted[1]; |
1649 | - if (!simNames[m0]) { |
1650 | - simNames[m0] = "SIM 1"; |
1651 | - } |
1652 | - if (!simNames[m1]) { |
1653 | - simNames[m1] = "SIM 2"; |
1654 | - } |
1655 | - phoneSettings.simNames = simNames; |
1656 | - } |
1657 | - } |
1658 | - |
1659 | - Binding { |
1660 | - target: sim1 |
1661 | - property: "name" |
1662 | - value: phoneSettings.simNames[modemsSorted[0]] |
1663 | - } |
1664 | - |
1665 | - Binding { |
1666 | - target: sim2 |
1667 | - property: "name" |
1668 | - value: phoneSettings.simNames[modemsSorted[1]] |
1669 | + id: loader |
1670 | + anchors { left: parent.left; right: parent.right } |
1671 | + } |
1672 | + } |
1673 | } |
1674 | } |
1675 | |
1676 | === added file 'plugins/cellular/sims.js' |
1677 | --- plugins/cellular/sims.js 1970-01-01 00:00:00 +0000 |
1678 | +++ plugins/cellular/sims.js 2014-08-26 21:07:36 +0000 |
1679 | @@ -0,0 +1,34 @@ |
1680 | +var sims = []; |
1681 | + |
1682 | +function add (sim) { |
1683 | + sims.push(sim); |
1684 | + root.simsLoaded++; |
1685 | +} |
1686 | + |
1687 | +function getAll () { |
1688 | + return sims; |
1689 | +} |
1690 | + |
1691 | +function get (n) { |
1692 | + return getAll()[n]; |
1693 | +} |
1694 | + |
1695 | +function getCount () { |
1696 | + return getAll().length; |
1697 | +} |
1698 | + |
1699 | +function getPresent () { |
1700 | + var present = []; |
1701 | + getAll().forEach(function (sim) { |
1702 | + if (sim.present) { |
1703 | + present.push(sim); |
1704 | + } else { |
1705 | + return; |
1706 | + } |
1707 | + }); |
1708 | + return present; |
1709 | +} |
1710 | + |
1711 | +function getPresentCount () { |
1712 | + return getPresent().length; |
1713 | +} |
1714 | |
1715 | === modified file 'plugins/notifications/notification_item.cpp' |
1716 | --- plugins/notifications/notification_item.cpp 2014-07-18 15:22:59 +0000 |
1717 | +++ plugins/notifications/notification_item.cpp 2014-08-26 21:07:36 +0000 |
1718 | @@ -20,7 +20,8 @@ |
1719 | namespace NotificationsPlugin { |
1720 | |
1721 | NotificationItem::NotificationItem(QObject *parent) : |
1722 | - QObject(parent) |
1723 | + QObject(parent), |
1724 | + m_status(false) |
1725 | { |
1726 | } |
1727 | |
1728 | |
1729 | === modified file 'plugins/phone/CMakeLists.txt' |
1730 | --- plugins/phone/CMakeLists.txt 2014-07-09 13:17:47 +0000 |
1731 | +++ plugins/phone/CMakeLists.txt 2014-08-26 21:07:36 +0000 |
1732 | @@ -1,10 +1,15 @@ |
1733 | set(QML_SOURCES |
1734 | CallForwarding.qml |
1735 | CallWaiting.qml |
1736 | + MultiSim.qml |
1737 | + NoSims.qml |
1738 | + Ofono.qml |
1739 | PageComponent.qml |
1740 | ServiceInfo.qml |
1741 | Services.qml |
1742 | + SingleSim.qml |
1743 | dateUtils.js |
1744 | + sims.js |
1745 | ) |
1746 | |
1747 | # We need a dummy target so the QML files show up in Qt Creator |
1748 | |
1749 | === modified file 'plugins/phone/CallForwarding.qml' |
1750 | --- plugins/phone/CallForwarding.qml 2014-07-22 20:10:26 +0000 |
1751 | +++ plugins/phone/CallForwarding.qml 2014-08-26 21:07:36 +0000 |
1752 | @@ -22,22 +22,22 @@ |
1753 | import SystemSettings 1.0 |
1754 | import Ubuntu.Components 0.1 |
1755 | import Ubuntu.Components.ListItems 0.1 as ListItem |
1756 | -import MeeGo.QOfono 0.2 |
1757 | |
1758 | ItemPage { |
1759 | - title: i18n.tr("Call forwarding") |
1760 | |
1761 | - property bool forwarding: callForwarding.voiceUnconditional !== "" |
1762 | - property string modem |
1763 | + objectName: "callForwardingPage" |
1764 | + title: headerTitle |
1765 | + property var sim |
1766 | + property bool forwarding: sim.callForwarding.voiceUnconditional !== "" |
1767 | + property string headerTitle: i18n.tr("Call forwarding") |
1768 | |
1769 | onForwardingChanged: { |
1770 | if (callForwardingSwitch.checked !== forwarding) |
1771 | callForwardingSwitch.checked = forwarding; |
1772 | } |
1773 | |
1774 | - OfonoCallForwarding { |
1775 | - id: callForwarding |
1776 | - modemPath: modem |
1777 | + Connections { |
1778 | + target: sim.callForwarding |
1779 | onVoiceUnconditionalChanged: { |
1780 | destNumberField.text = voiceUnconditional; |
1781 | } |
1782 | @@ -50,13 +50,14 @@ |
1783 | |
1784 | Switch { |
1785 | id: callForwardingSwitch |
1786 | + objectName: "callForwardingSwitch" |
1787 | checked: forwarding |
1788 | enabled: (forwarding === checked) |
1789 | visible: callForwardingItem.control === callForwardingSwitch |
1790 | onCheckedChanged: { |
1791 | if (!checked && forwarding) { |
1792 | callForwardingIndicator.running = true; |
1793 | - callForwarding.voiceUnconditional = ""; |
1794 | + sim.callForwarding.voiceUnconditional = ""; |
1795 | } |
1796 | } |
1797 | } |
1798 | @@ -101,17 +102,18 @@ |
1799 | visible: callForwardingSwitch.checked |
1800 | control: TextInput { |
1801 | id: destNumberField |
1802 | + objectName: "destNumberField" |
1803 | horizontalAlignment: TextInput.AlignRight |
1804 | width: forwardToItem.width/2 |
1805 | inputMethodHints: Qt.ImhDialableCharactersOnly |
1806 | - text: callForwarding.voiceUnconditional |
1807 | + text: sim.callForwarding.voiceUnconditional |
1808 | font.pixelSize: units.dp(18) |
1809 | font.weight: Font.Light |
1810 | font.family: "Ubuntu" |
1811 | color: "#AAAAAA" |
1812 | maximumLength: 20 |
1813 | focus: true |
1814 | - cursorVisible: text !== callForwarding.voiceUnconditional || |
1815 | + cursorVisible: text !== sim.callForwarding.voiceUnconditional || |
1816 | text === "" |
1817 | clip: true |
1818 | opacity: 0.9 |
1819 | @@ -133,30 +135,32 @@ |
1820 | spacing: units.gu(2) |
1821 | |
1822 | Button { |
1823 | + objectName: "cancel" |
1824 | text: i18n.tr("Cancel") |
1825 | width: (buttonsRowId.width-units.gu(2)*4)/3 |
1826 | enabled: !callForwardingIndicator.running |
1827 | onClicked: { |
1828 | destNumberField.text = |
1829 | - callForwarding.voiceUnconditional; |
1830 | + sim.callForwarding.voiceUnconditional; |
1831 | if (forwarding !== callForwardingSwitch.checked) |
1832 | callForwardingSwitch.checked = forwarding; |
1833 | } |
1834 | } |
1835 | |
1836 | Button { |
1837 | + objectName: "set" |
1838 | text: i18n.tr("Set") |
1839 | width: (buttonsRowId.width-units.gu(2)*4)/3 |
1840 | enabled: !callForwardingIndicator.running |
1841 | onClicked: { |
1842 | callForwardingIndicator.running = true; |
1843 | - callForwarding.voiceUnconditional = destNumberField.text; |
1844 | + sim.callForwarding.voiceUnconditional = destNumberField.text; |
1845 | } |
1846 | } |
1847 | } |
1848 | visible: callForwardingSwitch.checked && |
1849 | (destNumberField.text !== |
1850 | - callForwarding.voiceUnconditional) |
1851 | + sim.callForwarding.voiceUnconditional) |
1852 | } |
1853 | } |
1854 | } |
1855 | |
1856 | === modified file 'plugins/phone/CallWaiting.qml' |
1857 | --- plugins/phone/CallWaiting.qml 2014-07-16 16:45:25 +0000 |
1858 | +++ plugins/phone/CallWaiting.qml 2014-08-26 21:07:36 +0000 |
1859 | @@ -25,15 +25,24 @@ |
1860 | import MeeGo.QOfono 0.2 |
1861 | |
1862 | ItemPage { |
1863 | - title: i18n.tr("Call waiting") |
1864 | - property string modem |
1865 | + objectName: "callWaitingPage" |
1866 | + title: headerTitle |
1867 | + property var sim |
1868 | + property string headerTitle: i18n.tr("Call waiting") |
1869 | |
1870 | OfonoCallSettings { |
1871 | id: callSettings |
1872 | - modemPath: modem |
1873 | + modemPath: sim.path |
1874 | onVoiceCallWaitingChanged: { |
1875 | callWaitingIndicator.running = false; |
1876 | } |
1877 | + onGetPropertiesFailed: { |
1878 | + console.warn('callSettings, onGetPropertiesFailed'); |
1879 | + callWaitingIndicator.running = false; |
1880 | + } |
1881 | + onVoiceCallWaitingComplete: { |
1882 | + callWaitingIndicator.running = false; |
1883 | + } |
1884 | } |
1885 | |
1886 | ActivityIndicator { |
1887 | @@ -44,7 +53,9 @@ |
1888 | |
1889 | Switch { |
1890 | id: callWaitingSwitch |
1891 | + objectName: "callWaitingSwitch" |
1892 | visible: !callWaitingIndicator.running |
1893 | + enabled: callSettings.ready |
1894 | checked: callSettings.voiceCallWaiting !== "disabled" |
1895 | onClicked: { |
1896 | callWaitingIndicator.running = true; |
1897 | |
1898 | === added file 'plugins/phone/MultiSim.qml' |
1899 | --- plugins/phone/MultiSim.qml 1970-01-01 00:00:00 +0000 |
1900 | +++ plugins/phone/MultiSim.qml 2014-08-26 21:07:36 +0000 |
1901 | @@ -0,0 +1,135 @@ |
1902 | +/* |
1903 | + * Copyright (C) 2014 Canonical Ltd |
1904 | + * |
1905 | + * This program is free software: you can redistribute it and/or modify |
1906 | + * it under the terms of the GNU General Public License version 3 as |
1907 | + * published by the Free Software Foundation. |
1908 | + * |
1909 | + * This program is distributed in the hope that it will be useful, |
1910 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1911 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1912 | + * GNU General Public License for more details. |
1913 | + * |
1914 | + * You should have received a copy of the GNU General Public License |
1915 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1916 | + * |
1917 | + * Authors: |
1918 | + * Ken Vandine <ken.vandine@canonical.com> |
1919 | + * Jonas G. Drange <jonas.drange@canonical.com> |
1920 | + * |
1921 | +*/ |
1922 | +import QtQuick 2.0 |
1923 | +import GSettings 1.0 |
1924 | +import Ubuntu.Components 1.1 |
1925 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
1926 | + |
1927 | +Column { |
1928 | + |
1929 | + property var sims |
1930 | + |
1931 | + ListItem.Standard { |
1932 | + text: sims[0].title |
1933 | + } |
1934 | + |
1935 | + ListItem.Standard { |
1936 | + objectName: "callFwdSim1" |
1937 | + text: i18n.tr("Call forwarding") |
1938 | + progression: true |
1939 | + onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), { |
1940 | + sim: sims[0], |
1941 | + headerTitle: sims[0].title |
1942 | + }) |
1943 | + } |
1944 | + |
1945 | + ListItem.Standard { |
1946 | + objectName: "callWaitSim1" |
1947 | + text: i18n.tr("Call waiting") |
1948 | + progression: true |
1949 | + onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), { |
1950 | + sim: sims[0], |
1951 | + headerTitle: sims[0].title |
1952 | + }) |
1953 | + } |
1954 | + |
1955 | + ListItem.Standard { |
1956 | + objectName: "simServicesSim1" |
1957 | + text: i18n.tr("Services") |
1958 | + progression: true |
1959 | + enabled: sims[0].simMng.present |
1960 | + onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), { |
1961 | + carrierString: sims[0].netReg.name, |
1962 | + sim: sims[0].simMng, |
1963 | + headerTitle: sims[0].title |
1964 | + }) |
1965 | + } |
1966 | + |
1967 | + ListItem.Divider {} |
1968 | + |
1969 | + ListItem.Standard { |
1970 | + text: sims[1].title |
1971 | + } |
1972 | + |
1973 | + ListItem.Standard { |
1974 | + objectName: "callFwdSim2" |
1975 | + text: i18n.tr("Call forwarding") |
1976 | + progression: true |
1977 | + onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), { |
1978 | + sim: sims[1], |
1979 | + headerTitle: sims[1].title |
1980 | + }) |
1981 | + } |
1982 | + |
1983 | + ListItem.Standard { |
1984 | + objectName: "callWaitSim2" |
1985 | + text: i18n.tr("Call waiting") |
1986 | + progression: true |
1987 | + onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), { |
1988 | + sim: sims[1], |
1989 | + headerTitle: sims[1].title |
1990 | + }) |
1991 | + } |
1992 | + |
1993 | + ListItem.Standard { |
1994 | + objectName: "simServicesSim2" |
1995 | + text: i18n.tr("Services") |
1996 | + progression: true |
1997 | + enabled: sims[1].simMng.present |
1998 | + onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), { |
1999 | + carrierString: sims[1].netReg.name, |
2000 | + sim: sims[1].simMng, |
2001 | + headerTitle: sims[1].title |
2002 | + }) |
2003 | + } |
2004 | + |
2005 | + |
2006 | + GSettings { |
2007 | + id: phoneSettings |
2008 | + schema.id: "com.ubuntu.phone" |
2009 | + Component.onCompleted: { |
2010 | + // set default names |
2011 | + var simNames = phoneSettings.simNames; |
2012 | + var m0 = sims[0].path |
2013 | + var m1 = sims[1].path |
2014 | + if (!simNames[m0]) { |
2015 | + simNames[m0] = "SIM 1"; |
2016 | + } |
2017 | + if (!simNames[m1]) { |
2018 | + simNames[m1] = "SIM 2"; |
2019 | + } |
2020 | + phoneSettings.simNames = simNames; |
2021 | + } |
2022 | + } |
2023 | + |
2024 | + Binding { |
2025 | + target: sims[0] |
2026 | + property: "name" |
2027 | + value: phoneSettings.simNames[modemsSorted[0]] |
2028 | + } |
2029 | + |
2030 | + Binding { |
2031 | + target: sims[1] |
2032 | + property: "name" |
2033 | + value: phoneSettings.simNames[modemsSorted[1]] |
2034 | + } |
2035 | + |
2036 | +} |
2037 | |
2038 | === added file 'plugins/phone/NoSims.qml' |
2039 | --- plugins/phone/NoSims.qml 1970-01-01 00:00:00 +0000 |
2040 | +++ plugins/phone/NoSims.qml 2014-08-26 21:07:36 +0000 |
2041 | @@ -0,0 +1,46 @@ |
2042 | +/* |
2043 | + * Copyright (C) 2014 Canonical Ltd |
2044 | + * |
2045 | + * This program is free software: you can redistribute it and/or modify |
2046 | + * it under the terms of the GNU General Public License version 3 as |
2047 | + * published by the Free Software Foundation. |
2048 | + * |
2049 | + * This program is distributed in the hope that it will be useful, |
2050 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2051 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2052 | + * GNU General Public License for more details. |
2053 | + * |
2054 | + * You should have received a copy of the GNU General Public License |
2055 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2056 | + * |
2057 | + * Authors: |
2058 | + * Ken Vandine <ken.vandine@canonical.com> |
2059 | + * Jonas G. Drange <jonas.drange@canonical.com> |
2060 | + * |
2061 | +*/ |
2062 | +import QtQuick 2.0 |
2063 | +import Ubuntu.Components 1.1 |
2064 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
2065 | + |
2066 | +Column { |
2067 | + |
2068 | + ListItem.Standard { |
2069 | + text: i18n.tr("Call forwarding") |
2070 | + progression: true |
2071 | + enabled: false |
2072 | + } |
2073 | + |
2074 | + ListItem.Standard { |
2075 | + text: i18n.tr("Call waiting") |
2076 | + progression: true |
2077 | + enabled: false |
2078 | + } |
2079 | + |
2080 | + ListItem.Divider {} |
2081 | + |
2082 | + ListItem.Standard { |
2083 | + text: i18n.tr("Services") |
2084 | + progression: true |
2085 | + enabled: false |
2086 | + } |
2087 | +} |
2088 | |
2089 | === added file 'plugins/phone/Ofono.qml' |
2090 | --- plugins/phone/Ofono.qml 1970-01-01 00:00:00 +0000 |
2091 | +++ plugins/phone/Ofono.qml 2014-08-26 21:07:36 +0000 |
2092 | @@ -0,0 +1,50 @@ |
2093 | +/* |
2094 | + * Copyright (C) 2014 Canonical Ltd |
2095 | + * |
2096 | + * This program is free software: you can redistribute it and/or modify |
2097 | + * it under the terms of the GNU General Public License version 3 as |
2098 | + * published by the Free Software Foundation. |
2099 | + * |
2100 | + * This program is distributed in the hope that it will be useful, |
2101 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2102 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2103 | + * GNU General Public License for more details. |
2104 | + * |
2105 | + * You should have received a copy of the GNU General Public License |
2106 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2107 | + * |
2108 | + * Authors: |
2109 | + * Jonas G. Drange <jonas.drange@canonical.com> |
2110 | + * |
2111 | +*/ |
2112 | +import QtQuick 2.0 |
2113 | +import MeeGo.QOfono 0.2 |
2114 | + |
2115 | +Item { |
2116 | + property alias callForwarding: callForwarding |
2117 | + property alias netReg: netReg |
2118 | + property alias simMng: simMng |
2119 | + property alias present: simMng.present |
2120 | + |
2121 | + property string path |
2122 | + property string name |
2123 | + property string title: { |
2124 | + var number = simMng.subscriberNumbers[0] || simMng.subscriberIdentity; |
2125 | + return name + (number ? " (" + number + ")" : ""); |
2126 | + } |
2127 | + |
2128 | + OfonoCallForwarding { |
2129 | + id: callForwarding |
2130 | + modemPath: path |
2131 | + } |
2132 | + |
2133 | + OfonoNetworkRegistration { |
2134 | + id: netReg |
2135 | + modemPath: path |
2136 | + } |
2137 | + |
2138 | + OfonoSimManager { |
2139 | + id: simMng |
2140 | + modemPath: path |
2141 | + } |
2142 | +} |
2143 | |
2144 | === modified file 'plugins/phone/PageComponent.qml' |
2145 | --- plugins/phone/PageComponent.qml 2014-07-18 13:00:36 +0000 |
2146 | +++ plugins/phone/PageComponent.qml 2014-08-26 21:07:36 +0000 |
2147 | @@ -23,52 +23,77 @@ |
2148 | import Ubuntu.Components 0.1 |
2149 | import Ubuntu.Components.ListItems 0.1 as ListItem |
2150 | import MeeGo.QOfono 0.2 |
2151 | +import "sims.js" as Sims |
2152 | |
2153 | ItemPage { |
2154 | + id: root |
2155 | + objectName: "phonePage" |
2156 | title: i18n.tr("Phone") |
2157 | - property string carrierName: netop.name |
2158 | - property string carrierString: carrierName ? carrierName : i18n.tr("SIM") |
2159 | + flickable: flick |
2160 | + |
2161 | + property var modemsSorted: manager.modems.slice(0).sort() |
2162 | + property var simsLoaded: 0 |
2163 | + |
2164 | + states: [ |
2165 | + State { |
2166 | + name: "noSim" |
2167 | + StateChangeScript { |
2168 | + script: loader.setSource("NoSims.qml") |
2169 | + } |
2170 | + when: (simsLoaded === 0) || (Sims.getPresentCount() === 0) |
2171 | + }, |
2172 | + State { |
2173 | + name: "singleSim" |
2174 | + StateChangeScript { |
2175 | + script: loader.setSource("SingleSim.qml", { sim: Sims.get(0) }) |
2176 | + |
2177 | + } |
2178 | + when: simsLoaded && (Sims.getPresentCount() === 1) |
2179 | + }, |
2180 | + State { |
2181 | + name: "multiSim" |
2182 | + StateChangeScript { |
2183 | + script: loader.setSource("MultiSim.qml", { |
2184 | + sims: Sims.getAll() |
2185 | + }) |
2186 | + } |
2187 | + when: simsLoaded && (Sims.getPresentCount() > 1) |
2188 | + } |
2189 | + ] |
2190 | |
2191 | OfonoManager { |
2192 | id: manager |
2193 | - } |
2194 | - |
2195 | - OfonoNetworkRegistration { |
2196 | - id: netop; |
2197 | - modemPath: manager.modems[0] |
2198 | - onNameChanged: carrierName = netop.name |
2199 | - } |
2200 | - |
2201 | - OfonoSimManager { |
2202 | - id: sim |
2203 | - modemPath: manager.modems[0] |
2204 | - } |
2205 | - |
2206 | - Column { |
2207 | + Component.onCompleted: { |
2208 | + // create ofono bindings for all modem paths |
2209 | + var component = Qt.createComponent("Ofono.qml"); |
2210 | + modemsSorted.forEach(function (path) { |
2211 | + var sim = component.createObject(root, { |
2212 | + path: path |
2213 | + }); |
2214 | + if (sim === null) { |
2215 | + console.warn('failed to create sim object'); |
2216 | + } else { |
2217 | + Sims.add(sim); |
2218 | + } |
2219 | + }); |
2220 | + } |
2221 | + } |
2222 | + |
2223 | + Flickable { |
2224 | + id: flick |
2225 | anchors.fill: parent |
2226 | - |
2227 | - ListItem.Standard { |
2228 | - text: i18n.tr("Call forwarding") |
2229 | - progression: true |
2230 | - onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {modem: manager.modems[0]}) |
2231 | - } |
2232 | - |
2233 | - ListItem.Standard { |
2234 | - text: i18n.tr("Call waiting") |
2235 | - progression: true |
2236 | - onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {modem: manager.modems[0]}) |
2237 | - showDivider: false |
2238 | - } |
2239 | - |
2240 | - ListItem.Divider {} |
2241 | - |
2242 | - ListItem.Standard { |
2243 | - // TRANSLATORS: %1 is the name of the (network) carrier |
2244 | - text: i18n.tr("%1 Services").arg(carrierString) |
2245 | - progression: true |
2246 | - enabled: sim.present |
2247 | - onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), |
2248 | - {carrierString: carrierString, sim: sim}) |
2249 | + contentWidth: parent.width |
2250 | + contentHeight: contentItem.childrenRect.height |
2251 | + boundsBehavior: (contentHeight > root.height) ? |
2252 | + Flickable.DragAndOvershootBounds : Flickable.StopAtBounds |
2253 | + |
2254 | + Column { |
2255 | + anchors { left: parent.left; right: parent.right } |
2256 | + |
2257 | + Loader { |
2258 | + id: loader |
2259 | + anchors { left: parent.left; right: parent.right } |
2260 | + } |
2261 | } |
2262 | } |
2263 | } |
2264 | |
2265 | === modified file 'plugins/phone/Services.qml' |
2266 | --- plugins/phone/Services.qml 2014-06-19 03:54:01 +0000 |
2267 | +++ plugins/phone/Services.qml 2014-08-26 21:07:36 +0000 |
2268 | @@ -24,12 +24,15 @@ |
2269 | import Ubuntu.Components.ListItems 0.1 as ListItem |
2270 | |
2271 | ItemPage { |
2272 | + objectName: "servicesPage" |
2273 | + title: headerTitle |
2274 | property string carrierString |
2275 | property variant sim |
2276 | property var names: [] |
2277 | |
2278 | // TRANSLATORS: %1 is the name of the (network) carrier |
2279 | - title: i18n.tr("%1 Services").arg(carrierString) |
2280 | + property string headerTitle: i18n.tr("%1 Services").arg(carrierString) |
2281 | + |
2282 | |
2283 | Component.onCompleted: { |
2284 | var keys = []; |
2285 | |
2286 | === added file 'plugins/phone/SingleSim.qml' |
2287 | --- plugins/phone/SingleSim.qml 1970-01-01 00:00:00 +0000 |
2288 | +++ plugins/phone/SingleSim.qml 2014-08-26 21:07:36 +0000 |
2289 | @@ -0,0 +1,57 @@ |
2290 | +/* |
2291 | + * Copyright (C) 2014 Canonical Ltd |
2292 | + * |
2293 | + * This program is free software: you can redistribute it and/or modify |
2294 | + * it under the terms of the GNU General Public License version 3 as |
2295 | + * published by the Free Software Foundation. |
2296 | + * |
2297 | + * This program is distributed in the hope that it will be useful, |
2298 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2299 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2300 | + * GNU General Public License for more details. |
2301 | + * |
2302 | + * You should have received a copy of the GNU General Public License |
2303 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2304 | + * |
2305 | + * Authors: |
2306 | + * Ken Vandine <ken.vandine@canonical.com> |
2307 | + * Jonas G. Drange <jonas.drange@canonical.com> |
2308 | + * |
2309 | +*/ |
2310 | +import QtQuick 2.0 |
2311 | +import Ubuntu.Components 1.1 |
2312 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
2313 | + |
2314 | +Column { |
2315 | + |
2316 | + property var sim |
2317 | + property string carrierName: sim.netReg.name |
2318 | + property string carrierString: carrierName ? carrierName : i18n.tr("SIM") |
2319 | + |
2320 | + ListItem.Standard { |
2321 | + objectName: "callFwd" |
2322 | + text: i18n.tr("Call forwarding") |
2323 | + progression: true |
2324 | + onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {sim: sim}) |
2325 | + } |
2326 | + |
2327 | + ListItem.Standard { |
2328 | + objectName: "callWait" |
2329 | + text: i18n.tr("Call waiting") |
2330 | + progression: true |
2331 | + onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {sim: sim}) |
2332 | + showDivider: false |
2333 | + } |
2334 | + |
2335 | + ListItem.Divider {} |
2336 | + |
2337 | + ListItem.Standard { |
2338 | + objectName: "simServices" |
2339 | + // TRANSLATORS: %1 is the name of the (network) carrier |
2340 | + text: i18n.tr("%1 Services").arg(carrierString) |
2341 | + progression: true |
2342 | + enabled: sim.simMng.present |
2343 | + onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), |
2344 | + {carrierString: carrierString, sim: sim.simMng}) |
2345 | + } |
2346 | +} |
2347 | |
2348 | === added file 'plugins/phone/sims.js' |
2349 | --- plugins/phone/sims.js 1970-01-01 00:00:00 +0000 |
2350 | +++ plugins/phone/sims.js 2014-08-26 21:07:36 +0000 |
2351 | @@ -0,0 +1,34 @@ |
2352 | +var sims = []; |
2353 | + |
2354 | +function add (sim) { |
2355 | + sims.push(sim); |
2356 | + root.simsLoaded++; |
2357 | +} |
2358 | + |
2359 | +function getAll () { |
2360 | + return sims; |
2361 | +} |
2362 | + |
2363 | +function get (n) { |
2364 | + return getAll()[n]; |
2365 | +} |
2366 | + |
2367 | +function getCount () { |
2368 | + return getAll().length; |
2369 | +} |
2370 | + |
2371 | +function getPresent () { |
2372 | + var present = []; |
2373 | + getAll().forEach(function (sim) { |
2374 | + if (sim.present) { |
2375 | + present.push(sim); |
2376 | + } else { |
2377 | + return; |
2378 | + } |
2379 | + }); |
2380 | + return present; |
2381 | +} |
2382 | + |
2383 | +function getPresentCount () { |
2384 | + return getPresent().length; |
2385 | +} |
2386 | |
2387 | === modified file 'plugins/security-privacy/LockSecurity.qml' |
2388 | --- plugins/security-privacy/LockSecurity.qml 2014-08-12 08:37:44 +0000 |
2389 | +++ plugins/security-privacy/LockSecurity.qml 2014-08-26 21:07:36 +0000 |
2390 | @@ -89,9 +89,9 @@ |
2391 | changeSecurityDialog.oldMethod) { // Changing existing |
2392 | switch (changeSecurityDialog.newMethod) { |
2393 | case UbuntuSecurityPrivacyPanel.Passcode: |
2394 | - return i18n.tr("Change passcode") |
2395 | + return i18n.tr("Change passcode…") |
2396 | case UbuntuSecurityPrivacyPanel.Passphrase: |
2397 | - return i18n.tr("Change passphrase") |
2398 | + return i18n.tr("Change passphrase…") |
2399 | default: // To stop the runtime complaining |
2400 | return "" |
2401 | } |
2402 | @@ -390,6 +390,7 @@ |
2403 | |
2404 | onClicked: openDialog() |
2405 | } |
2406 | + showDivider: false |
2407 | } |
2408 | } |
2409 | } |
2410 | |
2411 | === modified file 'plugins/security-privacy/PageComponent.qml' |
2412 | --- plugins/security-privacy/PageComponent.qml 2014-08-11 11:05:58 +0000 |
2413 | +++ plugins/security-privacy/PageComponent.qml 2014-08-26 21:07:36 +0000 |
2414 | @@ -24,15 +24,20 @@ |
2415 | import Ubuntu.Components 0.1 |
2416 | import Ubuntu.Components.ListItems 0.1 as ListItem |
2417 | import SystemSettings 1.0 |
2418 | +import Ubuntu.SystemSettings.Battery 1.0 |
2419 | import Ubuntu.SystemSettings.Diagnostics 1.0 |
2420 | import Ubuntu.SystemSettings.SecurityPrivacy 1.0 |
2421 | |
2422 | ItemPage { |
2423 | id: root |
2424 | + objectName: "securityPrivacyPage" |
2425 | |
2426 | title: i18n.tr("Security & Privacy") |
2427 | flickable: scrollWidget |
2428 | |
2429 | + property alias usePowerd: batteryBackend.powerdRunning |
2430 | + property bool lockOnSuspend |
2431 | + |
2432 | UbuntuDiagnostics { |
2433 | id: diagnosticsWidget |
2434 | } |
2435 | @@ -41,6 +46,10 @@ |
2436 | id: securityPrivacy |
2437 | } |
2438 | |
2439 | + UbuntuBatteryPanel { |
2440 | + id: batteryBackend |
2441 | + } |
2442 | + |
2443 | GSettings { |
2444 | id: unitySettings |
2445 | schema.id: "com.canonical.Unity.Lenses" |
2446 | @@ -53,6 +62,11 @@ |
2447 | } |
2448 | } |
2449 | |
2450 | + GSettings { |
2451 | + id: powerSettings |
2452 | + schema.id: usePowerd ? "com.ubuntu.touch.system" : "org.gnome.desktop.session" |
2453 | + } |
2454 | + |
2455 | Flickable { |
2456 | id: scrollWidget |
2457 | anchors.fill: parent |
2458 | @@ -68,42 +82,34 @@ |
2459 | |
2460 | ListItem.Standard { |
2461 | id: securityTitle |
2462 | - text: i18n.tr("Security:") |
2463 | - // visible: lockingControl.visible || simControl.visible |
2464 | - } |
2465 | - /* When more of the phone locking page is implemented, we can |
2466 | - * remove the next item below, which is a duplicate of an item in |
2467 | - * PhoneLocking.qml, and uncomment the visible line above. */ |
2468 | + text: i18n.tr("Security") |
2469 | + } |
2470 | ListItem.SingleValue { |
2471 | - property string swipe: i18n.tr("None") |
2472 | - property string passcode: i18n.tr("Passcode") |
2473 | - property string passphrase: i18n.tr("Passphrase") |
2474 | - |
2475 | - text: i18n.tr("Lock security") |
2476 | + id: lockingControl |
2477 | + objectName: "lockingControl" |
2478 | + text: i18n.tr("Lock phone") |
2479 | value: { |
2480 | - switch (securityPrivacy.securityType) { |
2481 | - case UbuntuSecurityPrivacyPanel.Swipe: |
2482 | - return swipe |
2483 | - case UbuntuSecurityPrivacyPanel.Passcode: |
2484 | - return passcode |
2485 | - case UbuntuSecurityPrivacyPanel.Passphrase: |
2486 | - return passphrase |
2487 | + if (batteryBackend.powerdRunning ) { |
2488 | + var timeout = Math.round(powerSettings.activityTimeout/60) |
2489 | + return (powerSettings.activityTimeout != 0) ? |
2490 | + // TRANSLATORS: %1 is the number of minutes |
2491 | + i18n.tr("After %1 minute", |
2492 | + "After %1 minutes", |
2493 | + timeout).arg(timeout) : |
2494 | + i18n.tr("Never") |
2495 | + } |
2496 | + else { |
2497 | + var timeout = Math.round(powerSettings.idleDelay/60) |
2498 | + return (powerSettings.idleDelay != 0) ? |
2499 | + // TRANSLATORS: %1 is the number of minutes |
2500 | + i18n.tr("After %1 minute", |
2501 | + "After %1 minutes", |
2502 | + timeout).arg(timeout) : |
2503 | + i18n.tr("Manually") |
2504 | } |
2505 | } |
2506 | progression: true |
2507 | - onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml")) |
2508 | - visible: !showAllUI |
2509 | - } |
2510 | - ListItem.SingleValue { |
2511 | - id: lockingControl |
2512 | - text: i18n.tr("Phone locking") |
2513 | - // TRANSLATORS: %1 is the number of minutes |
2514 | - value: i18n.tr("%1 minute", |
2515 | - "%1 minutes", |
2516 | - 5).arg(5) |
2517 | - progression: true |
2518 | - onClicked: pageStack.push(Qt.resolvedUrl("PhoneLocking.qml")) |
2519 | - visible: showAllUI |
2520 | + onClicked: pageStack.push(Qt.resolvedUrl("PhoneLocking.qml"), {usePowerd: usePowerd, powerSettings: powerSettings}) |
2521 | } |
2522 | ListItem.SingleValue { |
2523 | id: simControl |
2524 | @@ -111,10 +117,22 @@ |
2525 | value: "Off" |
2526 | progression: true |
2527 | visible: showAllUI |
2528 | - } |
2529 | - ListItem.Standard { |
2530 | - text: i18n.tr("Privacy:") |
2531 | - visible: securityTitle.visible |
2532 | + /* Not implemented yet */ |
2533 | + //onClicked: pageStack.push(Qt.resolvedUrl("SimPin.qml")) |
2534 | + } |
2535 | + ListItem.Standard { |
2536 | + text: i18n.tr("Encryption") |
2537 | + control: Switch { |
2538 | + id: encryptionSwitch |
2539 | + checked: false |
2540 | + } |
2541 | + } |
2542 | + ListItem.Caption { |
2543 | + text: i18n.tr( |
2544 | + "Encryption protects against access to phone data when the phone is connected to a PC or other device.") |
2545 | + } |
2546 | + ListItem.Standard { |
2547 | + text: i18n.tr("Privacy") |
2548 | } |
2549 | ListItem.Standard { |
2550 | text: i18n.tr("Stats on welcome screen") |
2551 | @@ -164,7 +182,8 @@ |
2552 | } |
2553 | ListItem.SingleValue { |
2554 | text: i18n.tr("Location access") |
2555 | - value: "On" |
2556 | + value: locationActionGroup.enabled.state ? |
2557 | + i18n.tr("On") : i18n.tr("Off") |
2558 | progression: true |
2559 | onClicked: pageStack.push(Qt.resolvedUrl("Location.qml")) |
2560 | visible: showAllUI && // Hidden until the indicator works |
2561 | @@ -190,7 +209,6 @@ |
2562 | pageStack.push(Qt.resolvedUrl(path)); |
2563 | } |
2564 | } |
2565 | - |
2566 | } |
2567 | } |
2568 | } |
2569 | |
2570 | === modified file 'plugins/security-privacy/PhoneLocking.qml' |
2571 | --- plugins/security-privacy/PhoneLocking.qml 2014-06-24 18:50:41 +0000 |
2572 | +++ plugins/security-privacy/PhoneLocking.qml 2014-08-26 21:07:36 +0000 |
2573 | @@ -26,8 +26,13 @@ |
2574 | import Ubuntu.SystemSettings.SecurityPrivacy 1.0 |
2575 | |
2576 | ItemPage { |
2577 | + id: root |
2578 | + objectName: "phoneLockingPage" |
2579 | title: i18n.tr("Phone locking") |
2580 | |
2581 | + property bool usePowerd |
2582 | + property variant powerSettings |
2583 | + |
2584 | UbuntuSecurityPrivacyPanel { |
2585 | id: securityPrivacy |
2586 | } |
2587 | @@ -57,14 +62,31 @@ |
2588 | } |
2589 | |
2590 | ListItem.SingleValue { |
2591 | + objectName: "lockTimeout" |
2592 | property bool lockOnSuspend: securityPrivacy.securityType !== |
2593 | UbuntuSecurityPrivacyPanel.Swipe |
2594 | text: lockOnSuspend ? i18n.tr("Lock when idle") |
2595 | : i18n.tr("Sleep when idle") |
2596 | - // TRANSLATORS: %1 is the number of minutes |
2597 | - value: i18n.tr("%1 minute", |
2598 | - "%1 minutes", |
2599 | - 5).arg(5) |
2600 | + value: { |
2601 | + if (usePowerd) { |
2602 | + var timeout = Math.round(powerSettings.activityTimeout/60) |
2603 | + return (powerSettings.activityTimeout != 0) ? |
2604 | + // TRANSLATORS: %1 is the number of minutes |
2605 | + i18n.tr("%1 minute", |
2606 | + "%1 minutes", |
2607 | + timeout).arg(timeout) : |
2608 | + i18n.tr("Never") |
2609 | + } |
2610 | + else { |
2611 | + var timeout = Math.round(powerSettings.idleDelay/60) |
2612 | + return (powerSettings.idleDelay != 0) ? |
2613 | + // TRANSLATORS: %1 is the number of minutes |
2614 | + i18n.tr("%1 minute", |
2615 | + "%1 minutes", |
2616 | + timeout).arg(timeout) : |
2617 | + i18n.tr("Never") |
2618 | + } |
2619 | + } |
2620 | progression: true |
2621 | onClicked: |
2622 | pageStack.push( |
2623 | |
2624 | === modified file 'plugins/security-privacy/trust-store-model.cpp' |
2625 | --- plugins/security-privacy/trust-store-model.cpp 2014-08-19 13:00:15 +0000 |
2626 | +++ plugins/security-privacy/trust-store-model.cpp 2014-08-26 21:07:36 +0000 |
2627 | @@ -179,7 +179,7 @@ |
2628 | Q_Q(TrustStoreModel); |
2629 | |
2630 | Q_ASSERT(trustStore); |
2631 | - Q_ASSERT(row >= 0 && row < d->applications.count()); |
2632 | + Q_ASSERT(row >= 0 && row < applications.count()); |
2633 | |
2634 | Application &app = applications[row]; |
2635 | app.grantedFeatures.clear(); |
2636 | |
2637 | === modified file 'plugins/system-update/update_manager.cpp' |
2638 | --- plugins/system-update/update_manager.cpp 2014-05-13 14:30:04 +0000 |
2639 | +++ plugins/system-update/update_manager.cpp 2014-08-26 21:07:36 +0000 |
2640 | @@ -40,7 +40,8 @@ |
2641 | QObject(parent), |
2642 | m_systemCheckingUpdate(false), |
2643 | m_clickCheckingUpdate(false), |
2644 | - m_checkingUpdates(0) |
2645 | + m_checkingUpdates(0), |
2646 | + m_downloadMode(-1) |
2647 | { |
2648 | // SSO SERVICE |
2649 | QObject::connect(&m_service, SIGNAL(credentialsFound(const Token&)), |
2650 | |
2651 | === modified file 'plugins/time-date/timezonelocationmodel.cpp' |
2652 | --- plugins/time-date/timezonelocationmodel.cpp 2014-06-11 13:05:23 +0000 |
2653 | +++ plugins/time-date/timezonelocationmodel.cpp 2014-08-26 21:07:36 +0000 |
2654 | @@ -134,6 +134,7 @@ |
2655 | return QVariant(); |
2656 | break; |
2657 | } |
2658 | + throw "Unreachable code"; |
2659 | } |
2660 | |
2661 | QHash<int, QByteArray> TimeZoneLocationModel::roleNames() const |
2662 | @@ -193,11 +194,10 @@ |
2663 | TzDB *tzdb = tz_load_db(); |
2664 | GPtrArray *tz_locations = tz_get_locations(tzdb); |
2665 | |
2666 | - CcTimezoneLocation *tmp; |
2667 | TimeZoneLocationModel::TzLocation tmpTz; |
2668 | |
2669 | for (guint i = 0; i < tz_locations->len; ++i) { |
2670 | - tmp = (CcTimezoneLocation *) g_ptr_array_index(tz_locations, i); |
2671 | + auto tmp = static_cast<CcTimezoneLocation *>(g_ptr_array_index(tz_locations, i)); |
2672 | gchar *en_name, *country, *zone, *state, *full_country; |
2673 | g_object_get (tmp, "en_name", &en_name, |
2674 | "country", &country, |
2675 | |
2676 | === modified file 'po/am.po' |
2677 | --- po/am.po 2014-08-22 07:38:19 +0000 |
2678 | +++ po/am.po 2014-08-26 21:07:36 +0000 |
2679 | @@ -15,7 +15,7 @@ |
2680 | "Content-Type: text/plain; charset=UTF-8\n" |
2681 | "Content-Transfer-Encoding: 8bit\n" |
2682 | "Plural-Forms: nplurals=2; plural=n > 1;\n" |
2683 | -"X-Launchpad-Export-Date: 2014-08-22 07:37+0000\n" |
2684 | +"X-Launchpad-Export-Date: 2014-08-23 07:14+0000\n" |
2685 | "X-Generator: Launchpad (build 17163)\n" |
2686 | |
2687 | #: ../plugins/language//SpellChecking.qml:27 |
2688 | |
2689 | === modified file 'po/en_AU.po' |
2690 | --- po/en_AU.po 2014-08-20 06:22:04 +0000 |
2691 | +++ po/en_AU.po 2014-08-26 21:07:36 +0000 |
2692 | @@ -8,14 +8,14 @@ |
2693 | "Project-Id-Version: ubuntu-system-settings\n" |
2694 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
2695 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
2696 | -"PO-Revision-Date: 2014-08-13 02:03+0000\n" |
2697 | +"PO-Revision-Date: 2014-08-23 02:38+0000\n" |
2698 | "Last-Translator: Jared Norris <jarednorris@ubuntu.com>\n" |
2699 | "Language-Team: English (Australia) <en_AU@li.org>\n" |
2700 | "MIME-Version: 1.0\n" |
2701 | "Content-Type: text/plain; charset=UTF-8\n" |
2702 | "Content-Transfer-Encoding: 8bit\n" |
2703 | "Plural-Forms: nplurals=2; plural=n != 1;\n" |
2704 | -"X-Launchpad-Export-Date: 2014-08-20 06:21+0000\n" |
2705 | +"X-Launchpad-Export-Date: 2014-08-24 06:45+0000\n" |
2706 | "X-Generator: Launchpad (build 17163)\n" |
2707 | |
2708 | #: ../plugins/language//SpellChecking.qml:27 |
2709 | @@ -50,7 +50,7 @@ |
2710 | |
2711 | #: ../plugins/language//PageComponent.qml:128 |
2712 | msgid "Auto correction" |
2713 | -msgstr "" |
2714 | +msgstr "Auto correction" |
2715 | |
2716 | #: ../plugins/language//PageComponent.qml:138 |
2717 | msgid "Word suggestions" |
2718 | @@ -66,12 +66,13 @@ |
2719 | |
2720 | #: ../plugins/language//PageComponent.qml:168 |
2721 | msgid "Auto punctuation" |
2722 | -msgstr "" |
2723 | +msgstr "Auto punctuation" |
2724 | |
2725 | #: ../plugins/language//PageComponent.qml:178 |
2726 | msgid "" |
2727 | "Adds a period, and any missing quotes or brackets, when you tap Space twice." |
2728 | msgstr "" |
2729 | +"Adds a period, and any missing quotes or brackets, when you tap Space twice." |
2730 | |
2731 | #: ../plugins/language//PageComponent.qml:185 |
2732 | #: ../plugins/sound//PageComponent.qml:186 |
2733 | @@ -80,7 +81,7 @@ |
2734 | |
2735 | #: ../plugins/language//PageComponent.qml:195 |
2736 | msgid "Keyboard vibration" |
2737 | -msgstr "" |
2738 | +msgstr "Keyboard vibration" |
2739 | |
2740 | #: ../plugins/language//KeyboardLayouts.qml:39 |
2741 | msgid "Current layouts:" |
2742 | @@ -310,7 +311,7 @@ |
2743 | |
2744 | #: ../plugins/security-privacy//AppAccess.qml:35 |
2745 | msgid "Apps that you have granted and have requested access to:" |
2746 | -msgstr "" |
2747 | +msgstr "Apps that you have granted and have requested access to:" |
2748 | |
2749 | #: ../plugins/security-privacy//AppAccess.qml:41 |
2750 | #: ../plugins/bluetooth//PageComponent.qml:100 |
2751 | @@ -319,24 +320,24 @@ |
2752 | |
2753 | #: ../plugins/security-privacy//AppAccess.qml:42 |
2754 | msgid "Apps that have requested access to your camera" |
2755 | -msgstr "" |
2756 | +msgstr "Apps that have requested access to your camera" |
2757 | |
2758 | #: ../plugins/security-privacy//AppAccess.qml:46 |
2759 | msgid "Mic" |
2760 | -msgstr "" |
2761 | +msgstr "Mic" |
2762 | |
2763 | #: ../plugins/security-privacy//AppAccess.qml:47 |
2764 | msgid "Apps that have requested access to your mic" |
2765 | -msgstr "" |
2766 | +msgstr "Apps that have requested access to your mic" |
2767 | |
2768 | #: ../plugins/security-privacy//AppAccess.qml:59 |
2769 | #, qt-format |
2770 | msgid "%1/%2" |
2771 | -msgstr "" |
2772 | +msgstr "%1/%2" |
2773 | |
2774 | #: ../plugins/security-privacy//AppAccess.qml:60 |
2775 | msgid "0" |
2776 | -msgstr "" |
2777 | +msgstr "0" |
2778 | |
2779 | #: ../plugins/security-privacy//LockSecurity.qml:92 |
2780 | msgid "Change passcode" |
2781 | @@ -1075,7 +1076,7 @@ |
2782 | #: ../plugins/battery//PageComponent.qml:290 |
2783 | #: ../plugins/brightness//BrightnessSlider.qml:51 |
2784 | msgid "Display brightness" |
2785 | -msgstr "" |
2786 | +msgstr "Display brightness" |
2787 | |
2788 | #. TRANSLATORS: %1 is the number of minutes |
2789 | #: ../plugins/battery//PageComponent.qml:306 |
2790 | @@ -1418,7 +1419,7 @@ |
2791 | |
2792 | #: ../plugins/brightness//PageComponent.qml:65 |
2793 | msgid "Brightens and dims the display to suit the surroundings." |
2794 | -msgstr "" |
2795 | +msgstr "Brightens and dims the display to suit the surroundings." |
2796 | |
2797 | #. TRANSLATORS: This is a keyword or name for the sound plugin which is used while searching |
2798 | #: ../plugins/sound//PageComponent.qml:38 |
2799 | @@ -1564,27 +1565,27 @@ |
2800 | |
2801 | #: ../wizard/qml/Pages//15-passwd.qml:37 |
2802 | msgid "Set lock security" |
2803 | -msgstr "" |
2804 | +msgstr "Set lock security" |
2805 | |
2806 | #: ../wizard/qml/Pages//15-passwd.qml:86 |
2807 | msgid "Swipe" |
2808 | -msgstr "" |
2809 | +msgstr "Swipe" |
2810 | |
2811 | #: ../wizard/qml/Pages//15-passwd.qml:136 |
2812 | msgid "Those passcodes don't match." |
2813 | -msgstr "" |
2814 | +msgstr "Those passcodes don't match." |
2815 | |
2816 | #: ../wizard/qml/Pages//15-passwd.qml:138 |
2817 | msgid "Those passphrases don't match." |
2818 | -msgstr "" |
2819 | +msgstr "Those passphrases don't match." |
2820 | |
2821 | #: ../wizard/qml/Pages//15-passwd.qml:146 |
2822 | msgid "Passcode must be at least four digits long." |
2823 | -msgstr "" |
2824 | +msgstr "Passcode must be at least four digits long." |
2825 | |
2826 | #: ../wizard/qml/Pages//15-passwd.qml:148 |
2827 | msgid "Passphrase must be at least four characters long." |
2828 | -msgstr "" |
2829 | +msgstr "Passphrase must be at least four characters long." |
2830 | |
2831 | #: ../wizard/qml/Pages//10-welcome.qml:25 |
2832 | msgid "Hello" |
2833 | @@ -1890,8 +1891,8 @@ |
2834 | |
2835 | #: ../push-helper/software-updates-helper.py:78 |
2836 | msgid "There's an updated system image." |
2837 | -msgstr "" |
2838 | +msgstr "There's an updated system image." |
2839 | |
2840 | #: ../push-helper/software-updates-helper.py:79 |
2841 | msgid "Tap to open the system updater." |
2842 | -msgstr "" |
2843 | +msgstr "Tap to open the system updater." |
2844 | |
2845 | === modified file 'po/en_GB.po' |
2846 | --- po/en_GB.po 2014-08-20 06:22:04 +0000 |
2847 | +++ po/en_GB.po 2014-08-26 21:07:36 +0000 |
2848 | @@ -8,14 +8,14 @@ |
2849 | "Project-Id-Version: ubuntu-system-settings\n" |
2850 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
2851 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
2852 | -"PO-Revision-Date: 2014-08-12 12:45+0000\n" |
2853 | +"PO-Revision-Date: 2014-08-22 11:37+0000\n" |
2854 | "Last-Translator: Alan Pope ㋛ <alan@ubuntu.com>\n" |
2855 | "Language-Team: English (United Kingdom) <en_GB@li.org>\n" |
2856 | "MIME-Version: 1.0\n" |
2857 | "Content-Type: text/plain; charset=UTF-8\n" |
2858 | "Content-Transfer-Encoding: 8bit\n" |
2859 | "Plural-Forms: nplurals=2; plural=n != 1;\n" |
2860 | -"X-Launchpad-Export-Date: 2014-08-20 06:21+0000\n" |
2861 | +"X-Launchpad-Export-Date: 2014-08-23 07:15+0000\n" |
2862 | "X-Generator: Launchpad (build 17163)\n" |
2863 | |
2864 | #: ../plugins/language//SpellChecking.qml:27 |
2865 | @@ -50,7 +50,7 @@ |
2866 | |
2867 | #: ../plugins/language//PageComponent.qml:128 |
2868 | msgid "Auto correction" |
2869 | -msgstr "" |
2870 | +msgstr "Auto correction" |
2871 | |
2872 | #: ../plugins/language//PageComponent.qml:138 |
2873 | msgid "Word suggestions" |
2874 | @@ -66,12 +66,14 @@ |
2875 | |
2876 | #: ../plugins/language//PageComponent.qml:168 |
2877 | msgid "Auto punctuation" |
2878 | -msgstr "" |
2879 | +msgstr "Auto punctuation" |
2880 | |
2881 | #: ../plugins/language//PageComponent.qml:178 |
2882 | msgid "" |
2883 | "Adds a period, and any missing quotes or brackets, when you tap Space twice." |
2884 | msgstr "" |
2885 | +"Adds a full-stop, and any missing quotes or brackets, when you tap Space " |
2886 | +"twice." |
2887 | |
2888 | #: ../plugins/language//PageComponent.qml:185 |
2889 | #: ../plugins/sound//PageComponent.qml:186 |
2890 | @@ -80,7 +82,7 @@ |
2891 | |
2892 | #: ../plugins/language//PageComponent.qml:195 |
2893 | msgid "Keyboard vibration" |
2894 | -msgstr "" |
2895 | +msgstr "Keyboard vibration" |
2896 | |
2897 | #: ../plugins/language//KeyboardLayouts.qml:39 |
2898 | msgid "Current layouts:" |
2899 | @@ -310,7 +312,7 @@ |
2900 | |
2901 | #: ../plugins/security-privacy//AppAccess.qml:35 |
2902 | msgid "Apps that you have granted and have requested access to:" |
2903 | -msgstr "" |
2904 | +msgstr "Apps that you have granted and have requested access to:" |
2905 | |
2906 | #: ../plugins/security-privacy//AppAccess.qml:41 |
2907 | #: ../plugins/bluetooth//PageComponent.qml:100 |
2908 | @@ -319,24 +321,24 @@ |
2909 | |
2910 | #: ../plugins/security-privacy//AppAccess.qml:42 |
2911 | msgid "Apps that have requested access to your camera" |
2912 | -msgstr "" |
2913 | +msgstr "Apps that have requested access to your camera" |
2914 | |
2915 | #: ../plugins/security-privacy//AppAccess.qml:46 |
2916 | msgid "Mic" |
2917 | -msgstr "" |
2918 | +msgstr "Mic" |
2919 | |
2920 | #: ../plugins/security-privacy//AppAccess.qml:47 |
2921 | msgid "Apps that have requested access to your mic" |
2922 | -msgstr "" |
2923 | +msgstr "Apps that have requested access to your mic" |
2924 | |
2925 | #: ../plugins/security-privacy//AppAccess.qml:59 |
2926 | #, qt-format |
2927 | msgid "%1/%2" |
2928 | -msgstr "" |
2929 | +msgstr "%1/%2" |
2930 | |
2931 | #: ../plugins/security-privacy//AppAccess.qml:60 |
2932 | msgid "0" |
2933 | -msgstr "" |
2934 | +msgstr "0" |
2935 | |
2936 | #: ../plugins/security-privacy//LockSecurity.qml:92 |
2937 | msgid "Change passcode" |
2938 | @@ -1075,7 +1077,7 @@ |
2939 | #: ../plugins/battery//PageComponent.qml:290 |
2940 | #: ../plugins/brightness//BrightnessSlider.qml:51 |
2941 | msgid "Display brightness" |
2942 | -msgstr "" |
2943 | +msgstr "Display brightness" |
2944 | |
2945 | #. TRANSLATORS: %1 is the number of minutes |
2946 | #: ../plugins/battery//PageComponent.qml:306 |
2947 | @@ -1418,7 +1420,7 @@ |
2948 | |
2949 | #: ../plugins/brightness//PageComponent.qml:65 |
2950 | msgid "Brightens and dims the display to suit the surroundings." |
2951 | -msgstr "" |
2952 | +msgstr "Brightens and dims the display to suit the surroundings." |
2953 | |
2954 | #. TRANSLATORS: This is a keyword or name for the sound plugin which is used while searching |
2955 | #: ../plugins/sound//PageComponent.qml:38 |
2956 | @@ -1564,27 +1566,27 @@ |
2957 | |
2958 | #: ../wizard/qml/Pages//15-passwd.qml:37 |
2959 | msgid "Set lock security" |
2960 | -msgstr "" |
2961 | +msgstr "Set lock security" |
2962 | |
2963 | #: ../wizard/qml/Pages//15-passwd.qml:86 |
2964 | msgid "Swipe" |
2965 | -msgstr "" |
2966 | +msgstr "Swipe" |
2967 | |
2968 | #: ../wizard/qml/Pages//15-passwd.qml:136 |
2969 | msgid "Those passcodes don't match." |
2970 | -msgstr "" |
2971 | +msgstr "Those passcodes don't match." |
2972 | |
2973 | #: ../wizard/qml/Pages//15-passwd.qml:138 |
2974 | msgid "Those passphrases don't match." |
2975 | -msgstr "" |
2976 | +msgstr "Those passphrases don't match." |
2977 | |
2978 | #: ../wizard/qml/Pages//15-passwd.qml:146 |
2979 | msgid "Passcode must be at least four digits long." |
2980 | -msgstr "" |
2981 | +msgstr "Passcode must be at least four digits long." |
2982 | |
2983 | #: ../wizard/qml/Pages//15-passwd.qml:148 |
2984 | msgid "Passphrase must be at least four characters long." |
2985 | -msgstr "" |
2986 | +msgstr "Passphrase must be at least four characters long." |
2987 | |
2988 | #: ../wizard/qml/Pages//10-welcome.qml:25 |
2989 | msgid "Hello" |
2990 | @@ -1890,8 +1892,8 @@ |
2991 | |
2992 | #: ../push-helper/software-updates-helper.py:78 |
2993 | msgid "There's an updated system image." |
2994 | -msgstr "" |
2995 | +msgstr "There's an updated system image." |
2996 | |
2997 | #: ../push-helper/software-updates-helper.py:79 |
2998 | msgid "Tap to open the system updater." |
2999 | -msgstr "" |
3000 | +msgstr "Tap to open the system updater." |
3001 | |
3002 | === modified file 'po/es.po' |
3003 | --- po/es.po 2014-08-20 06:22:04 +0000 |
3004 | +++ po/es.po 2014-08-26 21:07:36 +0000 |
3005 | @@ -8,14 +8,14 @@ |
3006 | "Project-Id-Version: ubuntu-system-settings\n" |
3007 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
3008 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
3009 | -"PO-Revision-Date: 2014-08-16 13:20+0000\n" |
3010 | -"Last-Translator: Adolfo Jayme <fitoschido@gmail.com>\n" |
3011 | +"PO-Revision-Date: 2014-08-24 05:35+0000\n" |
3012 | +"Last-Translator: Leo Arias <leo.arias@canonical.com>\n" |
3013 | "Language-Team: Spanish <es@li.org>\n" |
3014 | "MIME-Version: 1.0\n" |
3015 | "Content-Type: text/plain; charset=UTF-8\n" |
3016 | "Content-Transfer-Encoding: 8bit\n" |
3017 | "Plural-Forms: nplurals=2; plural=n != 1;\n" |
3018 | -"X-Launchpad-Export-Date: 2014-08-20 06:21+0000\n" |
3019 | +"X-Launchpad-Export-Date: 2014-08-25 08:05+0000\n" |
3020 | "X-Generator: Launchpad (build 17163)\n" |
3021 | |
3022 | #: ../plugins/language//SpellChecking.qml:27 |
3023 | @@ -50,7 +50,7 @@ |
3024 | |
3025 | #: ../plugins/language//PageComponent.qml:128 |
3026 | msgid "Auto correction" |
3027 | -msgstr "" |
3028 | +msgstr "Corrección automática" |
3029 | |
3030 | #: ../plugins/language//PageComponent.qml:138 |
3031 | msgid "Word suggestions" |
3032 | @@ -66,7 +66,7 @@ |
3033 | |
3034 | #: ../plugins/language//PageComponent.qml:168 |
3035 | msgid "Auto punctuation" |
3036 | -msgstr "" |
3037 | +msgstr "Puntuación automática" |
3038 | |
3039 | #: ../plugins/language//PageComponent.qml:178 |
3040 | msgid "" |
3041 | |
3042 | === modified file 'po/fi.po' |
3043 | --- po/fi.po 2014-08-20 06:22:04 +0000 |
3044 | +++ po/fi.po 2014-08-26 21:07:36 +0000 |
3045 | @@ -8,14 +8,14 @@ |
3046 | "Project-Id-Version: ubuntu-system-settings\n" |
3047 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
3048 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
3049 | -"PO-Revision-Date: 2014-08-18 07:37+0000\n" |
3050 | +"PO-Revision-Date: 2014-08-22 09:53+0000\n" |
3051 | "Last-Translator: Timo Jyrinki <timo.jyrinki@canonical.com>\n" |
3052 | "Language-Team: Finnish <fi@li.org>\n" |
3053 | "MIME-Version: 1.0\n" |
3054 | "Content-Type: text/plain; charset=UTF-8\n" |
3055 | "Content-Transfer-Encoding: 8bit\n" |
3056 | "Plural-Forms: nplurals=2; plural=n != 1;\n" |
3057 | -"X-Launchpad-Export-Date: 2014-08-20 06:19+0000\n" |
3058 | +"X-Launchpad-Export-Date: 2014-08-23 07:15+0000\n" |
3059 | "X-Generator: Launchpad (build 17163)\n" |
3060 | |
3061 | #: ../plugins/language//SpellChecking.qml:27 |
3062 | @@ -50,7 +50,7 @@ |
3063 | |
3064 | #: ../plugins/language//PageComponent.qml:128 |
3065 | msgid "Auto correction" |
3066 | -msgstr "" |
3067 | +msgstr "Automaattinen korjaus" |
3068 | |
3069 | #: ../plugins/language//PageComponent.qml:138 |
3070 | msgid "Word suggestions" |
3071 | @@ -66,12 +66,14 @@ |
3072 | |
3073 | #: ../plugins/language//PageComponent.qml:168 |
3074 | msgid "Auto punctuation" |
3075 | -msgstr "" |
3076 | +msgstr "Automaattiset välimerkit" |
3077 | |
3078 | #: ../plugins/language//PageComponent.qml:178 |
3079 | msgid "" |
3080 | "Adds a period, and any missing quotes or brackets, when you tap Space twice." |
3081 | msgstr "" |
3082 | +"Lisää pisteen sekä puuttuvat lainausmerkit ja sulut, kun painat välilyöntiä " |
3083 | +"kahdesti." |
3084 | |
3085 | #: ../plugins/language//PageComponent.qml:185 |
3086 | #: ../plugins/sound//PageComponent.qml:186 |
3087 | @@ -80,7 +82,7 @@ |
3088 | |
3089 | #: ../plugins/language//PageComponent.qml:195 |
3090 | msgid "Keyboard vibration" |
3091 | -msgstr "" |
3092 | +msgstr "Näppäimistön värinä" |
3093 | |
3094 | #: ../plugins/language//KeyboardLayouts.qml:39 |
3095 | msgid "Current layouts:" |
3096 | @@ -148,14 +150,14 @@ |
3097 | #: ../plugins/security-privacy//PhoneLocking.qml:41 |
3098 | #: ../wizard/qml/Pages//15-passwd.qml:88 |
3099 | msgid "Passcode" |
3100 | -msgstr "Pääsykoodi" |
3101 | +msgstr "Suojakoodi" |
3102 | |
3103 | #: ../plugins/security-privacy//PageComponent.qml:80 |
3104 | #: ../plugins/security-privacy//PhoneLocking.qml:42 |
3105 | #: ../plugins/security-privacy//LockSecurity.qml:346 |
3106 | #: ../wizard/qml/Pages//15-passwd.qml:90 |
3107 | msgid "Passphrase" |
3108 | -msgstr "Avainlause" |
3109 | +msgstr "Salasana" |
3110 | |
3111 | #: ../plugins/security-privacy//PageComponent.qml:82 |
3112 | #: ../plugins/security-privacy//PhoneLocking.qml:44 |
3113 | @@ -312,7 +314,7 @@ |
3114 | |
3115 | #: ../plugins/security-privacy//AppAccess.qml:35 |
3116 | msgid "Apps that you have granted and have requested access to:" |
3117 | -msgstr "" |
3118 | +msgstr "Sovellukset, jotka ovat pyytäneet ja joille on annettu oikeudet:" |
3119 | |
3120 | #: ../plugins/security-privacy//AppAccess.qml:41 |
3121 | #: ../plugins/bluetooth//PageComponent.qml:100 |
3122 | @@ -321,32 +323,32 @@ |
3123 | |
3124 | #: ../plugins/security-privacy//AppAccess.qml:42 |
3125 | msgid "Apps that have requested access to your camera" |
3126 | -msgstr "" |
3127 | +msgstr "Sovellukset jotka ovat pyytäneet pääsyä kameraan" |
3128 | |
3129 | #: ../plugins/security-privacy//AppAccess.qml:46 |
3130 | msgid "Mic" |
3131 | -msgstr "" |
3132 | +msgstr "Mikrofoni" |
3133 | |
3134 | #: ../plugins/security-privacy//AppAccess.qml:47 |
3135 | msgid "Apps that have requested access to your mic" |
3136 | -msgstr "" |
3137 | +msgstr "Sovellukset jotka ovat pyytäneet pääsyä mikrofoniin" |
3138 | |
3139 | #: ../plugins/security-privacy//AppAccess.qml:59 |
3140 | #, qt-format |
3141 | msgid "%1/%2" |
3142 | -msgstr "" |
3143 | +msgstr "%1/%2" |
3144 | |
3145 | #: ../plugins/security-privacy//AppAccess.qml:60 |
3146 | msgid "0" |
3147 | -msgstr "" |
3148 | +msgstr "0" |
3149 | |
3150 | #: ../plugins/security-privacy//LockSecurity.qml:92 |
3151 | msgid "Change passcode" |
3152 | -msgstr "Vaihda pääsykoodi" |
3153 | +msgstr "Vaihda suojakoodi" |
3154 | |
3155 | #: ../plugins/security-privacy//LockSecurity.qml:94 |
3156 | msgid "Change passphrase" |
3157 | -msgstr "Vaihda avainlause" |
3158 | +msgstr "Vaihda salasanaa" |
3159 | |
3160 | #: ../plugins/security-privacy//LockSecurity.qml:101 |
3161 | msgid "Switch to swipe" |
3162 | @@ -354,43 +356,43 @@ |
3163 | |
3164 | #: ../plugins/security-privacy//LockSecurity.qml:103 |
3165 | msgid "Switch to passcode" |
3166 | -msgstr "Vaihda pääsykoodiin" |
3167 | +msgstr "Vaihda suojakoodiin" |
3168 | |
3169 | #: ../plugins/security-privacy//LockSecurity.qml:105 |
3170 | msgid "Switch to passphrase" |
3171 | -msgstr "Vaihda avainlauseeseen" |
3172 | +msgstr "Vaihda salasanaan" |
3173 | |
3174 | #: ../plugins/security-privacy//LockSecurity.qml:114 |
3175 | msgid "Existing passcode" |
3176 | -msgstr "Nykyinen pääsykoodi" |
3177 | +msgstr "Nykyinen suojakoodi" |
3178 | |
3179 | #: ../plugins/security-privacy//LockSecurity.qml:116 |
3180 | msgid "Existing passphrase" |
3181 | -msgstr "Nykyinen avainlause" |
3182 | +msgstr "Nykyinen salasana" |
3183 | |
3184 | #: ../plugins/security-privacy//LockSecurity.qml:170 |
3185 | msgid "Choose passcode" |
3186 | -msgstr "Valitse pääsykoodi" |
3187 | +msgstr "Valitse suojakoodi" |
3188 | |
3189 | #: ../plugins/security-privacy//LockSecurity.qml:172 |
3190 | msgid "Choose passphrase" |
3191 | -msgstr "Valitse avainlause" |
3192 | +msgstr "Valitse salasana" |
3193 | |
3194 | #: ../plugins/security-privacy//LockSecurity.qml:216 |
3195 | msgid "Confirm passcode" |
3196 | -msgstr "Vahvista pääsykoodi" |
3197 | +msgstr "Vahvista suojakoodi" |
3198 | |
3199 | #: ../plugins/security-privacy//LockSecurity.qml:218 |
3200 | msgid "Confirm passphrase" |
3201 | -msgstr "Vahvista avainlause" |
3202 | +msgstr "Vahvista salasana" |
3203 | |
3204 | #: ../plugins/security-privacy//LockSecurity.qml:261 |
3205 | msgid "Those passcodes don't match. Try again." |
3206 | -msgstr "Pääsykoodit eivät vastaa toisiaan. Yritä uudelleen." |
3207 | +msgstr "Suojakoodit eivät vastaa toisiaan. Yritä uudelleen." |
3208 | |
3209 | #: ../plugins/security-privacy//LockSecurity.qml:264 |
3210 | msgid "Those passphrases don't match. Try again." |
3211 | -msgstr "Avainlauseet eivät vastaa toisiaan. Yritä uudelleen." |
3212 | +msgstr "Salasanat eivät vastaa toisiaan. Yritä uudelleen." |
3213 | |
3214 | #: ../plugins/security-privacy//LockSecurity.qml:295 |
3215 | msgid "Unset" |
3216 | @@ -418,7 +420,7 @@ |
3217 | |
3218 | #: ../plugins/security-privacy//LockSecurity.qml:345 |
3219 | msgid "4-digit passcode" |
3220 | -msgstr "4-numeroinen pääsykoodi" |
3221 | +msgstr "4-numeroinen suojakoodi" |
3222 | |
3223 | #: ../plugins/security-privacy//LockSecurity.qml:347 |
3224 | msgid "Swipe (no security)… " |
3225 | @@ -426,19 +428,19 @@ |
3226 | |
3227 | #: ../plugins/security-privacy//LockSecurity.qml:348 |
3228 | msgid "4-digit passcode…" |
3229 | -msgstr "Nelinumeroinen pääsykoodi…" |
3230 | +msgstr "Nelinumeroinen suojakoodi…" |
3231 | |
3232 | #: ../plugins/security-privacy//LockSecurity.qml:349 |
3233 | msgid "Passphrase…" |
3234 | -msgstr "Avainlause…" |
3235 | +msgstr "Salasana…" |
3236 | |
3237 | #: ../plugins/security-privacy//LockSecurity.qml:380 |
3238 | msgid "Change passcode…" |
3239 | -msgstr "Vaihda pääsykoodi…" |
3240 | +msgstr "Vaihda suojakoodi…" |
3241 | |
3242 | #: ../plugins/security-privacy//LockSecurity.qml:381 |
3243 | msgid "Change passphrase…" |
3244 | -msgstr "Vaihda avainlause…" |
3245 | +msgstr "Vaihda salasana…" |
3246 | |
3247 | #: ../plugins/security-privacy//Dash.qml:45 |
3248 | msgid "Return results from:" |
3249 | @@ -841,7 +843,7 @@ |
3250 | |
3251 | #: ../plugins/about//DevMode.qml:98 |
3252 | msgid "You need a passcode or passphrase set to use Developer Mode." |
3253 | -msgstr "Tarvitset kehittäjätilaa varten tunnuskoodin tai salasanan." |
3254 | +msgstr "Tarvitset kehittäjätilaa varten suojakoodin tai salasanan." |
3255 | |
3256 | #: ../plugins/about//Storage.qml:87 |
3257 | msgid "Used by Ubuntu" |
3258 | @@ -1077,7 +1079,7 @@ |
3259 | #: ../plugins/battery//PageComponent.qml:290 |
3260 | #: ../plugins/brightness//BrightnessSlider.qml:51 |
3261 | msgid "Display brightness" |
3262 | -msgstr "" |
3263 | +msgstr "Näytön kirkkaus" |
3264 | |
3265 | #. TRANSLATORS: %1 is the number of minutes |
3266 | #: ../plugins/battery//PageComponent.qml:306 |
3267 | @@ -1421,7 +1423,7 @@ |
3268 | |
3269 | #: ../plugins/brightness//PageComponent.qml:65 |
3270 | msgid "Brightens and dims the display to suit the surroundings." |
3271 | -msgstr "" |
3272 | +msgstr "Näytön kirkkauden säätö ympäristöön sopivaksi" |
3273 | |
3274 | #. TRANSLATORS: This is a keyword or name for the sound plugin which is used while searching |
3275 | #: ../plugins/sound//PageComponent.qml:38 |
3276 | @@ -1567,27 +1569,27 @@ |
3277 | |
3278 | #: ../wizard/qml/Pages//15-passwd.qml:37 |
3279 | msgid "Set lock security" |
3280 | -msgstr "" |
3281 | +msgstr "Aseta lukitustapa" |
3282 | |
3283 | #: ../wizard/qml/Pages//15-passwd.qml:86 |
3284 | msgid "Swipe" |
3285 | -msgstr "" |
3286 | +msgstr "Pyyhkäisy" |
3287 | |
3288 | #: ../wizard/qml/Pages//15-passwd.qml:136 |
3289 | msgid "Those passcodes don't match." |
3290 | -msgstr "" |
3291 | +msgstr "Suojakoodit eivät täsmää." |
3292 | |
3293 | #: ../wizard/qml/Pages//15-passwd.qml:138 |
3294 | msgid "Those passphrases don't match." |
3295 | -msgstr "" |
3296 | +msgstr "Salasanat eivät täsmää." |
3297 | |
3298 | #: ../wizard/qml/Pages//15-passwd.qml:146 |
3299 | msgid "Passcode must be at least four digits long." |
3300 | -msgstr "" |
3301 | +msgstr "Suojakoodin tulee olla vähintään neljä numeroa." |
3302 | |
3303 | #: ../wizard/qml/Pages//15-passwd.qml:148 |
3304 | msgid "Passphrase must be at least four characters long." |
3305 | -msgstr "" |
3306 | +msgstr "Salasanan tulee olla vähintään neljä kirjainta." |
3307 | |
3308 | #: ../wizard/qml/Pages//10-welcome.qml:25 |
3309 | msgid "Hello" |
3310 | @@ -1893,8 +1895,8 @@ |
3311 | |
3312 | #: ../push-helper/software-updates-helper.py:78 |
3313 | msgid "There's an updated system image." |
3314 | -msgstr "" |
3315 | +msgstr "Päivitetty järjestelmäversio saatavilla." |
3316 | |
3317 | #: ../push-helper/software-updates-helper.py:79 |
3318 | msgid "Tap to open the system updater." |
3319 | -msgstr "" |
3320 | +msgstr "Kosketa avataksesi järjestelmän päivityksen." |
3321 | |
3322 | === modified file 'po/fr.po' |
3323 | --- po/fr.po 2014-08-22 07:38:19 +0000 |
3324 | +++ po/fr.po 2014-08-26 21:07:36 +0000 |
3325 | @@ -8,14 +8,14 @@ |
3326 | "Project-Id-Version: ubuntu-system-settings\n" |
3327 | "Report-Msgid-Bugs-To: \n" |
3328 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
3329 | -"PO-Revision-Date: 2014-08-21 19:05+0000\n" |
3330 | +"PO-Revision-Date: 2014-08-24 14:24+0000\n" |
3331 | "Last-Translator: Anne <anneonyme017@gmail.com>\n" |
3332 | "Language-Team: LANGUAGE <LL@li.org>\n" |
3333 | "MIME-Version: 1.0\n" |
3334 | "Content-Type: text/plain; charset=UTF-8\n" |
3335 | "Content-Transfer-Encoding: 8bit\n" |
3336 | "Plural-Forms: nplurals=2; plural=n > 1;\n" |
3337 | -"X-Launchpad-Export-Date: 2014-08-22 07:38+0000\n" |
3338 | +"X-Launchpad-Export-Date: 2014-08-25 08:05+0000\n" |
3339 | "X-Generator: Launchpad (build 17163)\n" |
3340 | "Language: \n" |
3341 | |
3342 | @@ -75,6 +75,8 @@ |
3343 | msgid "" |
3344 | "Adds a period, and any missing quotes or brackets, when you tap Space twice." |
3345 | msgstr "" |
3346 | +"Ajoute un point, ainsi que les parenthèses ou les guillemets manquants, " |
3347 | +"lorsque vous appuyez deux fois sur Espace." |
3348 | |
3349 | #: ../plugins/language//PageComponent.qml:185 |
3350 | #: ../plugins/sound//PageComponent.qml:186 |
3351 | |
3352 | === modified file 'po/gl.po' |
3353 | --- po/gl.po 2014-08-22 07:38:19 +0000 |
3354 | +++ po/gl.po 2014-08-26 21:07:36 +0000 |
3355 | @@ -8,14 +8,14 @@ |
3356 | "Project-Id-Version: ubuntu-system-settings\n" |
3357 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
3358 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
3359 | -"PO-Revision-Date: 2014-08-21 14:17+0000\n" |
3360 | +"PO-Revision-Date: 2014-08-23 20:46+0000\n" |
3361 | "Last-Translator: Marcos Lans <Unknown>\n" |
3362 | "Language-Team: Galician <gl@li.org>\n" |
3363 | "MIME-Version: 1.0\n" |
3364 | "Content-Type: text/plain; charset=UTF-8\n" |
3365 | "Content-Transfer-Encoding: 8bit\n" |
3366 | "Plural-Forms: nplurals=2; plural=n != 1;\n" |
3367 | -"X-Launchpad-Export-Date: 2014-08-22 07:38+0000\n" |
3368 | +"X-Launchpad-Export-Date: 2014-08-24 06:45+0000\n" |
3369 | "X-Generator: Launchpad (build 17163)\n" |
3370 | "Language: Galician\n" |
3371 | |
3372 | @@ -132,7 +132,7 @@ |
3373 | #: ../plugins/security-privacy//PageComponent.qml:151 |
3374 | #: ../plugins/security-privacy//Dash.qml:46 |
3375 | msgid "Phone only" |
3376 | -msgstr "Existente no teléfono" |
3377 | +msgstr "Só do teléfono" |
3378 | |
3379 | #: ../plugins/security-privacy//PageComponent.qml:71 |
3380 | msgid "Security:" |
3381 | @@ -846,8 +846,8 @@ |
3382 | #: ../plugins/about//DevMode.qml:98 |
3383 | msgid "You need a passcode or passphrase set to use Developer Mode." |
3384 | msgstr "" |
3385 | -"Precisa estabelecer unha clave ou frase secreta para usar o Modo " |
3386 | -"Desenvolvedor" |
3387 | +"Precisa estabelecer unha clave ou unha frase secreta para usar o Modo " |
3388 | +"Desenvolvedor." |
3389 | |
3390 | #: ../plugins/about//Storage.qml:87 |
3391 | msgid "Used by Ubuntu" |
3392 | @@ -1586,7 +1586,7 @@ |
3393 | |
3394 | #: ../wizard/qml/Pages//15-passwd.qml:138 |
3395 | msgid "Those passphrases don't match." |
3396 | -msgstr "As frases de paso non coinciden." |
3397 | +msgstr "As frases secretas non coinciden." |
3398 | |
3399 | #: ../wizard/qml/Pages//15-passwd.qml:146 |
3400 | msgid "Passcode must be at least four digits long." |
3401 | @@ -1594,7 +1594,7 @@ |
3402 | |
3403 | #: ../wizard/qml/Pages//15-passwd.qml:148 |
3404 | msgid "Passphrase must be at least four characters long." |
3405 | -msgstr "A frase de paso debe ter 4 caracteres como mínimo." |
3406 | +msgstr "A frase secreta debe ter 4 caracteres como mínimo." |
3407 | |
3408 | #: ../wizard/qml/Pages//10-welcome.qml:25 |
3409 | msgid "Hello" |
3410 | |
3411 | === modified file 'po/he.po' |
3412 | --- po/he.po 2014-08-20 06:22:04 +0000 |
3413 | +++ po/he.po 2014-08-26 21:07:36 +0000 |
3414 | @@ -8,14 +8,14 @@ |
3415 | "Project-Id-Version: ubuntu-system-settings\n" |
3416 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
3417 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
3418 | -"PO-Revision-Date: 2014-07-30 13:16+0000\n" |
3419 | +"PO-Revision-Date: 2014-08-23 11:41+0000\n" |
3420 | "Last-Translator: Yaron <sh.yaron@gmail.com>\n" |
3421 | "Language-Team: Hebrew <he@li.org>\n" |
3422 | "MIME-Version: 1.0\n" |
3423 | "Content-Type: text/plain; charset=UTF-8\n" |
3424 | "Content-Transfer-Encoding: 8bit\n" |
3425 | "Plural-Forms: nplurals=2; plural=n != 1;\n" |
3426 | -"X-Launchpad-Export-Date: 2014-08-20 06:19+0000\n" |
3427 | +"X-Launchpad-Export-Date: 2014-08-24 06:45+0000\n" |
3428 | "X-Generator: Launchpad (build 17163)\n" |
3429 | |
3430 | #: ../plugins/language//SpellChecking.qml:27 |
3431 | @@ -50,7 +50,7 @@ |
3432 | |
3433 | #: ../plugins/language//PageComponent.qml:128 |
3434 | msgid "Auto correction" |
3435 | -msgstr "" |
3436 | +msgstr "תיקון אוטומטי" |
3437 | |
3438 | #: ../plugins/language//PageComponent.qml:138 |
3439 | msgid "Word suggestions" |
3440 | @@ -66,12 +66,12 @@ |
3441 | |
3442 | #: ../plugins/language//PageComponent.qml:168 |
3443 | msgid "Auto punctuation" |
3444 | -msgstr "" |
3445 | +msgstr "פיסוק אוטומטי" |
3446 | |
3447 | #: ../plugins/language//PageComponent.qml:178 |
3448 | msgid "" |
3449 | "Adds a period, and any missing quotes or brackets, when you tap Space twice." |
3450 | -msgstr "" |
3451 | +msgstr "הוספת נקודה וכל מרכאות או סוגריים חסרים בעת נגיעה כפולה ברווח." |
3452 | |
3453 | #: ../plugins/language//PageComponent.qml:185 |
3454 | #: ../plugins/sound//PageComponent.qml:186 |
3455 | @@ -80,7 +80,7 @@ |
3456 | |
3457 | #: ../plugins/language//PageComponent.qml:195 |
3458 | msgid "Keyboard vibration" |
3459 | -msgstr "" |
3460 | +msgstr "רטט מקלדת" |
3461 | |
3462 | #: ../plugins/language//KeyboardLayouts.qml:39 |
3463 | msgid "Current layouts:" |
3464 | @@ -310,7 +310,7 @@ |
3465 | |
3466 | #: ../plugins/security-privacy//AppAccess.qml:35 |
3467 | msgid "Apps that you have granted and have requested access to:" |
3468 | -msgstr "" |
3469 | +msgstr "יישומים שאישרת וביקשו לגשת אל:" |
3470 | |
3471 | #: ../plugins/security-privacy//AppAccess.qml:41 |
3472 | #: ../plugins/bluetooth//PageComponent.qml:100 |
3473 | @@ -319,24 +319,24 @@ |
3474 | |
3475 | #: ../plugins/security-privacy//AppAccess.qml:42 |
3476 | msgid "Apps that have requested access to your camera" |
3477 | -msgstr "" |
3478 | +msgstr "יישומים שביקשו לגשת למצלמה שלך" |
3479 | |
3480 | #: ../plugins/security-privacy//AppAccess.qml:46 |
3481 | msgid "Mic" |
3482 | -msgstr "" |
3483 | +msgstr "מיקרופון" |
3484 | |
3485 | #: ../plugins/security-privacy//AppAccess.qml:47 |
3486 | msgid "Apps that have requested access to your mic" |
3487 | -msgstr "" |
3488 | +msgstr "יישומים שביקשו לגשת למצלמה שלך" |
3489 | |
3490 | #: ../plugins/security-privacy//AppAccess.qml:59 |
3491 | #, qt-format |
3492 | msgid "%1/%2" |
3493 | -msgstr "" |
3494 | +msgstr "%1/%2" |
3495 | |
3496 | #: ../plugins/security-privacy//AppAccess.qml:60 |
3497 | msgid "0" |
3498 | -msgstr "" |
3499 | +msgstr "0" |
3500 | |
3501 | #: ../plugins/security-privacy//LockSecurity.qml:92 |
3502 | msgid "Change passcode" |
3503 | |
3504 | === modified file 'po/hu.po' |
3505 | --- po/hu.po 2014-08-22 07:38:19 +0000 |
3506 | +++ po/hu.po 2014-08-26 21:07:36 +0000 |
3507 | @@ -8,14 +8,14 @@ |
3508 | "Project-Id-Version: ubuntu-system-settings\n" |
3509 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
3510 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
3511 | -"PO-Revision-Date: 2014-08-21 19:21+0000\n" |
3512 | +"PO-Revision-Date: 2014-08-25 08:04+0000\n" |
3513 | "Last-Translator: Richard Somlói <ricsipontaz@gmail.com>\n" |
3514 | "Language-Team: Hungarian <hu@li.org>\n" |
3515 | "MIME-Version: 1.0\n" |
3516 | "Content-Type: text/plain; charset=UTF-8\n" |
3517 | "Content-Transfer-Encoding: 8bit\n" |
3518 | "Plural-Forms: nplurals=2; plural=n != 1;\n" |
3519 | -"X-Launchpad-Export-Date: 2014-08-22 07:38+0000\n" |
3520 | +"X-Launchpad-Export-Date: 2014-08-25 08:05+0000\n" |
3521 | "X-Generator: Launchpad (build 17163)\n" |
3522 | |
3523 | #: ../plugins/language//SpellChecking.qml:27 |
3524 | @@ -41,7 +41,7 @@ |
3525 | |
3526 | #: ../plugins/language//PageComponent.qml:79 |
3527 | msgid "Display language…" |
3528 | -msgstr "Megjelenítési nyelv…" |
3529 | +msgstr "Megjelenítés nyelve" |
3530 | |
3531 | #: ../plugins/language//PageComponent.qml:93 |
3532 | #: ../plugins/language//KeyboardLayouts.qml:26 |
3533 | @@ -72,7 +72,7 @@ |
3534 | msgid "" |
3535 | "Adds a period, and any missing quotes or brackets, when you tap Space twice." |
3536 | msgstr "" |
3537 | -"Új mondatot kezd és hozzáad minden hiányzó idézőjelet vagy zárójelet ha " |
3538 | +"Új mondatot kezd és hozzáad minden hiányzó idézőjelet vagy zárójelet, ha " |
3539 | "megérinti kétszer a Szóközt." |
3540 | |
3541 | #: ../plugins/language//PageComponent.qml:185 |
3542 | @@ -1534,7 +1534,7 @@ |
3543 | "Your phone is set up to automatically report errors to Canonical. This can " |
3544 | "be disabled in system settings." |
3545 | msgstr "" |
3546 | -"A telefonja automatikusan hibajelentéseket küld a Canonical-nak. Ezt a " |
3547 | +"A telefonja automatikusan hibajelentéseket küld a Canonical felé. Ezt a " |
3548 | "rendszerbeállításokban kikapcsolhatja." |
3549 | |
3550 | #: ../wizard/qml/Pages//30-location.qml:41 |
3551 | |
3552 | === modified file 'po/ro.po' |
3553 | --- po/ro.po 2014-08-20 06:22:04 +0000 |
3554 | +++ po/ro.po 2014-08-26 21:07:36 +0000 |
3555 | @@ -8,15 +8,15 @@ |
3556 | "Project-Id-Version: ubuntu-system-settings\n" |
3557 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
3558 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
3559 | -"PO-Revision-Date: 2014-08-12 14:39+0000\n" |
3560 | -"Last-Translator: Marian Vasile <marianvasile1972@gmail.com>\n" |
3561 | +"PO-Revision-Date: 2014-08-24 16:50+0000\n" |
3562 | +"Last-Translator: Meriuță Cornel <meriutacornel@neacornel.eu>\n" |
3563 | "Language-Team: Romanian <ro@li.org>\n" |
3564 | "MIME-Version: 1.0\n" |
3565 | "Content-Type: text/plain; charset=UTF-8\n" |
3566 | "Content-Transfer-Encoding: 8bit\n" |
3567 | "Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n % 100 > 19) || ((n % 100 " |
3568 | "== 0) && (n != 0))) ? 2: 1));\n" |
3569 | -"X-Launchpad-Export-Date: 2014-08-20 06:20+0000\n" |
3570 | +"X-Launchpad-Export-Date: 2014-08-25 08:05+0000\n" |
3571 | "X-Generator: Launchpad (build 17163)\n" |
3572 | |
3573 | #: ../plugins/language//SpellChecking.qml:27 |
3574 | @@ -51,7 +51,7 @@ |
3575 | |
3576 | #: ../plugins/language//PageComponent.qml:128 |
3577 | msgid "Auto correction" |
3578 | -msgstr "" |
3579 | +msgstr "Corecție automată" |
3580 | |
3581 | #: ../plugins/language//PageComponent.qml:138 |
3582 | msgid "Word suggestions" |
3583 | @@ -68,12 +68,14 @@ |
3584 | |
3585 | #: ../plugins/language//PageComponent.qml:168 |
3586 | msgid "Auto punctuation" |
3587 | -msgstr "" |
3588 | +msgstr "Punctuație automată" |
3589 | |
3590 | #: ../plugins/language//PageComponent.qml:178 |
3591 | msgid "" |
3592 | "Adds a period, and any missing quotes or brackets, when you tap Space twice." |
3593 | msgstr "" |
3594 | +"Adăugați o perioadă, și orice citate lipsă sau paranteze, atunci când " |
3595 | +"atingeți Spațiu de două ori." |
3596 | |
3597 | #: ../plugins/language//PageComponent.qml:185 |
3598 | #: ../plugins/sound//PageComponent.qml:186 |
3599 | @@ -82,7 +84,7 @@ |
3600 | |
3601 | #: ../plugins/language//PageComponent.qml:195 |
3602 | msgid "Keyboard vibration" |
3603 | -msgstr "" |
3604 | +msgstr "Vibrație tastatură" |
3605 | |
3606 | #: ../plugins/language//KeyboardLayouts.qml:39 |
3607 | msgid "Current layouts:" |
3608 | @@ -326,24 +328,24 @@ |
3609 | |
3610 | #: ../plugins/security-privacy//AppAccess.qml:42 |
3611 | msgid "Apps that have requested access to your camera" |
3612 | -msgstr "" |
3613 | +msgstr "Aplicații care au solicitat accesul la camera dumneavostră" |
3614 | |
3615 | #: ../plugins/security-privacy//AppAccess.qml:46 |
3616 | msgid "Mic" |
3617 | -msgstr "" |
3618 | +msgstr "Microfon" |
3619 | |
3620 | #: ../plugins/security-privacy//AppAccess.qml:47 |
3621 | msgid "Apps that have requested access to your mic" |
3622 | -msgstr "" |
3623 | +msgstr "Aplicații care au solicitat accesul la microfonul dumneavoastră" |
3624 | |
3625 | #: ../plugins/security-privacy//AppAccess.qml:59 |
3626 | #, qt-format |
3627 | msgid "%1/%2" |
3628 | -msgstr "" |
3629 | +msgstr "%1/%2" |
3630 | |
3631 | #: ../plugins/security-privacy//AppAccess.qml:60 |
3632 | msgid "0" |
3633 | -msgstr "" |
3634 | +msgstr "0" |
3635 | |
3636 | #: ../plugins/security-privacy//LockSecurity.qml:92 |
3637 | msgid "Change passcode" |
3638 | @@ -1090,7 +1092,7 @@ |
3639 | #: ../plugins/battery//PageComponent.qml:290 |
3640 | #: ../plugins/brightness//BrightnessSlider.qml:51 |
3641 | msgid "Display brightness" |
3642 | -msgstr "" |
3643 | +msgstr "Luminozitate afișaj" |
3644 | |
3645 | #. TRANSLATORS: %1 is the number of minutes |
3646 | #: ../plugins/battery//PageComponent.qml:306 |
3647 | @@ -1594,11 +1596,11 @@ |
3648 | |
3649 | #: ../wizard/qml/Pages//15-passwd.qml:136 |
3650 | msgid "Those passcodes don't match." |
3651 | -msgstr "" |
3652 | +msgstr "Aceste coduri de acces nu se potrivesc." |
3653 | |
3654 | #: ../wizard/qml/Pages//15-passwd.qml:138 |
3655 | msgid "Those passphrases don't match." |
3656 | -msgstr "" |
3657 | +msgstr "Aceste fraze secrete nu se potrivesc." |
3658 | |
3659 | #: ../wizard/qml/Pages//15-passwd.qml:146 |
3660 | msgid "Passcode must be at least four digits long." |
3661 | @@ -1912,8 +1914,8 @@ |
3662 | |
3663 | #: ../push-helper/software-updates-helper.py:78 |
3664 | msgid "There's an updated system image." |
3665 | -msgstr "" |
3666 | +msgstr "Există o imagine de sistem actualizată." |
3667 | |
3668 | #: ../push-helper/software-updates-helper.py:79 |
3669 | msgid "Tap to open the system updater." |
3670 | -msgstr "" |
3671 | +msgstr "Atingeți pentru a deschide programul de actualizare a sistemului." |
3672 | |
3673 | === modified file 'po/uk.po' |
3674 | --- po/uk.po 2014-08-20 06:22:04 +0000 |
3675 | +++ po/uk.po 2014-08-26 21:07:36 +0000 |
3676 | @@ -9,7 +9,7 @@ |
3677 | "Project-Id-Version: ubuntu-system-settings\n" |
3678 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
3679 | "POT-Creation-Date: 2014-08-15 19:11-0600\n" |
3680 | -"PO-Revision-Date: 2014-08-12 14:36+0000\n" |
3681 | +"PO-Revision-Date: 2014-08-23 05:54+0000\n" |
3682 | "Last-Translator: Yuri Chornoivan <yurchor@gmail.com>\n" |
3683 | "Language-Team: Ukrainian <uk@li.org>\n" |
3684 | "MIME-Version: 1.0\n" |
3685 | @@ -17,7 +17,7 @@ |
3686 | "Content-Transfer-Encoding: 8bit\n" |
3687 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " |
3688 | "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" |
3689 | -"X-Launchpad-Export-Date: 2014-08-20 06:21+0000\n" |
3690 | +"X-Launchpad-Export-Date: 2014-08-24 06:45+0000\n" |
3691 | "X-Generator: Launchpad (build 17163)\n" |
3692 | "Language: uk\n" |
3693 | |
3694 | @@ -53,7 +53,7 @@ |
3695 | |
3696 | #: ../plugins/language//PageComponent.qml:128 |
3697 | msgid "Auto correction" |
3698 | -msgstr "" |
3699 | +msgstr "Автовиправлення" |
3700 | |
3701 | #: ../plugins/language//PageComponent.qml:138 |
3702 | msgid "Word suggestions" |
3703 | @@ -69,12 +69,13 @@ |
3704 | |
3705 | #: ../plugins/language//PageComponent.qml:168 |
3706 | msgid "Auto punctuation" |
3707 | -msgstr "" |
3708 | +msgstr "Автопунктуація" |
3709 | |
3710 | #: ../plugins/language//PageComponent.qml:178 |
3711 | msgid "" |
3712 | "Adds a period, and any missing quotes or brackets, when you tap Space twice." |
3713 | msgstr "" |
3714 | +"Додає крапки, пропущені лапки та дужки після подвійного натискання Пробілу." |
3715 | |
3716 | #: ../plugins/language//PageComponent.qml:185 |
3717 | #: ../plugins/sound//PageComponent.qml:186 |
3718 | @@ -83,7 +84,7 @@ |
3719 | |
3720 | #: ../plugins/language//PageComponent.qml:195 |
3721 | msgid "Keyboard vibration" |
3722 | -msgstr "" |
3723 | +msgstr "Клавіатурна вібрація" |
3724 | |
3725 | #: ../plugins/language//KeyboardLayouts.qml:39 |
3726 | msgid "Current layouts:" |
3727 | @@ -322,7 +323,7 @@ |
3728 | |
3729 | #: ../plugins/security-privacy//AppAccess.qml:35 |
3730 | msgid "Apps that you have granted and have requested access to:" |
3731 | -msgstr "" |
3732 | +msgstr "Програми, яким ви на запит надали доступ до:" |
3733 | |
3734 | #: ../plugins/security-privacy//AppAccess.qml:41 |
3735 | #: ../plugins/bluetooth//PageComponent.qml:100 |
3736 | @@ -331,24 +332,24 @@ |
3737 | |
3738 | #: ../plugins/security-privacy//AppAccess.qml:42 |
3739 | msgid "Apps that have requested access to your camera" |
3740 | -msgstr "" |
3741 | +msgstr "Програми, які надіслали запит щодо користування камерою" |
3742 | |
3743 | #: ../plugins/security-privacy//AppAccess.qml:46 |
3744 | msgid "Mic" |
3745 | -msgstr "" |
3746 | +msgstr "Мікрофон" |
3747 | |
3748 | #: ../plugins/security-privacy//AppAccess.qml:47 |
3749 | msgid "Apps that have requested access to your mic" |
3750 | -msgstr "" |
3751 | +msgstr "Програми, які надіслали доступ щодо користування мікрофоном" |
3752 | |
3753 | #: ../plugins/security-privacy//AppAccess.qml:59 |
3754 | #, qt-format |
3755 | msgid "%1/%2" |
3756 | -msgstr "" |
3757 | +msgstr "%1/%2" |
3758 | |
3759 | #: ../plugins/security-privacy//AppAccess.qml:60 |
3760 | msgid "0" |
3761 | -msgstr "" |
3762 | +msgstr "0" |
3763 | |
3764 | #: ../plugins/security-privacy//LockSecurity.qml:92 |
3765 | msgid "Change passcode" |
3766 | @@ -1096,7 +1097,7 @@ |
3767 | #: ../plugins/battery//PageComponent.qml:290 |
3768 | #: ../plugins/brightness//BrightnessSlider.qml:51 |
3769 | msgid "Display brightness" |
3770 | -msgstr "" |
3771 | +msgstr "Яскравість дисплея" |
3772 | |
3773 | #. TRANSLATORS: %1 is the number of minutes |
3774 | #: ../plugins/battery//PageComponent.qml:306 |
3775 | @@ -1443,7 +1444,7 @@ |
3776 | |
3777 | #: ../plugins/brightness//PageComponent.qml:65 |
3778 | msgid "Brightens and dims the display to suit the surroundings." |
3779 | -msgstr "" |
3780 | +msgstr "Коригує яскравість дисплея відповідно до зовнішнього освітлення." |
3781 | |
3782 | #. TRANSLATORS: This is a keyword or name for the sound plugin which is used while searching |
3783 | #: ../plugins/sound//PageComponent.qml:38 |
3784 | @@ -1589,27 +1590,27 @@ |
3785 | |
3786 | #: ../wizard/qml/Pages//15-passwd.qml:37 |
3787 | msgid "Set lock security" |
3788 | -msgstr "" |
3789 | +msgstr "Захист блокуванням" |
3790 | |
3791 | #: ../wizard/qml/Pages//15-passwd.qml:86 |
3792 | msgid "Swipe" |
3793 | -msgstr "" |
3794 | +msgstr "Рух пальцем" |
3795 | |
3796 | #: ../wizard/qml/Pages//15-passwd.qml:136 |
3797 | msgid "Those passcodes don't match." |
3798 | -msgstr "" |
3799 | +msgstr "Коди-паролі не збігаються." |
3800 | |
3801 | #: ../wizard/qml/Pages//15-passwd.qml:138 |
3802 | msgid "Those passphrases don't match." |
3803 | -msgstr "" |
3804 | +msgstr "Паролі не збігаються." |
3805 | |
3806 | #: ../wizard/qml/Pages//15-passwd.qml:146 |
3807 | msgid "Passcode must be at least four digits long." |
3808 | -msgstr "" |
3809 | +msgstr "Код-пароль має складатися принаймні з чотирьох цифр." |
3810 | |
3811 | #: ../wizard/qml/Pages//15-passwd.qml:148 |
3812 | msgid "Passphrase must be at least four characters long." |
3813 | -msgstr "" |
3814 | +msgstr "Пароль має складатися принаймні з чотирьох символів." |
3815 | |
3816 | #: ../wizard/qml/Pages//10-welcome.qml:25 |
3817 | msgid "Hello" |
3818 | @@ -1915,8 +1916,8 @@ |
3819 | |
3820 | #: ../push-helper/software-updates-helper.py:78 |
3821 | msgid "There's an updated system image." |
3822 | -msgstr "" |
3823 | +msgstr "Випущено оновлений образ системи." |
3824 | |
3825 | #: ../push-helper/software-updates-helper.py:79 |
3826 | msgid "Tap to open the system updater." |
3827 | -msgstr "" |
3828 | +msgstr "Натисніть, щоб відкрити засіб оновлення системи." |
3829 | |
3830 | === modified file 'src/i18n.cpp' |
3831 | --- src/i18n.cpp 2013-05-03 19:32:01 +0000 |
3832 | +++ src/i18n.cpp 2014-08-26 21:07:36 +0000 |
3833 | @@ -36,5 +36,5 @@ |
3834 | return QString::fromUtf8(dgettext(domain, text)); |
3835 | } |
3836 | |
3837 | -}; // namespace |
3838 | +} // namespace |
3839 | |
3840 | |
3841 | === modified file 'src/plugin-manager.cpp' |
3842 | --- src/plugin-manager.cpp 2014-02-27 12:55:28 +0000 |
3843 | +++ src/plugin-manager.cpp 2014-08-26 21:07:36 +0000 |
3844 | @@ -32,7 +32,7 @@ |
3845 | |
3846 | using namespace SystemSettings; |
3847 | |
3848 | -static const QLatin1String baseDir(PLUGIN_MANIFEST_DIR); |
3849 | +static const QLatin1String baseDir{PLUGIN_MANIFEST_DIR}; |
3850 | |
3851 | namespace SystemSettings { |
3852 | |
3853 | |
3854 | === modified file 'src/plugin.cpp' |
3855 | --- src/plugin.cpp 2014-03-03 16:02:44 +0000 |
3856 | +++ src/plugin.cpp 2014-08-26 21:07:36 +0000 |
3857 | @@ -37,8 +37,8 @@ |
3858 | |
3859 | using namespace SystemSettings; |
3860 | |
3861 | -static const QLatin1String pluginModuleDir(PLUGIN_MODULE_DIR); |
3862 | -static const QLatin1String pluginQmlDir(PLUGIN_QML_DIR); |
3863 | +static const QLatin1String pluginModuleDir{PLUGIN_MODULE_DIR}; |
3864 | +static const QLatin1String pluginQmlDir{PLUGIN_QML_DIR}; |
3865 | |
3866 | namespace SystemSettings { |
3867 | |
3868 | @@ -67,9 +67,9 @@ |
3869 | PluginPrivate::PluginPrivate(Plugin *q, const QFileInfo &manifest): |
3870 | q_ptr(q), |
3871 | m_item(0), |
3872 | - m_baseName(manifest.completeBaseName()), |
3873 | m_plugin(0), |
3874 | - m_plugin2(0) |
3875 | + m_plugin2(0), |
3876 | + m_baseName(manifest.completeBaseName()) |
3877 | { |
3878 | QFile file(manifest.filePath()); |
3879 | if (Q_UNLIKELY(!file.open(QIODevice::ReadOnly | QIODevice::Text))) { |
3880 | |
3881 | === modified file 'tests/autopilot/ubuntu_system_settings/__init__.py' |
3882 | --- tests/autopilot/ubuntu_system_settings/__init__.py 2014-08-13 10:02:27 +0000 |
3883 | +++ tests/autopilot/ubuntu_system_settings/__init__.py 2014-08-26 21:07:36 +0000 |
3884 | @@ -23,6 +23,7 @@ |
3885 | |
3886 | from time import sleep |
3887 | |
3888 | +from autopilot.input import Keyboard |
3889 | import autopilot.logging |
3890 | import ubuntuuitoolkit |
3891 | from autopilot import introspection, platform |
3892 | @@ -102,6 +103,10 @@ |
3893 | self.pointing_device.click_object(item) |
3894 | |
3895 | @autopilot.logging.log_action(logger.debug) |
3896 | + def go_to_phone_page(self): |
3897 | + return self._go_to_page('entryComponent-phone', 'phonePage') |
3898 | + |
3899 | + @autopilot.logging.log_action(logger.debug) |
3900 | def go_to_reset_phone(self): |
3901 | return self._go_to_page('entryComponent-reset', 'resetPage') |
3902 | |
3903 | @@ -166,6 +171,11 @@ |
3904 | return self.select_single(objectName='soundPage') |
3905 | |
3906 | @property |
3907 | + def security_page(self): |
3908 | + """ Return 'Security' page """ |
3909 | + return self.select_single(objectName='securityPrivacyPage') |
3910 | + |
3911 | + @property |
3912 | def _orientation_lock_switch(self): |
3913 | return self.wait_select_single( |
3914 | ubuntuuitoolkit.CheckBox, |
3915 | @@ -311,6 +321,146 @@ |
3916 | return False |
3917 | |
3918 | |
3919 | +class PhonePage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
3920 | + |
3921 | + """Autopilot helper for the Phone page.""" |
3922 | + |
3923 | + @classmethod |
3924 | + def validate_dbus_object(cls, path, state): |
3925 | + name = introspection.get_classname_from_path(path) |
3926 | + if name == b'PageComponent': |
3927 | + if state['objectName'][1] == 'phonePage': |
3928 | + return True |
3929 | + return False |
3930 | + |
3931 | + @autopilot.logging.log_action(logger.info) |
3932 | + def go_to_call_forwarding(self, sim=None): |
3933 | + """Open the Call Forwarding settings page. |
3934 | + |
3935 | + :param sim: Number of what SIM to use, either 1 or 2. |
3936 | + Required parameter in dual SIM setups |
3937 | + :returns: The Call Forwarding settings page. |
3938 | + |
3939 | + """ |
3940 | + find = "callFwd" |
3941 | + if sim: |
3942 | + find = "callFwdSim%d" % sim |
3943 | + |
3944 | + return self._go_to_page(find, 'callForwardingPage') |
3945 | + |
3946 | + def _go_to_page(self, item_object_name, page_object_name): |
3947 | + self._click_item(item_object_name) |
3948 | + page = self.get_root_instance().wait_select_single( |
3949 | + objectName=page_object_name) |
3950 | + page.active.wait_for(True) |
3951 | + return page |
3952 | + |
3953 | + def _click_item(self, object_name): |
3954 | + item = self.select_single(objectName=object_name) |
3955 | + item.swipe_into_view() |
3956 | + self.pointing_device.click_object(item) |
3957 | + |
3958 | + @autopilot.logging.log_action(logger.info) |
3959 | + def go_to_call_waiting(self, sim=None): |
3960 | + """Open the Call Waiting settings page. |
3961 | + |
3962 | + :param sim: Number of what SIM to use, either 1 or 2. |
3963 | + Required parameter in dual SIM setups |
3964 | + :returns: The Call Waiting settings page. |
3965 | + |
3966 | + """ |
3967 | + find = "callWait" |
3968 | + if sim: |
3969 | + find = "callWaitSim%d" % sim |
3970 | + return self._go_to_page(find, 'callWaitingPage') |
3971 | + |
3972 | + @autopilot.logging.log_action(logger.info) |
3973 | + def go_to_sim_services(self, sim=None): |
3974 | + """Open the SIM Services settings page. |
3975 | + |
3976 | + :param sim: Number of what SIM to use, either 1 or 2. |
3977 | + Required parameter in dual SIM setups |
3978 | + :returns: The SIM Services settings page. |
3979 | + |
3980 | + """ |
3981 | + find = "simServices" |
3982 | + if sim: |
3983 | + find = "simServicesSim%d" % sim |
3984 | + |
3985 | + return self._go_to_page(find, 'servicesPage') |
3986 | + |
3987 | + |
3988 | +class CallWaiting(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
3989 | + |
3990 | + """Autopilot helper for the Call waiting page.""" |
3991 | + |
3992 | + @property |
3993 | + def _switch(self): |
3994 | + return self.wait_select_single( |
3995 | + ubuntuuitoolkit.CheckBox, |
3996 | + objectName='callWaitingSwitch') |
3997 | + |
3998 | + def enable_call_waiting(self): |
3999 | + self._switch.check() |
4000 | + |
4001 | + def disable_call_waiting(self): |
4002 | + self._switch.uncheck() |
4003 | + |
4004 | + |
4005 | +class CallForwarding(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
4006 | + |
4007 | + """Autopilot helper for the Call forwarding page.""" |
4008 | + |
4009 | + @property |
4010 | + def _switch(self): |
4011 | + return self.wait_select_single( |
4012 | + ubuntuuitoolkit.CheckBox, |
4013 | + objectName='callForwardingSwitch') |
4014 | + |
4015 | + @property |
4016 | + def _number_field(self): |
4017 | + return self.wait_select_single( |
4018 | + objectName='destNumberField') |
4019 | + |
4020 | + def _click_set(self): |
4021 | + button = self.wait_select_single( |
4022 | + objectName='set') |
4023 | + self.pointing_device.click_object(button) |
4024 | + |
4025 | + def _click_cancel(self): |
4026 | + button = self.wait_select_single( |
4027 | + objectName='cancel') |
4028 | + self.pointing_device.click_object(button) |
4029 | + |
4030 | + @property |
4031 | + def current_forwarding(self): |
4032 | + return self.wait_select_single( |
4033 | + objectName='destNumberField').text |
4034 | + |
4035 | + def enable_call_forwarding(self): |
4036 | + self._switch.check() |
4037 | + |
4038 | + def disable_call_forwarding(self): |
4039 | + self._switch.uncheck() |
4040 | + |
4041 | + def set_forward(self, number): |
4042 | + input_method = Keyboard.create() |
4043 | + self.enable_call_forwarding() |
4044 | + self.pointing_device.click_object(self._number_field) |
4045 | + input_method.type(number) |
4046 | + self._click_set() |
4047 | + |
4048 | + |
4049 | +class Services(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
4050 | + |
4051 | + """Autopilot helper for the Call waiting page.""" |
4052 | + |
4053 | + # TODO: add pages for each relevant sim services page |
4054 | + def open_sim_service(self, service): |
4055 | + """Return a sim service page""" |
4056 | + pass |
4057 | + |
4058 | + |
4059 | class ResetPage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
4060 | |
4061 | """Autopilot helper for the Reset page.""" |
4062 | |
4063 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/__init__.py' |
4064 | --- tests/autopilot/ubuntu_system_settings/tests/__init__.py 2014-08-19 15:26:07 +0000 |
4065 | +++ tests/autopilot/ubuntu_system_settings/tests/__init__.py 2014-08-26 21:07:36 +0000 |
4066 | @@ -34,6 +34,8 @@ |
4067 | RDO_IFACE = 'org.ofono.RadioSettings' |
4068 | SIM_IFACE = 'org.ofono.SimManager' |
4069 | NETREG_IFACE = 'org.ofono.NetworkRegistration' |
4070 | +CALL_FWD_IFACE = 'org.ofono.CallForwarding' |
4071 | +CALL_SETTINGS_IFACE = 'org.ofono.CallSettings' |
4072 | SYSTEM_IFACE = 'com.canonical.SystemImage' |
4073 | SYSTEM_SERVICE_OBJ = '/Service' |
4074 | |
4075 | @@ -125,7 +127,7 @@ |
4076 | 'for m in objects if "%s/operator/" in m]' % name |
4077 | |
4078 | def mock_connection_manager(self, modem): |
4079 | - modem.AddProperty(CONNMAN_IFACE, 'Powered', True) |
4080 | + modem.AddProperty(CONNMAN_IFACE, 'Powered', dbus.Boolean(1)) |
4081 | modem.AddProperty(CONNMAN_IFACE, 'RoamingAllowed', False) |
4082 | modem.AddMethods( |
4083 | CONNMAN_IFACE, |
4084 | @@ -194,6 +196,7 @@ |
4085 | 'SubscriberNumbers': ['123456', '234567'] |
4086 | } |
4087 | modem.AddProperties(SIM_IFACE, properties) |
4088 | + modem.AddProperty(SIM_IFACE, 'Present', True) |
4089 | modem.AddMethods( |
4090 | SIM_IFACE, |
4091 | [('GetProperties', '', 'a{sv}', |
4092 | @@ -204,18 +207,42 @@ |
4093 | "PropertyChanged", "sv", [args[0], args[1]])' |
4094 | .replace('IFACE', SIM_IFACE)), ]) |
4095 | |
4096 | + def mock_call_forwarding(self, modem): |
4097 | + modem.AddProperty( |
4098 | + CALL_FWD_IFACE, 'VoiceUnconditional', '') |
4099 | + modem.AddMethods( |
4100 | + CALL_FWD_IFACE, |
4101 | + [('GetProperties', '', 'a{sv}', |
4102 | + 'ret = self.GetAll("%s")' % CALL_FWD_IFACE), |
4103 | + ('SetProperty', 'sv', '', |
4104 | + 'self.Set("IFACE", args[0], args[1]); ' |
4105 | + 'self.EmitSignal("IFACE",\ |
4106 | + "PropertyChanged", "sv", [args[0], args[1]])' |
4107 | + .replace('IFACE', CALL_FWD_IFACE)), ]) |
4108 | + |
4109 | + def mock_call_settings(self, modem): |
4110 | + modem.AddProperty( |
4111 | + CALL_SETTINGS_IFACE, 'VoiceCallWaiting', 'disabled') |
4112 | + modem.AddMethods( |
4113 | + CALL_SETTINGS_IFACE, |
4114 | + [('GetProperties', '', 'a{sv}', |
4115 | + 'ret = self.GetAll("%s")' % CALL_SETTINGS_IFACE), |
4116 | + ('SetProperty', 'sv', '', |
4117 | + 'self.Set("IFACE", args[0], args[1]); ' |
4118 | + 'self.EmitSignal("IFACE",\ |
4119 | + "PropertyChanged", "sv", [args[0], args[1]])' |
4120 | + .replace('IFACE', CALL_SETTINGS_IFACE)), ]) |
4121 | + |
4122 | def add_sim1(self): |
4123 | # create modem_0 proxy |
4124 | self.modem_0 = self.dbus_con.get_object('org.ofono', '/ril_0') |
4125 | |
4126 | - # Add an available carrier |
4127 | self.mock_carriers('ril_0') |
4128 | - |
4129 | self.mock_radio_settings(self.modem_0) |
4130 | - |
4131 | self.mock_connection_manager(self.modem_0) |
4132 | - |
4133 | self.mock_sim_manager(self.modem_0) |
4134 | + self.mock_call_forwarding(self.modem_0) |
4135 | + self.mock_call_settings(self.modem_0) |
4136 | |
4137 | self.modem_0.AddMethods('org.ofono.NetworkRegistration', [ |
4138 | ('GetProperties', '', 'a{sv}', |
4139 | @@ -232,6 +259,7 @@ |
4140 | self.dbusmock.AddModem(second_modem, {'Powered': True}) |
4141 | self.modem_1 = self.dbus_con.get_object( |
4142 | 'org.ofono', '/%s' % second_modem) |
4143 | + |
4144 | self.modem_1.AddMethods(NETREG_IFACE, [ |
4145 | ('GetProperties', '', 'a{sv}', |
4146 | 'ret = self.GetAll("org.ofono.NetworkRegistration")'), |
4147 | @@ -244,6 +272,8 @@ |
4148 | self.mock_carriers(second_modem) |
4149 | self.mock_radio_settings(self.modem_1) |
4150 | self.mock_connection_manager(self.modem_1) |
4151 | + self.mock_call_forwarding(self.modem_1) |
4152 | + self.mock_call_settings(self.modem_1) |
4153 | |
4154 | self.mock_sim_manager(self.modem_1, { |
4155 | 'SubscriberNumbers': ['08123', '938762783'] |
4156 | @@ -253,9 +283,10 @@ |
4157 | def setUpClass(cls): |
4158 | cls.start_system_bus() |
4159 | cls.dbus_con = cls.get_dbus(True) |
4160 | + template = os.path.join(os.path.dirname(__file__), 'ofono.py') |
4161 | # Add a mock Ofono environment so we get consistent results |
4162 | (cls.p_mock, cls.obj_ofono) = cls.spawn_server_template( |
4163 | - 'ofono', stdout=subprocess.PIPE) |
4164 | + template, stdout=subprocess.PIPE) |
4165 | cls.dbusmock = dbus.Interface(cls.obj_ofono, dbusmock.MOCK_IFACE) |
4166 | |
4167 | def setUp(self, panel=None): |
4168 | @@ -294,6 +325,13 @@ |
4169 | super(CellularBaseTestCase, self).setUp('cellular') |
4170 | |
4171 | |
4172 | +class PhoneOfonoBaseTestCase(UbuntuSystemSettingsOfonoTestCase): |
4173 | + def setUp(self): |
4174 | + """ Go to Phone page """ |
4175 | + super(PhoneOfonoBaseTestCase, self).setUp() |
4176 | + self.phone_page = self.system_settings.main_view.go_to_phone_page() |
4177 | + |
4178 | + |
4179 | class AboutBaseTestCase(UbuntuSystemSettingsTestCase): |
4180 | def setUp(self): |
4181 | """Go to About page.""" |
4182 | @@ -638,3 +676,19 @@ |
4183 | self.mock_server.terminate() |
4184 | self.mock_server.wait() |
4185 | super(ResetBaseTestCase, self).tearDown() |
4186 | + |
4187 | + |
4188 | +class SecurityBaseTestCase(UbuntuSystemSettingsTestCase): |
4189 | + """ Base class for security and privacy settings tests""" |
4190 | + |
4191 | + def setUp(self): |
4192 | + super(SecurityBaseTestCase, self).setUp('security-privacy') |
4193 | + """ Go to Security & Privacy page """ |
4194 | + self.security_page = self.system_settings.main_view.select_single( |
4195 | + objectName='securityPrivacyPage' |
4196 | + ) |
4197 | + self.assertThat(self.security_page.active, |
4198 | + Eventually(Equals(True))) |
4199 | + |
4200 | + def tearDown(self): |
4201 | + super(SecurityBaseTestCase, self).tearDown() |
4202 | |
4203 | === added file 'tests/autopilot/ubuntu_system_settings/tests/ofono.py' |
4204 | --- tests/autopilot/ubuntu_system_settings/tests/ofono.py 1970-01-01 00:00:00 +0000 |
4205 | +++ tests/autopilot/ubuntu_system_settings/tests/ofono.py 2014-08-26 21:07:36 +0000 |
4206 | @@ -0,0 +1,215 @@ |
4207 | +'''ofonod D-BUS mock template''' |
4208 | + |
4209 | +# This program is free software; you can redistribute it and/or modify it under |
4210 | +# the terms of the GNU Lesser General Public License as published by the Free |
4211 | +# Software Foundation; either version 3 of the License, or (at your option) any |
4212 | +# later version. See http://www.gnu.org/copyleft/lgpl.html for the full text |
4213 | +# of the license. |
4214 | + |
4215 | +__author__ = 'Martin Pitt' |
4216 | +__email__ = 'martin.pitt@ubuntu.com' |
4217 | +__copyright__ = '(c) 2013 Canonical Ltd.' |
4218 | +__license__ = 'LGPL 3+' |
4219 | + |
4220 | + |
4221 | +import dbus |
4222 | + |
4223 | +import dbusmock |
4224 | + |
4225 | +BUS_NAME = 'org.ofono' |
4226 | +MAIN_OBJ = '/' |
4227 | +MAIN_IFACE = 'org.ofono.Manager' |
4228 | +SYSTEM_BUS = True |
4229 | + |
4230 | +NOT_IMPLEMENTED = '''raise dbus.exceptions.DBusException( |
4231 | + "org.ofono.Error.NotImplemented")''' |
4232 | + |
4233 | +_parameters = {} |
4234 | + |
4235 | + |
4236 | +def load(mock, parameters): |
4237 | + global _parameters |
4238 | + mock.modems = [] # object paths |
4239 | + _parameters = parameters |
4240 | + mock.AddMethod(MAIN_IFACE, 'GetModems', '', 'a(oa{sv})', |
4241 | + 'ret = [(m, objects[m].GetAll(\ |
4242 | + "org.ofono.Modem")) for m in self.modems]') |
4243 | + |
4244 | + if not parameters.get('no_modem', False): |
4245 | + mock.AddModem(parameters.get('ModemName', 'ril_0'), {}) |
4246 | + |
4247 | + |
4248 | +@dbus.service.method(dbusmock.MOCK_IFACE, |
4249 | + in_signature='sa{sv}', out_signature='s') |
4250 | +def AddModem(self, name, properties): |
4251 | + '''Convenience method to add a modem |
4252 | + |
4253 | + You have to specify a device name which must be a valid part of an object |
4254 | + path, e. g. "mock_ac". For future extensions you can specify a "properties" |
4255 | + array, but no extra properties are supported for now. |
4256 | + |
4257 | + Returns the new object path. |
4258 | + ''' |
4259 | + path = '/' + name |
4260 | + self.AddObject( |
4261 | + path, |
4262 | + 'org.ofono.Modem', |
4263 | + { |
4264 | + 'Online': dbus.Boolean(True, variant_level=1), |
4265 | + 'Powered': dbus.Boolean(True, variant_level=1), |
4266 | + 'Lockdown': dbus.Boolean(False, variant_level=1), |
4267 | + 'Emergency': dbus.Boolean(False, variant_level=1), |
4268 | + 'Manufacturer': dbus.String('Fakesys', variant_level=1), |
4269 | + 'Model': dbus.String('Mock Modem', variant_level=1), |
4270 | + 'Revision': dbus.String('0815.42', variant_level=1), |
4271 | + 'Type': dbus.String('hardware', variant_level=1), |
4272 | + 'Interfaces': [ |
4273 | + 'org.ofono.CallVolume', |
4274 | + 'org.ofono.VoiceCallManager', |
4275 | + 'org.ofono.NetworkRegistration', |
4276 | + 'org.ofono.SimManager'], |
4277 | + 'Features': ['gprs', 'net'], |
4278 | + }, |
4279 | + [ |
4280 | + ('GetProperties', '', 'a{sv}', |
4281 | + 'ret = self.GetAll("org.ofono.Modem")'), |
4282 | + ( |
4283 | + 'SetProperty', 'sv', '', |
4284 | + 'self.Set("org.ofono.Modem", args[0], args[1]); ' |
4285 | + 'self.EmitSignal("org.ofono.Modem", "PropertyChanged",' |
4286 | + '"sv", [args[0], args[1]])'), |
4287 | + ]) |
4288 | + obj = dbusmock.mockobject.objects[path] |
4289 | + obj.name = name |
4290 | + add_voice_call_api(obj) |
4291 | + add_netreg_api(obj) |
4292 | + self.modems.append(path) |
4293 | + props = obj.GetAll('org.ofono.Modem', dbus_interface=dbus.PROPERTIES_IFACE) |
4294 | + self.EmitSignal(MAIN_IFACE, 'ModemAdded', 'oa{sv}', [path, props]) |
4295 | + return path |
4296 | + |
4297 | + |
4298 | +def add_voice_call_api(mock): |
4299 | + '''Add org.ofono.VoiceCallManager API to a mock''' |
4300 | + |
4301 | + # also add an emergency number which is not a real one, in case one runs a |
4302 | + # test case against a production ofono :-) |
4303 | + mock.AddProperty( |
4304 | + 'org.ofono.VoiceCallManager', 'EmergencyNumbers', ['911', '13373']) |
4305 | + |
4306 | + mock.calls = [] # object paths |
4307 | + |
4308 | + mock.AddMethods('org.ofono.VoiceCallManager', [ |
4309 | + ( |
4310 | + 'GetProperties', '', 'a{sv}', |
4311 | + 'ret = self.GetAll("org.ofono.VoiceCallManager")'), |
4312 | + ('Transfer', '', '', ''), |
4313 | + ('SwapCalls', '', '', ''), |
4314 | + ('ReleaseAndAnswer', '', '', ''), |
4315 | + ('ReleaseAndSwap', '', '', ''), |
4316 | + ('HoldAndAnswer', '', '', ''), |
4317 | + ('SendTones', 's', '', ''), |
4318 | + ('PrivateChat', 'o', 'ao', NOT_IMPLEMENTED), |
4319 | + ('CreateMultiparty', '', 'o', NOT_IMPLEMENTED), |
4320 | + ('HangupMultiparty', '', '', NOT_IMPLEMENTED), |
4321 | + ( |
4322 | + 'GetCalls', '', 'a(oa{sv})', |
4323 | + 'ret = [(c, objects[c].GetAll("org.ofono.VoiceCall"))\ |
4324 | + for c in self.calls]') |
4325 | + ]) |
4326 | + |
4327 | + |
4328 | +@dbus.service.method('org.ofono.VoiceCallManager', |
4329 | + in_signature='ss', out_signature='s') |
4330 | +def Dial(self, number, hide_callerid): |
4331 | + path = self._object_path + '/voicecall%02i' % (len(self.calls) + 1) |
4332 | + self.AddObject( |
4333 | + path, 'org.ofono.VoiceCall', |
4334 | + { |
4335 | + 'State': dbus.String('dialing', variant_level=1), |
4336 | + 'LineIdentification': dbus.String(number, variant_level=1), |
4337 | + 'Name': dbus.String('', variant_level=1), |
4338 | + 'Multiparty': dbus.Boolean(False, variant_level=1), |
4339 | + 'Multiparty': dbus.Boolean(False, variant_level=1), |
4340 | + 'RemoteHeld': dbus.Boolean(False, variant_level=1), |
4341 | + 'RemoteMultiparty': dbus.Boolean(False, variant_level=1), |
4342 | + 'Emergency': dbus.Boolean(False, variant_level=1), |
4343 | + }, |
4344 | + [ |
4345 | + ( |
4346 | + 'GetProperties', '', 'a{sv}', |
4347 | + 'ret = self.GetAll("org.ofono.VoiceCall")'), |
4348 | + ('Deflect', 's', '', NOT_IMPLEMENTED), |
4349 | + ( |
4350 | + 'Hangup', '', '', |
4351 | + 'self.parent.calls.remove(self._object_path);' |
4352 | + 'self.parent.RemoveObject(self._object_path);' |
4353 | + 'self.EmitSignal("org.ofono.VoiceCallManager",\ |
4354 | + "CallRemoved", "o", [self._object_path])'), |
4355 | + ('Answer', '', '', NOT_IMPLEMENTED), |
4356 | + ]) |
4357 | + obj = dbusmock.mockobject.objects[path] |
4358 | + obj.parent = self |
4359 | + self.calls.append(path) |
4360 | + self.EmitSignal('org.ofono.VoiceCallManager', 'CallAdded', 'oa{sv}', |
4361 | + [path, obj.GetProperties()]) |
4362 | + return path |
4363 | + |
4364 | + |
4365 | +@dbus.service.method('org.ofono.VoiceCallManager', |
4366 | + in_signature='', out_signature='') |
4367 | +def HangupAll(self): |
4368 | + print('XXX HangupAll', self.calls) |
4369 | + for c in list(self.calls): # needs a copy |
4370 | + dbusmock.mockobject.objects[c].Hangup() |
4371 | + assert self.calls == [] |
4372 | + |
4373 | + |
4374 | +def get_all_operators(mock): |
4375 | + return 'ret = [(m, objects[m].GetAll("org.ofono.NetworkOperator")) ' \ |
4376 | + 'for m in objects if "%s/operator/" in m]' % mock.name |
4377 | + |
4378 | + |
4379 | +def add_netreg_api(mock): |
4380 | + '''Add org.ofono.NetworkRegistration API to a mock''' |
4381 | + |
4382 | + # also add an emergency number which is not a real one, in case one runs a |
4383 | + # test case against a production ofono :-) |
4384 | + mock.AddProperties('org.ofono.NetworkRegistration', { |
4385 | + 'Mode': 'auto', |
4386 | + 'Status': 'registered', |
4387 | + 'LocationAreaCode': _parameters.get('LocationAreaCode', 987), |
4388 | + 'CellId': _parameters.get('CellId', 10203), |
4389 | + 'MobileCountryCode': _parameters.get('MobileCountryCode', '777'), |
4390 | + 'MobileNetworkCode': _parameters.get('MobileNetworkCode', '11'), |
4391 | + 'Technology': _parameters.get('Technology', 'gsm'), |
4392 | + 'Name': _parameters.get('Name', 'fake.tel'), |
4393 | + 'Strength': _parameters.get('Strength', dbus.Byte(80)), |
4394 | + 'BaseStation': _parameters.get('BaseStation', ''), |
4395 | + }) |
4396 | + |
4397 | + mock.AddObject( |
4398 | + '/%s/operator/op1' % mock.name, |
4399 | + 'org.ofono.NetworkOperator', |
4400 | + { |
4401 | + 'Name': _parameters.get('Name', 'fake.tel'), |
4402 | + 'Status': 'current', |
4403 | + 'MobileCountryCode': _parameters.get('MobileCountryCode', '777'), |
4404 | + 'MobileNetworkCode': _parameters.get('MobileNetworkCode', '11'), |
4405 | + 'Technologies': [_parameters.get('Technology', 'gsm')], |
4406 | + }, |
4407 | + [ |
4408 | + ( |
4409 | + 'GetProperties', '', 'a{sv}', |
4410 | + 'ret = self.GetAll("org.ofono.NetworkOperator")'), |
4411 | + ('Register', '', '', ''), |
4412 | + ]) |
4413 | + |
4414 | + mock.AddMethods('org.ofono.NetworkRegistration', [ |
4415 | + ( |
4416 | + 'GetProperties', '', 'a{sv}', |
4417 | + 'ret = self.GetAll("org.ofono.NetworkRegistration")'), |
4418 | + ('Register', '', '', ''), |
4419 | + ('GetOperators', '', 'a(oa{sv})', get_all_operators(mock)), |
4420 | + ('Scan', '', 'a(oa{sv})', get_all_operators(mock)), |
4421 | + ]) |
4422 | |
4423 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_cellular.py' |
4424 | --- tests/autopilot/ubuntu_system_settings/tests/test_cellular.py 2014-08-14 14:18:17 +0000 |
4425 | +++ tests/autopilot/ubuntu_system_settings/tests/test_cellular.py 2014-08-26 21:07:36 +0000 |
4426 | @@ -15,7 +15,7 @@ |
4427 | from unittest import skip |
4428 | |
4429 | from ubuntu_system_settings.tests import ( |
4430 | - CellularBaseTestCase, CONNMAN_IFACE, RDO_IFACE) |
4431 | + CellularBaseTestCase, CONNMAN_IFACE, RDO_IFACE, SIM_IFACE) |
4432 | from ubuntu_system_settings.utils.i18n import ugettext as _ |
4433 | |
4434 | from ubuntuuitoolkit import emulators as toolkit_emulators |
4435 | @@ -92,6 +92,14 @@ |
4436 | Equals(_('Cellular')) |
4437 | ) |
4438 | |
4439 | + def test_single_sim_layout(self): |
4440 | + self.system_settings.main_view.cellular_page.\ |
4441 | + select_single(objectName="singleSim") |
4442 | + self.assertThat(lambda: self.system_settings.main_view.select_single( |
4443 | + objectName='multiSim'), raises(StateNotFoundError)) |
4444 | + self.assertThat(lambda: self.system_settings.main_view.select_single( |
4445 | + objectName='noSim'), raises(StateNotFoundError)) |
4446 | + |
4447 | def test_current_network(self): |
4448 | """ Tests whether the current network is visible and selected """ |
4449 | self.navigate_to_carrier_page() |
4450 | @@ -592,3 +600,90 @@ |
4451 | self.assertEqual( |
4452 | gsettings.get_value('default-sim-for-messages').get_string(), |
4453 | '/ril_1') |
4454 | + |
4455 | + def test_multi_sim_layout(self): |
4456 | + self.system_settings.main_view.cellular_page.\ |
4457 | + select_single(objectName="multiSim") |
4458 | + self.assertThat(lambda: self.system_settings.main_view.select_single( |
4459 | + objectName='singleSim'), raises(StateNotFoundError)) |
4460 | + self.assertThat(lambda: self.system_settings.main_view.select_single( |
4461 | + objectName='noSim'), raises(StateNotFoundError)) |
4462 | + |
4463 | + def test_remove_one_sim(self): |
4464 | + self.modem_0.EmitSignal( |
4465 | + SIM_IFACE, |
4466 | + 'PropertyChanged', |
4467 | + 'sv', |
4468 | + ['Present', 'False']) |
4469 | + |
4470 | + self.system_settings.main_view.cellular_page.\ |
4471 | + select_single(objectName="singleSim") |
4472 | + self.assertThat(lambda: self.system_settings.main_view.select_single( |
4473 | + objectName='multiSim'), raises(StateNotFoundError)) |
4474 | + self.assertThat(lambda: self.system_settings.main_view.select_single( |
4475 | + objectName='noSim'), raises(StateNotFoundError)) |
4476 | + |
4477 | + def test_remove_two_sims(self): |
4478 | + self.modem_0.EmitSignal( |
4479 | + SIM_IFACE, |
4480 | + 'PropertyChanged', |
4481 | + 'sv', |
4482 | + ['Present', 'False']) |
4483 | + |
4484 | + self.modem_1.EmitSignal( |
4485 | + SIM_IFACE, |
4486 | + 'PropertyChanged', |
4487 | + 'sv', |
4488 | + ['Present', 'False']) |
4489 | + |
4490 | + self.system_settings.main_view.cellular_page.\ |
4491 | + wait_select_single(objectName="noSim") |
4492 | + self.assertThat( |
4493 | + lambda: self.system_settings.main_view.select_single( |
4494 | + objectName='multiSim'), raises(StateNotFoundError)) |
4495 | + self.assertThat( |
4496 | + lambda: self.system_settings.main_view.select_single( |
4497 | + objectName='singleSim'), raises(StateNotFoundError)) |
4498 | + |
4499 | + def test_remove_and_insert_sims(self): |
4500 | + self.modem_0.EmitSignal( |
4501 | + SIM_IFACE, |
4502 | + 'PropertyChanged', |
4503 | + 'sv', |
4504 | + ['Present', 'False']) |
4505 | + |
4506 | + self.modem_1.EmitSignal( |
4507 | + SIM_IFACE, |
4508 | + 'PropertyChanged', |
4509 | + 'sv', |
4510 | + ['Present', 'False']) |
4511 | + |
4512 | + self.system_settings.main_view.cellular_page.\ |
4513 | + wait_select_single(objectName="noSim") |
4514 | + self.assertThat( |
4515 | + lambda: self.system_settings.main_view.select_single( |
4516 | + objectName='multiSim'), raises(StateNotFoundError)) |
4517 | + self.assertThat( |
4518 | + lambda: self.system_settings.main_view.select_single( |
4519 | + objectName='singleSim'), raises(StateNotFoundError)) |
4520 | + |
4521 | + self.modem_0.EmitSignal( |
4522 | + SIM_IFACE, |
4523 | + 'PropertyChanged', |
4524 | + 'sv', |
4525 | + ['Present', 'True']) |
4526 | + |
4527 | + self.modem_1.EmitSignal( |
4528 | + SIM_IFACE, |
4529 | + 'PropertyChanged', |
4530 | + 'sv', |
4531 | + ['Present', 'True']) |
4532 | + |
4533 | + self.system_settings.main_view.cellular_page.\ |
4534 | + wait_select_single(objectName="multiSim") |
4535 | + self.assertThat( |
4536 | + lambda: self.system_settings.main_view.select_single( |
4537 | + objectName='noSim'), raises(StateNotFoundError)) |
4538 | + self.assertThat( |
4539 | + lambda: self.system_settings.main_view.select_single( |
4540 | + objectName='singleSim'), raises(StateNotFoundError)) |
4541 | |
4542 | === added file 'tests/autopilot/ubuntu_system_settings/tests/test_phone.py' |
4543 | --- tests/autopilot/ubuntu_system_settings/tests/test_phone.py 1970-01-01 00:00:00 +0000 |
4544 | +++ tests/autopilot/ubuntu_system_settings/tests/test_phone.py 2014-08-26 21:07:36 +0000 |
4545 | @@ -0,0 +1,111 @@ |
4546 | +# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
4547 | +# Copyright 2014 Canonical |
4548 | +# |
4549 | +# This program is free software: you can redistribute it and/or modify it |
4550 | +# under the terms of the GNU General Public License version 3, as published |
4551 | +# by the Free Software Foundation. |
4552 | + |
4553 | +from __future__ import absolute_import |
4554 | + |
4555 | +from autopilot.matchers import Eventually |
4556 | +from testtools.matchers import Contains, Equals |
4557 | + |
4558 | +from ubuntu_system_settings.tests import ( |
4559 | + PhoneOfonoBaseTestCase, CALL_FWD_IFACE, CALL_SETTINGS_IFACE) |
4560 | + |
4561 | + |
4562 | +class PhoneTestCase(PhoneOfonoBaseTestCase): |
4563 | + """Tests for Phone Page""" |
4564 | + |
4565 | + def test_call_fwd(self): |
4566 | + call_fwd_page = self.phone_page.go_to_call_forwarding() |
4567 | + call_fwd_page.set_forward("41444424") |
4568 | + |
4569 | + # Check that the forward has been set |
4570 | + self.assertThat( |
4571 | + call_fwd_page.current_forwarding, |
4572 | + Eventually(Equals('41444424'))) |
4573 | + |
4574 | + # Check that dbus properties have been updated |
4575 | + self.assertThat( |
4576 | + lambda: str(self.modem_0.Get(CALL_FWD_IFACE, |
4577 | + 'VoiceUnconditional')), |
4578 | + Eventually(Contains('41444424'))) |
4579 | + |
4580 | + def test_call_waiting(self): |
4581 | + call_wait = self.phone_page.go_to_call_waiting() |
4582 | + # we have to help our test here, this normally takes quite a while |
4583 | + self.modem_0.EmitSignal( |
4584 | + CALL_SETTINGS_IFACE, 'PropertyChanged', 'sv', |
4585 | + ['VoiceCallWaiting', 'disabled']) |
4586 | + call_wait.enable_call_waiting() |
4587 | + |
4588 | + # Check that dbus properties have been updated |
4589 | + self.assertThat( |
4590 | + lambda: str(self.modem_0.Get(CALL_SETTINGS_IFACE, |
4591 | + 'VoiceCallWaiting')), |
4592 | + Eventually(Contains('enabled'))) |
4593 | + |
4594 | + |
4595 | +class PhoneDualSimTestCase(PhoneOfonoBaseTestCase): |
4596 | + """Tests for Phone Page""" |
4597 | + |
4598 | + use_sims = 2 |
4599 | + |
4600 | + def test_call_fwd_sim_1(self): |
4601 | + call_fwd_page = self.phone_page.go_to_call_forwarding(sim=1) |
4602 | + call_fwd_page.set_forward("41444424") |
4603 | + |
4604 | + # Check that the forward has been set |
4605 | + self.assertThat( |
4606 | + call_fwd_page.current_forwarding, |
4607 | + Eventually(Equals('41444424'))) |
4608 | + |
4609 | + # Check that dbus properties have been updated |
4610 | + self.assertThat( |
4611 | + lambda: str(self.modem_0.Get(CALL_FWD_IFACE, |
4612 | + 'VoiceUnconditional')), |
4613 | + Eventually(Contains('41444424'))) |
4614 | + |
4615 | + def test_call_fwd_sim_2(self): |
4616 | + call_fwd_page = self.phone_page.go_to_call_forwarding(sim=2) |
4617 | + call_fwd_page.set_forward("41444424") |
4618 | + |
4619 | + # Check that the forward has been set |
4620 | + self.assertThat( |
4621 | + call_fwd_page.current_forwarding, |
4622 | + Eventually(Equals('41444424'))) |
4623 | + |
4624 | + # Check that dbus properties have been updated |
4625 | + self.assertThat( |
4626 | + lambda: str(self.modem_1.Get(CALL_FWD_IFACE, |
4627 | + 'VoiceUnconditional')), |
4628 | + Eventually(Contains('41444424'))) |
4629 | + |
4630 | + def test_call_waiting_sim_1(self): |
4631 | + call_wait = self.phone_page.go_to_call_waiting(sim=1) |
4632 | + # we have to help our test here, this normally takes quite a while |
4633 | + self.modem_0.EmitSignal( |
4634 | + CALL_SETTINGS_IFACE, 'PropertyChanged', 'sv', |
4635 | + ['VoiceCallWaiting', 'disabled']) |
4636 | + call_wait.enable_call_waiting() |
4637 | + |
4638 | + # Check that dbus properties have been updated |
4639 | + self.assertThat( |
4640 | + lambda: str(self.modem_0.Get(CALL_SETTINGS_IFACE, |
4641 | + 'VoiceCallWaiting')), |
4642 | + Eventually(Contains('enabled'))) |
4643 | + |
4644 | + def test_call_waiting_sim_2(self): |
4645 | + call_wait = self.phone_page.go_to_call_waiting(sim=2) |
4646 | + # we have to help our test here, this normally takes quite a while |
4647 | + self.modem_1.EmitSignal( |
4648 | + CALL_SETTINGS_IFACE, 'PropertyChanged', 'sv', |
4649 | + ['VoiceCallWaiting', 'disabled']) |
4650 | + call_wait.enable_call_waiting() |
4651 | + |
4652 | + # Check that dbus properties have been updated |
4653 | + self.assertThat( |
4654 | + lambda: str(self.modem_1.Get(CALL_SETTINGS_IFACE, |
4655 | + 'VoiceCallWaiting')), |
4656 | + Eventually(Contains('enabled'))) |
4657 | |
4658 | === added file 'tests/autopilot/ubuntu_system_settings/tests/test_security.py' |
4659 | --- tests/autopilot/ubuntu_system_settings/tests/test_security.py 1970-01-01 00:00:00 +0000 |
4660 | +++ tests/autopilot/ubuntu_system_settings/tests/test_security.py 2014-08-26 21:07:36 +0000 |
4661 | @@ -0,0 +1,173 @@ |
4662 | +# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
4663 | +# Copyright 2014 Canonical |
4664 | +# |
4665 | +# This program is free software: you can redistribute it and/or modify it |
4666 | +# under the terms of the GNU General Public License version 3, as published |
4667 | +# by the Free Software Foundation. |
4668 | + |
4669 | +from gi.repository import Gio |
4670 | +from time import sleep |
4671 | +from testtools.matchers import Equals, NotEquals |
4672 | +from autopilot.matchers import Eventually |
4673 | + |
4674 | +from ubuntu_system_settings.tests import SecurityBaseTestCase |
4675 | + |
4676 | +from ubuntu_system_settings.utils.i18n import ugettext as _ |
4677 | +from ubuntuuitoolkit import emulators as toolkit_emulators |
4678 | + |
4679 | + |
4680 | +class SecurityTestCase(SecurityBaseTestCase): |
4681 | + """ Tests for Security Page """ |
4682 | + |
4683 | + def setUp(self): |
4684 | + super(SecurityTestCase, self).setUp() |
4685 | + prps = self.system_settings.main_view.security_page.get_properties() |
4686 | + self.use_powerd = prps['usePowerd'] |
4687 | + if self.use_powerd: |
4688 | + gsettings = Gio.Settings.new('com.ubuntu.touch.system') |
4689 | + prev = gsettings.get_uint('activity-timeout') |
4690 | + self.addCleanup( |
4691 | + self.set_prev_activity_timeout, gsettings, prev) |
4692 | + else: |
4693 | + gsettings = Gio.Settings.new('org.gnome.desktop.session') |
4694 | + prev = gsettings.get_uint('idle-delay') |
4695 | + self.addCleanup( |
4696 | + self.set_prev_idle_delay, gsettings, prev) |
4697 | + |
4698 | + def set_prev_idle_delay(self, gsettings, prev): |
4699 | + gsettings.set_uint('idle-delay', prev) |
4700 | + self.assertThat( |
4701 | + lambda: int(gsettings.get_uint('idle-delay')), |
4702 | + Eventually(Equals(prev)) |
4703 | + ) |
4704 | + |
4705 | + def set_prev_activity_timeout(self, gsettings, prev): |
4706 | + gsettings.set_uint('activity-timeout', prev) |
4707 | + self.assertThat( |
4708 | + lambda: int(gsettings.get_uint('activity-timeout')), |
4709 | + Eventually(Equals(prev)) |
4710 | + ) |
4711 | + |
4712 | + def _get_activity_timeout(self): |
4713 | + if self.use_powerd: |
4714 | + gsettings = Gio.Settings.new('com.ubuntu.touch.system') |
4715 | + prev = gsettings.get_uint('activity-timeout') |
4716 | + return prev |
4717 | + else: |
4718 | + gsettings = Gio.Settings.new('org.gnome.desktop.session') |
4719 | + prev = gsettings.get_uint('idle-delay') |
4720 | + return prev |
4721 | + |
4722 | + def _go_to_phone_lock(self): |
4723 | + selector = self.security_page.select_single( |
4724 | + objectName="lockingControl" |
4725 | + ) |
4726 | + self.system_settings.main_view.scroll_to_and_click(selector) |
4727 | + |
4728 | + def _go_to_sleep_values(self): |
4729 | + self._go_to_phone_lock() |
4730 | + selector = self.system_settings.main_view.select_single( |
4731 | + objectName="lockTimeout" |
4732 | + ) |
4733 | + self.system_settings.main_view.scroll_to_and_click(selector) |
4734 | + |
4735 | + def _get_sleep_selector(self): |
4736 | + self._go_to_sleep_values() |
4737 | + sleep_values_page = self.system_settings.main_view.select_single( |
4738 | + objectName='sleepValues') |
4739 | + self.assertThat( |
4740 | + sleep_values_page, |
4741 | + NotEquals(None) |
4742 | + ) |
4743 | + self._go_to_sleep_values() |
4744 | + sleep_values_page = self.system_settings.main_view.select_single( |
4745 | + objectName='sleepValues') |
4746 | + return sleep_values_page.select_single( |
4747 | + toolkit_emulators.ItemSelector, |
4748 | + objectName="sleepSelector" |
4749 | + ) |
4750 | + |
4751 | + def test_security_page(self): |
4752 | + """ Checks whether Security page is available """ |
4753 | + self.assertThat( |
4754 | + self.system_settings.main_view.security_page, |
4755 | + NotEquals(None) |
4756 | + ) |
4757 | + self.assertThat( |
4758 | + self.system_settings.main_view.security_page.title, |
4759 | + Equals(_('Security & Privacy')) |
4760 | + ) |
4761 | + |
4762 | + def test_locking_control_value(self): |
4763 | + actTimeout = self._get_activity_timeout() |
4764 | + activityTimeout = self.security_page.select_single( |
4765 | + objectName='lockingControl').value |
4766 | + if actTimeout is 0: |
4767 | + self.assertEquals(activityTimeout, ('Manually')) |
4768 | + elif actTimeout is 60: |
4769 | + self.assertEquals( |
4770 | + activityTimeout, |
4771 | + ('After {:d} minute').format(int(actTimeout/60))) |
4772 | + else: |
4773 | + self.assertEquals( |
4774 | + activityTimeout, |
4775 | + ('After {:d} minutes').format(int(actTimeout/60))) |
4776 | + |
4777 | + def test_phone_lock_page(self): |
4778 | + self._go_to_phone_lock() |
4779 | + phone_lock_page = self.system_settings.main_view.select_single( |
4780 | + objectName='phoneLockingPage') |
4781 | + self.assertThat( |
4782 | + phone_lock_page, |
4783 | + NotEquals(None) |
4784 | + ) |
4785 | + self.assertThat( |
4786 | + phone_lock_page.title, |
4787 | + Equals(_('Phone locking')) |
4788 | + ) |
4789 | + |
4790 | + def test_phone_lock_value(self): |
4791 | + self._go_to_phone_lock() |
4792 | + phone_lock_page = self.system_settings.main_view.select_single( |
4793 | + objectName='phoneLockingPage') |
4794 | + actTimeout = self._get_activity_timeout() |
4795 | + activityTimeout = phone_lock_page.select_single( |
4796 | + objectName='lockTimeout').value |
4797 | + if actTimeout is 0: |
4798 | + self.assertEquals(activityTimeout, ('Never')) |
4799 | + elif actTimeout is 60: |
4800 | + self.assertEquals( |
4801 | + activityTimeout, |
4802 | + ('{:d} minute').format(int(actTimeout/60)) |
4803 | + ) |
4804 | + else: |
4805 | + self.assertEquals( |
4806 | + activityTimeout, |
4807 | + ('{:d} minutes').format(int(actTimeout/60)) |
4808 | + ) |
4809 | + |
4810 | + def test_idle_never_timeout(self): |
4811 | + selector = self._get_sleep_selector() |
4812 | + to_select = selector.select_single( |
4813 | + 'OptionSelectorDelegate', text='Never') |
4814 | + self.system_settings.main_view.pointing_device.click_object(to_select) |
4815 | + to_select.selected.wait_for(True) |
4816 | + sleep(1) |
4817 | + actTimeout = self._get_activity_timeout() |
4818 | + self.assertEquals(actTimeout, 0) |
4819 | + selected_delegate = selector.select_single( |
4820 | + 'OptionSelectorDelegate', selected=True) |
4821 | + self.assertEquals(selected_delegate.text, 'Never') |
4822 | + |
4823 | + def test_idle_change_timeout(self): |
4824 | + selector = self._get_sleep_selector() |
4825 | + to_select = selector.select_single( |
4826 | + 'OptionSelectorDelegate', text='After 4 minutes') |
4827 | + self.system_settings.main_view.pointing_device.click_object(to_select) |
4828 | + to_select.selected.wait_for(True) |
4829 | + sleep(1) |
4830 | + actTimeout = self._get_activity_timeout() |
4831 | + self.assertEquals(actTimeout, 240) |
4832 | + selected_delegate = selector.select_single( |
4833 | + 'OptionSelectorDelegate', selected=True) |
4834 | + self.assertEquals(selected_delegate.text, 'After 4 minutes') |
4835 | |
4836 | === modified file 'tests/plugins/bluetooth/tst_bluetooth.cpp' |
4837 | --- tests/plugins/bluetooth/tst_bluetooth.cpp 2014-07-25 04:02:13 +0000 |
4838 | +++ tests/plugins/bluetooth/tst_bluetooth.cpp 2014-08-26 21:07:36 +0000 |
4839 | @@ -168,5 +168,5 @@ |
4840 | QCOMPARE(m_bluetooth->isDiscovering(), true); |
4841 | } |
4842 | |
4843 | -QTEST_MAIN(BluetoothTest); |
4844 | +QTEST_MAIN(BluetoothTest) |
4845 | #include "tst_bluetooth.moc" |
4846 | |
4847 | === modified file 'tests/plugins/bluetooth/tst_devicemodel.cpp' |
4848 | --- tests/plugins/bluetooth/tst_devicemodel.cpp 2014-07-25 04:02:13 +0000 |
4849 | +++ tests/plugins/bluetooth/tst_devicemodel.cpp 2014-08-26 21:07:36 +0000 |
4850 | @@ -93,5 +93,5 @@ |
4851 | QVERIFY(!device->getPath().isEmpty()); |
4852 | } |
4853 | |
4854 | -QTEST_MAIN(DeviceModelTest); |
4855 | +QTEST_MAIN(DeviceModelTest) |
4856 | #include "tst_devicemodel.moc" |
4857 | |
4858 | === modified file 'tests/plugins/system-update/tst_update.cpp' |
4859 | --- tests/plugins/system-update/tst_update.cpp 2014-01-24 11:55:50 +0000 |
4860 | +++ tests/plugins/system-update/tst_update.cpp 2014-08-26 21:07:36 +0000 |
4861 | @@ -51,5 +51,5 @@ |
4862 | QCOMPARE(app.updateRequired(), true); |
4863 | } |
4864 | |
4865 | -QTEST_MAIN(UpdateTest); |
4866 | +QTEST_MAIN(UpdateTest) |
4867 | #include "tst_update.moc" |
4868 | |
4869 | === modified file 'tests/plugins/system-update/tst_updatemanager.cpp' |
4870 | --- tests/plugins/system-update/tst_updatemanager.cpp 2014-05-05 18:18:37 +0000 |
4871 | +++ tests/plugins/system-update/tst_updatemanager.cpp 2014-08-26 21:07:36 +0000 |
4872 | @@ -151,5 +151,5 @@ |
4873 | } |
4874 | |
4875 | |
4876 | -QTEST_MAIN(UpdateManagerTest); |
4877 | +QTEST_MAIN(UpdateManagerTest) |
4878 | #include "tst_updatemanager.moc" |
4879 | |
4880 | === modified file 'tests/test-plugin2.cpp' |
4881 | --- tests/test-plugin2.cpp 2014-02-28 17:14:49 +0000 |
4882 | +++ tests/test-plugin2.cpp 2014-08-26 21:07:36 +0000 |
4883 | @@ -29,8 +29,8 @@ |
4884 | { |
4885 | } |
4886 | |
4887 | -ItemBase *TestPlugin2::createItem(const QVariantMap &staticData, |
4888 | - QObject *parent) |
4889 | +ItemBase *TestPlugin2::createItem(const QVariantMap &/*staticData*/, |
4890 | + QObject */*parent*/) |
4891 | { |
4892 | return NULL; |
4893 | } |
4894 | |
4895 | === modified file 'tests/tst_arguments.cpp' |
4896 | --- tests/tst_arguments.cpp 2013-09-30 09:29:34 +0000 |
4897 | +++ tests/tst_arguments.cpp 2014-08-26 21:07:36 +0000 |
4898 | @@ -108,5 +108,5 @@ |
4899 | QCOMPARE(pluginOptions, expectedOptions); |
4900 | } |
4901 | |
4902 | -QTEST_MAIN(ArgumentsTest); |
4903 | +QTEST_MAIN(ArgumentsTest) |
4904 | #include "tst_arguments.moc" |
4905 | |
4906 | === modified file 'tests/tst_plugins.cpp' |
4907 | --- tests/tst_plugins.cpp 2014-02-28 17:14:49 +0000 |
4908 | +++ tests/tst_plugins.cpp 2014-08-26 21:07:36 +0000 |
4909 | @@ -163,5 +163,5 @@ |
4910 | phone->reset(); |
4911 | } |
4912 | |
4913 | -QTEST_MAIN(PluginsTest); |
4914 | +QTEST_MAIN(PluginsTest) |
4915 | #include "tst_plugins.moc" |
4916 | |
4917 | === added file 'wizard/qml/Components/CheckableSetting.qml' |
4918 | --- wizard/qml/Components/CheckableSetting.qml 1970-01-01 00:00:00 +0000 |
4919 | +++ wizard/qml/Components/CheckableSetting.qml 2014-08-26 21:07:36 +0000 |
4920 | @@ -0,0 +1,80 @@ |
4921 | +/* |
4922 | + * Copyright (C) 2014 Canonical, Ltd. |
4923 | + * |
4924 | + * This program is free software; you can redistribute it and/or modify |
4925 | + * it under the terms of the GNU General Public License as published by |
4926 | + * the Free Software Foundation; version 3. |
4927 | + * |
4928 | + * This program is distributed in the hope that it will be useful, |
4929 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4930 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4931 | + * GNU General Public License for more details. |
4932 | + * |
4933 | + * You should have received a copy of the GNU General Public License |
4934 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
4935 | + */ |
4936 | + |
4937 | +import QtQuick 2.3 |
4938 | +import QMenuModel 0.1 |
4939 | +import Ubuntu.Components 1.1 |
4940 | +import Ubuntu.Components.ListItems 1.0 as ListItem |
4941 | + |
4942 | +ListItem.Empty { |
4943 | + id: listItem |
4944 | + |
4945 | + property alias text: label.text |
4946 | + property bool checked: false |
4947 | + property real leftMargin |
4948 | + property real rightMargin |
4949 | + |
4950 | + signal linkActivated(string link) |
4951 | + |
4952 | + implicitHeight: label.height + units.gu(2) |
4953 | + |
4954 | + Item { |
4955 | + anchors.fill: parent |
4956 | + |
4957 | + CheckBox { |
4958 | + id: checkBox |
4959 | + |
4960 | + anchors { |
4961 | + left: parent.left |
4962 | + verticalCenter: parent.verticalCenter |
4963 | + leftMargin: listItem.leftMargin |
4964 | + } |
4965 | + |
4966 | + Component.onCompleted: { |
4967 | + checked = listItem.checked; |
4968 | + } |
4969 | + |
4970 | + onClicked: { |
4971 | + listItem.checked = checked |
4972 | + listItem.triggered(listItem.checked) |
4973 | + } |
4974 | + |
4975 | + Connections { |
4976 | + target: listItem |
4977 | + onCheckedChanged: checkBox.checked = listItem.checked |
4978 | + } |
4979 | + |
4980 | + Connections { |
4981 | + target: listItem.__mouseArea |
4982 | + onClicked: listItem.checked = !listItem.checked |
4983 | + } |
4984 | + } |
4985 | + |
4986 | + Label { |
4987 | + id: label |
4988 | + anchors { |
4989 | + left: checkBox.right |
4990 | + right: parent.right |
4991 | + verticalCenter: parent.verticalCenter |
4992 | + leftMargin: units.gu(2) |
4993 | + rightMargin: listItem.rightMargin |
4994 | + } |
4995 | + wrapMode: Text.Wrap |
4996 | + linkColor: Theme.palette.normal.foregroundText |
4997 | + onLinkActivated: listItem.linkActivated(link) |
4998 | + } |
4999 | + } |
5000 | +} |
The diff has been truncated for viewing.
Thanks, that merge request includes more changes. Trunk of u-s-s is also focussed on rtm, we should probably not even have a branch there but just have on vcs and pocket copy between series