Merge lp:~jonas-drange/ubuntu-system-settings/lp1470782 into lp:ubuntu-system-settings

Proposed by Jonas G. Drange
Status: Merged
Approved by: Ken VanDine
Approved revision: 1475
Merged at revision: 1490
Proposed branch: lp:~jonas-drange/ubuntu-system-settings/lp1470782
Merge into: lp:ubuntu-system-settings
Diff against target: 1076 lines (+532/-427)
9 files modified
plugins/phone/Services.qml (+23/-10)
plugins/security-privacy/AppAccess.qml (+52/-40)
plugins/security-privacy/AppAccessControl.qml (+30/-18)
plugins/security-privacy/LockSecurity.qml (+83/-71)
plugins/security-privacy/PhoneLocking.qml (+112/-100)
plugins/security-privacy/SimPin.qml (+102/-90)
plugins/security-privacy/diagnostics/PageComponent.qml (+8/-1)
plugins/wifi/NetworkDetails.qml (+69/-56)
plugins/wifi/NetworkDetailsBrief.qml (+53/-41)
To merge this branch: bzr merge lp:~jonas-drange/ubuntu-system-settings/lp1470782
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Sebastien Bacher (community) Approve
Review via email: mp+264551@code.launchpad.net

Commit message

Adds Flickables to many pages.

Description of the change

Add Flickables to panels that are without.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, looks fine but could we split out the UI changes in another merge request? they are different logical units and it doesn't make sense to batch them together... (or at minimum update the commit message to describe the other changes, but it would still be good to have different commits)

1475. By Jonas G. Drange

undo visual changes

Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

Agreed, undid the visual changes. All changes are now strictly related to the addition of Flickables.

Revision history for this message
Sebastien Bacher (seb128) wrote :

seems to do what it should now!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1476. By Jonas G. Drange

skip adding flickable to timedate

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

As I said in bug 1470782, I'm not a software architect, but this seems error-prone. Every time someone adds a new page to System Settings, they have to know and remember to add a Flickable, which is unlikely when the screen on their test device happens to be larger than the page contents when they test it. I predict that bugs like bug 1240086, bug 1333135, bug 1354161, bug 1374017, bug 1469076, and bug 1470782 will keep recurring as long as people have to remember to add a Flickable to every page.

And that was before I'd even seen this diff, which includes this comment nine times:

/* Set the direction to workaround
   https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
   might end up in a situation where scrolling doesn't work */

When that Qt bug is fixed, if you get around to removing the workaround, you'll be removing it from at least 24 separate files. If it was part of a base file you'd just need to remove it in one place.

Is there a reason not to make every System Settings page inherit from one file that includes the Flickable?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/phone/Services.qml'
2--- plugins/phone/Services.qml 2014-08-06 12:12:31 +0000
3+++ plugins/phone/Services.qml 2015-07-16 14:21:51 +0000
4@@ -24,6 +24,7 @@
5 import Ubuntu.Components.ListItems 0.1 as ListItem
6
7 ItemPage {
8+ id: root
9 objectName: "servicesPage"
10 title: headerTitle
11 property string carrierString
12@@ -42,16 +43,28 @@
13 names = keys;
14 }
15
16- Column {
17- anchors.left: parent.left
18- anchors.right: parent.right
19- Repeater {
20- model: names
21-
22- ListItem.Standard {
23- progression: true
24- text: modelData
25- onClicked: pageStack.push(Qt.resolvedUrl("ServiceInfo.qml"), {serviceName: modelData, serviceNumber: sim.serviceNumbers[modelData]})
26+ Flickable {
27+ anchors.fill: parent
28+ contentHeight: contentItem.childrenRect.height
29+ boundsBehavior: (contentHeight > root.height) ?
30+ Flickable.DragAndOvershootBounds :
31+ Flickable.StopAtBounds
32+ /* Set the direction to workaround
33+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
34+ might end up in a situation where scrolling doesn't work */
35+ flickableDirection: Flickable.VerticalFlick
36+
37+ Column {
38+ anchors.left: parent.left
39+ anchors.right: parent.right
40+ Repeater {
41+ model: names
42+
43+ ListItem.Standard {
44+ progression: true
45+ text: modelData
46+ onClicked: pageStack.push(Qt.resolvedUrl("ServiceInfo.qml"), {serviceName: modelData, serviceNumber: sim.serviceNumbers[modelData]})
47+ }
48 }
49 }
50 }
51
52=== modified file 'plugins/security-privacy/AppAccess.qml'
53--- plugins/security-privacy/AppAccess.qml 2014-08-05 09:20:11 +0000
54+++ plugins/security-privacy/AppAccess.qml 2015-07-16 14:21:51 +0000
55@@ -27,46 +27,58 @@
56 id: root
57 title: i18n.tr("Other app access")
58
59- Column {
60- anchors.left: parent.left
61- anchors.right: parent.right
62-
63- ListItem.Caption {
64- text: i18n.tr("Apps that you have granted and have requested access to:")
65- }
66-
67- ListModel {
68- id: appsModel
69- ListElement {
70- name: QT_TR_NOOP("Camera")
71- caption: QT_TR_NOOP("Apps that have requested access to your camera")
72- trustStoreService: "CameraService"
73- }
74- ListElement {
75- name: QT_TR_NOOP("Mic")
76- caption: QT_TR_NOOP("Apps that have requested access to your mic")
77- trustStoreService: "PulseAudio"
78- }
79- }
80-
81- Repeater {
82- model: appsModel
83-
84- ListItem.SingleValue {
85- text: model.name
86- enabled: trustStoreModel.count > 0
87- value: trustStoreModel.count > 0 ?
88- i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :
89- i18n.tr("0")
90- onClicked: pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), {
91- "title": i18n.tr(model.name),
92- "caption": i18n.tr(model.caption),
93- "model": trustStoreModel,
94- })
95-
96- TrustStoreModel {
97- id: trustStoreModel
98- serviceName: model.trustStoreService
99+ Flickable {
100+ anchors.fill: parent
101+ contentHeight: contentItem.childrenRect.height
102+ boundsBehavior: (contentHeight > root.height) ?
103+ Flickable.DragAndOvershootBounds :
104+ Flickable.StopAtBounds
105+ /* Set the direction to workaround
106+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
107+ might end up in a situation where scrolling doesn't work */
108+ flickableDirection: Flickable.VerticalFlick
109+
110+ Column {
111+ anchors.left: parent.left
112+ anchors.right: parent.right
113+
114+ ListItem.Caption {
115+ text: i18n.tr("Apps that you have granted and have requested access to:")
116+ }
117+
118+ ListModel {
119+ id: appsModel
120+ ListElement {
121+ name: QT_TR_NOOP("Camera")
122+ caption: QT_TR_NOOP("Apps that have requested access to your camera")
123+ trustStoreService: "CameraService"
124+ }
125+ ListElement {
126+ name: QT_TR_NOOP("Mic")
127+ caption: QT_TR_NOOP("Apps that have requested access to your mic")
128+ trustStoreService: "PulseAudio"
129+ }
130+ }
131+
132+ Repeater {
133+ model: appsModel
134+
135+ ListItem.SingleValue {
136+ text: model.name
137+ enabled: trustStoreModel.count > 0
138+ value: trustStoreModel.count > 0 ?
139+ i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :
140+ i18n.tr("0")
141+ onClicked: pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), {
142+ "title": i18n.tr(model.name),
143+ "caption": i18n.tr(model.caption),
144+ "model": trustStoreModel,
145+ })
146+
147+ TrustStoreModel {
148+ id: trustStoreModel
149+ serviceName: model.trustStoreService
150+ }
151 }
152 }
153 }
154
155=== modified file 'plugins/security-privacy/AppAccessControl.qml'
156--- plugins/security-privacy/AppAccessControl.qml 2014-08-15 12:54:13 +0000
157+++ plugins/security-privacy/AppAccessControl.qml 2015-07-16 14:21:51 +0000
158@@ -28,24 +28,36 @@
159 property alias model: repeater.model
160 property alias caption: captionLabel.text
161
162- Column {
163- anchors.left: parent.left
164- anchors.right: parent.right
165-
166- ListItem.Caption {
167- id: captionLabel
168- }
169-
170- Repeater {
171- id: repeater
172-
173- ListItem.Standard {
174- text: model.applicationName
175- iconSource: model.iconName
176- control: Switch {
177- id: welcomeStatsSwitch
178- checked: model.granted
179- onClicked: root.model.setEnabled(index, !model.granted)
180+ Flickable {
181+ anchors.fill: parent
182+ contentHeight: contentItem.childrenRect.height
183+ boundsBehavior: (contentHeight > root.height) ?
184+ Flickable.DragAndOvershootBounds :
185+ Flickable.StopAtBounds
186+ /* Set the direction to workaround
187+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
188+ might end up in a situation where scrolling doesn't work */
189+ flickableDirection: Flickable.VerticalFlick
190+
191+ Column {
192+ anchors.left: parent.left
193+ anchors.right: parent.right
194+
195+ ListItem.Caption {
196+ id: captionLabel
197+ }
198+
199+ Repeater {
200+ id: repeater
201+
202+ ListItem.Standard {
203+ text: model.applicationName
204+ iconSource: model.iconName
205+ control: Switch {
206+ id: welcomeStatsSwitch
207+ checked: model.granted
208+ onClicked: root.model.setEnabled(index, !model.granted)
209+ }
210 }
211 }
212 }
213
214=== modified file 'plugins/security-privacy/LockSecurity.qml'
215--- plugins/security-privacy/LockSecurity.qml 2015-04-15 16:40:16 +0000
216+++ plugins/security-privacy/LockSecurity.qml 2015-07-16 14:21:51 +0000
217@@ -426,78 +426,90 @@
218 }
219 }
220
221- Column {
222- anchors.left: parent.left
223- anchors.right: parent.right
224-
225- SettingsItemTitle {
226- text: i18n.tr("Unlock the phone using:")
227- }
228-
229- ListItem.ItemSelector {
230- property string swipe: i18n.tr("Swipe (no security)")
231- property string passcode: i18n.tr("4-digit passcode")
232- property string passphrase: i18n.tr("Passphrase")
233- property string swipeAlt: i18n.tr("Swipe (no security)… ")
234- property string passcodeAlt: i18n.tr("4-digit passcode…")
235- property string passphraseAlt: i18n.tr("Passphrase…")
236-
237- id: unlockMethod
238- model: 3
239- delegate: OptionSelectorDelegate {
240- objectName: {
241- switch (index) {
242- case 0:
243- return "method_swipe";
244- case 1:
245- return "method_code";
246- case 2:
247- return "method_phrase";
248- default:
249- return "method_unknown";
250+ Flickable {
251+ anchors.fill: parent
252+ contentHeight: contentItem.childrenRect.height
253+ boundsBehavior: (contentHeight > page.height) ?
254+ Flickable.DragAndOvershootBounds :
255+ Flickable.StopAtBounds
256+ /* Set the direction to workaround
257+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
258+ might end up in a situation where scrolling doesn't work */
259+ flickableDirection: Flickable.VerticalFlick
260+
261+ Column {
262+ anchors.left: parent.left
263+ anchors.right: parent.right
264+
265+ SettingsItemTitle {
266+ text: i18n.tr("Unlock the phone using:")
267+ }
268+
269+ ListItem.ItemSelector {
270+ property string swipe: i18n.tr("Swipe (no security)")
271+ property string passcode: i18n.tr("4-digit passcode")
272+ property string passphrase: i18n.tr("Passphrase")
273+ property string swipeAlt: i18n.tr("Swipe (no security)… ")
274+ property string passcodeAlt: i18n.tr("4-digit passcode…")
275+ property string passphraseAlt: i18n.tr("Passphrase…")
276+
277+ id: unlockMethod
278+ model: 3
279+ delegate: OptionSelectorDelegate {
280+ objectName: {
281+ switch (index) {
282+ case 0:
283+ return "method_swipe";
284+ case 1:
285+ return "method_code";
286+ case 2:
287+ return "method_phrase";
288+ default:
289+ return "method_unknown";
290+ }
291 }
292- }
293- text: index == 0 ? (unlockMethod.selectedIndex == 0 ? unlockMethod.swipe : unlockMethod.swipeAlt) :
294- (index == 1 ? (unlockMethod.selectedIndex == 1 ? unlockMethod.passcode : unlockMethod.passcodeAlt) :
295- (unlockMethod.selectedIndex == 2 ? unlockMethod.passphrase : unlockMethod.passphraseAlt))
296- }
297- expanded: true
298- onDelegateClicked: {
299- if (selectedIndex === index && !changeControl.visible)
300- return // nothing to do
301-
302- selectedIndex = index
303- openDialog()
304- }
305- }
306- Binding {
307- target: unlockMethod
308- property: "selectedIndex"
309- value: methodToIndex(securityPrivacy.securityType)
310- }
311-
312- ListItem.SingleControl {
313-
314- id: changeControl
315- visible: securityPrivacy.securityType !==
316- UbuntuSecurityPrivacyPanel.Swipe
317-
318- control: Button {
319- property string changePasscode: i18n.tr("Change passcode…")
320- property string changePassphrase: i18n.tr("Change passphrase…")
321-
322- property bool passcode: securityPrivacy.securityType ===
323- UbuntuSecurityPrivacyPanel.Passcode
324-
325- objectName: "changePass"
326- enabled: parent.visible
327-
328- text: passcode ? changePasscode : changePassphrase
329- width: parent.width - units.gu(4)
330-
331- onClicked: openDialog()
332- }
333- showDivider: false
334+ text: index == 0 ? (unlockMethod.selectedIndex == 0 ? unlockMethod.swipe : unlockMethod.swipeAlt) :
335+ (index == 1 ? (unlockMethod.selectedIndex == 1 ? unlockMethod.passcode : unlockMethod.passcodeAlt) :
336+ (unlockMethod.selectedIndex == 2 ? unlockMethod.passphrase : unlockMethod.passphraseAlt))
337+ }
338+ expanded: true
339+ onDelegateClicked: {
340+ if (selectedIndex === index && !changeControl.visible)
341+ return // nothing to do
342+
343+ selectedIndex = index
344+ openDialog()
345+ }
346+ }
347+ Binding {
348+ target: unlockMethod
349+ property: "selectedIndex"
350+ value: methodToIndex(securityPrivacy.securityType)
351+ }
352+
353+ ListItem.SingleControl {
354+
355+ id: changeControl
356+ visible: securityPrivacy.securityType !==
357+ UbuntuSecurityPrivacyPanel.Swipe
358+
359+ control: Button {
360+ property string changePasscode: i18n.tr("Change passcode…")
361+ property string changePassphrase: i18n.tr("Change passphrase…")
362+
363+ property bool passcode: securityPrivacy.securityType ===
364+ UbuntuSecurityPrivacyPanel.Passcode
365+
366+ objectName: "changePass"
367+ enabled: parent.visible
368+
369+ text: passcode ? changePasscode : changePassphrase
370+ width: parent.width - units.gu(4)
371+
372+ onClicked: openDialog()
373+ }
374+ showDivider: false
375+ }
376 }
377 }
378 }
379
380=== modified file 'plugins/security-privacy/PhoneLocking.qml'
381--- plugins/security-privacy/PhoneLocking.qml 2015-04-15 15:29:12 +0000
382+++ plugins/security-privacy/PhoneLocking.qml 2015-07-16 14:21:51 +0000
383@@ -37,106 +37,118 @@
384 id: securityPrivacy
385 }
386
387- Column {
388- anchors.left: parent.left
389- anchors.right: parent.right
390-
391- ListItem.SingleValue {
392- property string swipe: i18n.ctr("Unlock with swipe", "None")
393- property string passcode: i18n.tr("Passcode")
394- property string passphrase: i18n.tr("Passphrase")
395-
396- objectName: "lockSecurity"
397- text: i18n.tr("Lock security")
398- value: {
399- switch (securityPrivacy.securityType) {
400- case UbuntuSecurityPrivacyPanel.Swipe:
401- return swipe
402- case UbuntuSecurityPrivacyPanel.Passcode:
403- return passcode
404- case UbuntuSecurityPrivacyPanel.Passphrase:
405- return passphrase
406- }
407- }
408- progression: true
409- onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml"))
410- }
411-
412- ListItem.SingleValue {
413- objectName: "lockTimeout"
414- property bool lockOnSuspend: securityPrivacy.securityType !==
415- UbuntuSecurityPrivacyPanel.Swipe
416- text: lockOnSuspend ? i18n.tr("Lock when idle")
417- : i18n.tr("Sleep when idle")
418- value: {
419- if (usePowerd) {
420- var timeout = Math.round(powerSettings.activityTimeout/60)
421- return (powerSettings.activityTimeout != 0) ?
422- // TRANSLATORS: %1 is the number of minutes
423- i18n.tr("%1 minute",
424- "%1 minutes",
425- timeout).arg(timeout) :
426- i18n.tr("Never")
427- }
428- else {
429- var timeout = Math.round(powerSettings.idleDelay/60)
430- return (powerSettings.idleDelay != 0) ?
431- // TRANSLATORS: %1 is the number of minutes
432- i18n.tr("%1 minute",
433- "%1 minutes",
434- timeout).arg(timeout) :
435- i18n.tr("Never")
436- }
437- }
438- progression: true
439- onClicked:
440- pageStack.push(
441- Qt.resolvedUrl("../battery/SleepValues.qml"),
442- { title: text, lockOnSuspend: lockOnSuspend } )
443- }
444-
445- ListItem.Standard {
446- control: CheckBox {
447- checked: true
448- }
449- text: i18n.tr("Sleep locks immediately")
450- visible: showAllUI
451- }
452-
453- SettingsItemTitle {
454- text: i18n.tr("When locked, allow:")
455- }
456-
457- ListItem.Standard {
458- text: i18n.tr("Launcher")
459- control: CheckBox {
460- id: launcherCheck
461- enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
462-
463- property bool serverChecked: securityPrivacy.enableLauncherWhileLocked || !enabled
464- onServerCheckedChanged: checked = serverChecked
465- Component.onCompleted: checked = serverChecked
466- onTriggered: securityPrivacy.enableLauncherWhileLocked = checked
467- }
468- }
469-
470- ListItem.Standard {
471- text: i18n.tr("Notifications and quick settings")
472- control: CheckBox {
473- id: indicatorsCheck
474- enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
475-
476- property bool serverChecked: securityPrivacy.enableIndicatorsWhileLocked || !enabled
477- onServerCheckedChanged: checked = serverChecked
478- Component.onCompleted: checked = serverChecked
479- onTriggered: securityPrivacy.enableIndicatorsWhileLocked = checked
480- }
481- }
482-
483- ListItem.Caption {
484- text: securityPrivacy.securityType === UbuntuSecurityPrivacyPanel.Swipe ?
485- i18n.tr("Turn on lock security to restrict access when the phone is locked.") :
486- i18n.tr("Other apps and functions will prompt you to unlock.")
487+ Flickable {
488+ anchors.fill: parent
489+ contentHeight: contentItem.childrenRect.height
490+ boundsBehavior: (contentHeight > root.height) ?
491+ Flickable.DragAndOvershootBounds :
492+ Flickable.StopAtBounds
493+ /* Set the direction to workaround
494+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
495+ might end up in a situation where scrolling doesn't work */
496+ flickableDirection: Flickable.VerticalFlick
497+
498+ Column {
499+ anchors.left: parent.left
500+ anchors.right: parent.right
501+
502+ ListItem.SingleValue {
503+ property string swipe: i18n.ctr("Unlock with swipe", "None")
504+ property string passcode: i18n.tr("Passcode")
505+ property string passphrase: i18n.tr("Passphrase")
506+
507+ objectName: "lockSecurity"
508+ text: i18n.tr("Lock security")
509+ value: {
510+ switch (securityPrivacy.securityType) {
511+ case UbuntuSecurityPrivacyPanel.Swipe:
512+ return swipe
513+ case UbuntuSecurityPrivacyPanel.Passcode:
514+ return passcode
515+ case UbuntuSecurityPrivacyPanel.Passphrase:
516+ return passphrase
517+ }
518+ }
519+ progression: true
520+ onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml"))
521+ }
522+
523+ ListItem.SingleValue {
524+ objectName: "lockTimeout"
525+ property bool lockOnSuspend: securityPrivacy.securityType !==
526+ UbuntuSecurityPrivacyPanel.Swipe
527+ text: lockOnSuspend ? i18n.tr("Lock when idle")
528+ : i18n.tr("Sleep when idle")
529+ value: {
530+ if (usePowerd) {
531+ var timeout = Math.round(powerSettings.activityTimeout/60)
532+ return (powerSettings.activityTimeout != 0) ?
533+ // TRANSLATORS: %1 is the number of minutes
534+ i18n.tr("%1 minute",
535+ "%1 minutes",
536+ timeout).arg(timeout) :
537+ i18n.tr("Never")
538+ }
539+ else {
540+ var timeout = Math.round(powerSettings.idleDelay/60)
541+ return (powerSettings.idleDelay != 0) ?
542+ // TRANSLATORS: %1 is the number of minutes
543+ i18n.tr("%1 minute",
544+ "%1 minutes",
545+ timeout).arg(timeout) :
546+ i18n.tr("Never")
547+ }
548+ }
549+ progression: true
550+ onClicked:
551+ pageStack.push(
552+ Qt.resolvedUrl("../battery/SleepValues.qml"),
553+ { title: text, lockOnSuspend: lockOnSuspend } )
554+ }
555+
556+ ListItem.Standard {
557+ control: CheckBox {
558+ checked: true
559+ }
560+ text: i18n.tr("Sleep locks immediately")
561+ visible: showAllUI
562+ }
563+
564+ SettingsItemTitle {
565+ text: i18n.tr("When locked, allow:")
566+ }
567+
568+ ListItem.Standard {
569+ text: i18n.tr("Launcher")
570+ control: CheckBox {
571+ id: launcherCheck
572+ enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
573+
574+ property bool serverChecked: securityPrivacy.enableLauncherWhileLocked || !enabled
575+ onServerCheckedChanged: checked = serverChecked
576+ Component.onCompleted: checked = serverChecked
577+ onTriggered: securityPrivacy.enableLauncherWhileLocked = checked
578+ }
579+ }
580+
581+ ListItem.Standard {
582+ text: i18n.tr("Notifications and quick settings")
583+ control: CheckBox {
584+ id: indicatorsCheck
585+ enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
586+
587+ property bool serverChecked: securityPrivacy.enableIndicatorsWhileLocked || !enabled
588+ onServerCheckedChanged: checked = serverChecked
589+ Component.onCompleted: checked = serverChecked
590+ onTriggered: securityPrivacy.enableIndicatorsWhileLocked = checked
591+ }
592+ }
593+
594+ ListItem.Caption {
595+ text: securityPrivacy.securityType === UbuntuSecurityPrivacyPanel.Swipe ?
596+ i18n.tr("Turn on lock security to restrict access when the phone is locked.") :
597+ i18n.tr("Other apps and functions will prompt you to unlock.")
598+ }
599 }
600 }
601 }
602
603=== modified file 'plugins/security-privacy/SimPin.qml'
604--- plugins/security-privacy/SimPin.qml 2015-04-01 18:25:32 +0000
605+++ plugins/security-privacy/SimPin.qml 2015-07-16 14:21:51 +0000
606@@ -345,96 +345,108 @@
607 }
608 }
609
610- Column {
611- anchors.left: parent.left
612- anchors.right: parent.right
613-
614- Repeater {
615- model: sims.length
616- Column {
617- id: sim
618- anchors {
619- left: parent.left
620- right: parent.right
621- }
622-
623- states: [
624- State {
625- name: "locked"
626- when: sims[index].simMng.pinRequired !== OfonoSimManager.NoPin
627- },
628- State {
629- name: "unlocked"
630- when: sims[index].simMng.pinRequired === OfonoSimManager.NoPin
631- }
632- ]
633-
634- Connections {
635- target: sims[index].simMng
636- onLockedPinsChanged: {
637- simPinSwitch.checked =
638- sims[index].simMng.lockedPins.length > 0;
639- }
640- }
641-
642- ListItem.Standard {
643- text: sims[index].title
644- visible: sims.length > 1
645- }
646-
647- ListItem.Standard {
648- text: i18n.tr("SIM PIN")
649- control: Switch {
650- id: simPinSwitch
651- objectName: "simPinSwitch"
652- checked: sims[index].simMng.lockedPins.length > 0
653- onClicked: {
654- curSim = sims[index].simMng;
655- PopupUtils.open(lockDialogComponent, simPinSwitch);
656- }
657- }
658- }
659-
660- ListItem.Standard {
661- id: changeControl
662- visible: sim.state === "unlocked"
663- text: i18n.tr("Unlocked")
664- control: Button {
665- enabled: parent.visible
666- text: i18n.tr("Change PIN…")
667- onClicked: {
668- curSim = sims[index].simMng;
669- PopupUtils.open(dialogComponent);
670- }
671- }
672- }
673-
674- ListItem.Standard {
675- id: lockControl
676- visible: sim.state === "locked"
677- text: i18n.tr("Locked")
678- control: Button {
679- objectName: "unlock"
680- enabled: sims[index].simMng.pinRequired !== 'none'
681- text: i18n.tr("Unlock…")
682- color: UbuntuColors.green
683- onClicked: Connectivity.unlockModem(sims[index].path)
684- }
685- }
686-
687- ListItem.Divider {
688- visible: index < (sims.length - 1)
689- }
690-
691- }
692- }
693-
694- ListItem.Caption {
695- text: i18n.tr("When a SIM PIN is set, it must be entered to access cellular services after restarting the phone or swapping the SIM.")
696- }
697-
698- ListItem.Caption {
699- text: i18n.tr("Entering an incorrect PIN repeatedly may lock the SIM permanently.")
700+ Flickable {
701+ anchors.fill: parent
702+ contentHeight: contentItem.childrenRect.height
703+ boundsBehavior: (contentHeight > root.height) ?
704+ Flickable.DragAndOvershootBounds :
705+ Flickable.StopAtBounds
706+ /* Set the direction to workaround
707+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
708+ might end up in a situation where scrolling doesn't work */
709+ flickableDirection: Flickable.VerticalFlick
710+
711+ Column {
712+ anchors.left: parent.left
713+ anchors.right: parent.right
714+
715+ Repeater {
716+ model: sims.length
717+ Column {
718+ id: sim
719+ anchors {
720+ left: parent.left
721+ right: parent.right
722+ }
723+
724+ states: [
725+ State {
726+ name: "locked"
727+ when: sims[index].simMng.pinRequired !== OfonoSimManager.NoPin
728+ },
729+ State {
730+ name: "unlocked"
731+ when: sims[index].simMng.pinRequired === OfonoSimManager.NoPin
732+ }
733+ ]
734+
735+ Connections {
736+ target: sims[index].simMng
737+ onLockedPinsChanged: {
738+ simPinSwitch.checked =
739+ sims[index].simMng.lockedPins.length > 0;
740+ }
741+ }
742+
743+ ListItem.Standard {
744+ text: sims[index].title
745+ visible: sims.length > 1
746+ }
747+
748+ ListItem.Standard {
749+ text: i18n.tr("SIM PIN")
750+ control: Switch {
751+ id: simPinSwitch
752+ objectName: "simPinSwitch"
753+ checked: sims[index].simMng.lockedPins.length > 0
754+ onClicked: {
755+ curSim = sims[index].simMng;
756+ PopupUtils.open(lockDialogComponent, simPinSwitch);
757+ }
758+ }
759+ }
760+
761+ ListItem.Standard {
762+ id: changeControl
763+ visible: sim.state === "unlocked"
764+ text: i18n.tr("Unlocked")
765+ control: Button {
766+ enabled: parent.visible
767+ text: i18n.tr("Change PIN…")
768+ onClicked: {
769+ curSim = sims[index].simMng;
770+ PopupUtils.open(dialogComponent);
771+ }
772+ }
773+ }
774+
775+ ListItem.Standard {
776+ id: lockControl
777+ visible: sim.state === "locked"
778+ text: i18n.tr("Locked")
779+ control: Button {
780+ objectName: "unlock"
781+ enabled: sims[index].simMng.pinRequired !== 'none'
782+ text: i18n.tr("Unlock…")
783+ color: UbuntuColors.green
784+ onClicked: Connectivity.unlockModem(sims[index].path)
785+ }
786+ }
787+
788+ ListItem.Divider {
789+ visible: index < (sims.length - 1)
790+ }
791+
792+ }
793+ }
794+
795+ ListItem.Caption {
796+ text: i18n.tr("When a SIM PIN is set, it must be entered to access cellular services after restarting the phone or swapping the SIM.")
797+ }
798+
799+ ListItem.Caption {
800+ text: i18n.tr("Entering an incorrect PIN repeatedly may lock the SIM permanently.")
801+ }
802 }
803 }
804 }
805
806=== modified file 'plugins/security-privacy/diagnostics/PageComponent.qml'
807--- plugins/security-privacy/diagnostics/PageComponent.qml 2013-07-29 15:04:03 +0000
808+++ plugins/security-privacy/diagnostics/PageComponent.qml 2015-07-16 14:21:51 +0000
809@@ -37,11 +37,18 @@
810 }
811 onReportCrashesChanged: maybeUpdate()
812 }
813+
814 Flickable {
815 id: scrollWidget
816 anchors.fill: parent
817 contentHeight: contentItem.childrenRect.height
818- boundsBehavior: Flickable.StopAtBounds
819+ boundsBehavior: (contentHeight > root.height) ?
820+ Flickable.DragAndOvershootBounds :
821+ Flickable.StopAtBounds
822+ /* Set the direction to workaround
823+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
824+ might end up in a situation where scrolling doesn't work */
825+ flickableDirection: Flickable.VerticalFlick
826
827 Column {
828 anchors.left: parent.left
829
830=== modified file 'plugins/wifi/NetworkDetails.qml'
831--- plugins/wifi/NetworkDetails.qml 2015-01-20 14:11:24 +0000
832+++ plugins/wifi/NetworkDetails.qml 2015-07-16 14:21:51 +0000
833@@ -37,63 +37,76 @@
834
835 title: i18n.tr("Network details")
836
837- Column {
838-
839+ Flickable {
840 anchors.fill: parent
841-
842- ListItem.Standard {
843- text: i18n.tr("Name")
844- control: Label {
845- text: networkName
846- }
847- }
848-
849- ListItem.Standard {
850- id: lastLabel
851- text: i18n.tr("Last connected")
852- control: Label {
853- id: lastField
854-
855- text: networkDetails.lastUsed.length !== 0 ?
856- networkDetails.lastUsed : i18n.tr("Never")
857- }
858- }
859-
860- ListItem.Standard {
861- id: passwordLabel
862- text: i18n.tr("Password")
863- visible: networkDetails.password.length !== 0
864- control: TextInput {
865- id: passwordField
866- readOnly: true
867- text: networkDetails.password
868- echoMode: passwordVisibleSwitch.checked ?
869- TextInput.Normal : TextInput.Password
870- }
871- }
872-
873- ListItem.Standard {
874- id: passwordVisible
875- text: i18n.tr("Show password")
876- visible: networkDetails.password.length !== 0
877- control: Switch {
878- id: passwordVisibleSwitch
879- }
880- }
881-
882- ListItem.Divider {}
883-
884- Button {
885- objectName: "forgetNetwork"
886- text : i18n.tr("Forget this network")
887- anchors {
888- left: parent.left
889- right: parent.right
890- margins: units.gu(2)
891- }
892- onClicked : {
893- DbusHelper.forgetConnection(dbusPath);
894- pageStack.pop();
895+ contentHeight: contentItem.childrenRect.height
896+ boundsBehavior: (contentHeight > networkDetails.height) ?
897+ Flickable.DragAndOvershootBounds :
898+ Flickable.StopAtBounds
899+ /* Set the direction to workaround
900+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
901+ might end up in a situation where scrolling doesn't work */
902+ flickableDirection: Flickable.VerticalFlick
903+
904+ Column {
905+
906+ anchors.left: parent.left
907+ anchors.right: parent.right
908+
909+ ListItem.Standard {
910+ text: i18n.tr("Name")
911+ control: Label {
912+ text: networkName
913+ }
914+ }
915+
916+ ListItem.Standard {
917+ id: lastLabel
918+ text: i18n.tr("Last connected")
919+ control: Label {
920+ id: lastField
921+
922+ text: networkDetails.lastUsed.length !== 0 ?
923+ networkDetails.lastUsed : i18n.tr("Never")
924+ }
925+ }
926+
927+ ListItem.Standard {
928+ id: passwordLabel
929+ text: i18n.tr("Password")
930+ visible: networkDetails.password.length !== 0
931+ control: TextInput {
932+ id: passwordField
933+ readOnly: true
934+ text: networkDetails.password
935+ echoMode: passwordVisibleSwitch.checked ?
936+ TextInput.Normal : TextInput.Password
937+ }
938+ }
939+
940+ ListItem.Standard {
941+ id: passwordVisible
942+ text: i18n.tr("Show password")
943+ visible: networkDetails.password.length !== 0
944+ control: Switch {
945+ id: passwordVisibleSwitch
946+ }
947+ }
948+
949+ ListItem.Divider {}
950+
951+ Button {
952+ objectName: "forgetNetwork"
953+ text : i18n.tr("Forget this network")
954+ anchors {
955+ left: parent.left
956+ right: parent.right
957+ margins: units.gu(2)
958+ }
959+ onClicked : {
960+ DbusHelper.forgetConnection(dbusPath);
961+ pageStack.pop();
962+ }
963 }
964 }
965 }
966
967=== modified file 'plugins/wifi/NetworkDetailsBrief.qml'
968--- plugins/wifi/NetworkDetailsBrief.qml 2015-01-20 14:11:24 +0000
969+++ plugins/wifi/NetworkDetailsBrief.qml 2015-07-16 14:21:51 +0000
970@@ -26,53 +26,65 @@
971 import Ubuntu.SystemSettings.Wifi 1.0
972
973 ItemPage {
974-
975+ id: root
976 property string networkName
977 property var accessPoint
978
979 title: networkName
980
981- Column {
982-
983+ Flickable {
984 anchors.fill: parent
985-
986- ListItem.Divider {}
987-
988- Button {
989- text : i18n.tr("Forget this network")
990- anchors {
991- left: parent.left
992- right: parent.right
993- margins: units.gu(2)
994- }
995- onClicked: {
996- if (DbusHelper.forgetActiveDevice()) {
997- accessPoint.checked = false;
998- accessPoint.checkedChanged(false)
999- }
1000-
1001- }
1002- }
1003-
1004- ListItem.Standard {
1005- text: i18n.tr("IP address")
1006- id: addressItem
1007- control: TextField {
1008- text: DbusHelper.wifiIp4Address
1009- readOnly: true
1010- horizontalAlignment: TextInput.AlignRight
1011- width: addressItem.width/2
1012- persistentSelection: true
1013- font.pixelSize: units.dp(16)
1014- font.weight: Font.Light
1015- font.family: "Ubuntu"
1016- color: "#AAAAAA"
1017- maximumLength: 20
1018- focus: true
1019- clip: true
1020- opacity: 0.9
1021- cursorVisible: false
1022- hasClearButton: false
1023+ contentHeight: contentItem.childrenRect.height
1024+ boundsBehavior: (contentHeight > root.height) ?
1025+ Flickable.DragAndOvershootBounds :
1026+ Flickable.StopAtBounds
1027+ /* Set the direction to workaround
1028+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
1029+ might end up in a situation where scrolling doesn't work */
1030+ flickableDirection: Flickable.VerticalFlick
1031+
1032+ Column {
1033+
1034+ anchors.left: parent.left
1035+ anchors.right: parent.right
1036+
1037+ ListItem.Divider {}
1038+
1039+ Button {
1040+ text : i18n.tr("Forget this network")
1041+ anchors {
1042+ left: parent.left
1043+ right: parent.right
1044+ margins: units.gu(2)
1045+ }
1046+ onClicked: {
1047+ if (DbusHelper.forgetActiveDevice()) {
1048+ accessPoint.checked = false;
1049+ accessPoint.checkedChanged(false)
1050+ }
1051+ }
1052+ }
1053+
1054+ ListItem.Standard {
1055+ text: i18n.tr("IP address")
1056+ id: addressItem
1057+ control: TextField {
1058+ text: DbusHelper.wifiIp4Address
1059+ readOnly: true
1060+ horizontalAlignment: TextInput.AlignRight
1061+ width: addressItem.width/2
1062+ persistentSelection: true
1063+ font.pixelSize: units.dp(16)
1064+ font.weight: Font.Light
1065+ font.family: "Ubuntu"
1066+ color: "#AAAAAA"
1067+ maximumLength: 20
1068+ focus: true
1069+ clip: true
1070+ opacity: 0.9
1071+ cursorVisible: false
1072+ hasClearButton: false
1073+ }
1074 }
1075 }
1076 }

Subscribers

People subscribed via source and target branches