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
=== modified file 'plugins/phone/Services.qml'
--- plugins/phone/Services.qml 2014-08-06 12:12:31 +0000
+++ plugins/phone/Services.qml 2015-07-16 14:21:51 +0000
@@ -24,6 +24,7 @@
24import Ubuntu.Components.ListItems 0.1 as ListItem24import Ubuntu.Components.ListItems 0.1 as ListItem
2525
26ItemPage {26ItemPage {
27 id: root
27 objectName: "servicesPage"28 objectName: "servicesPage"
28 title: headerTitle29 title: headerTitle
29 property string carrierString30 property string carrierString
@@ -42,16 +43,28 @@
42 names = keys;43 names = keys;
43 }44 }
4445
45 Column {46 Flickable {
46 anchors.left: parent.left47 anchors.fill: parent
47 anchors.right: parent.right48 contentHeight: contentItem.childrenRect.height
48 Repeater {49 boundsBehavior: (contentHeight > root.height) ?
49 model: names50 Flickable.DragAndOvershootBounds :
5051 Flickable.StopAtBounds
51 ListItem.Standard {52 /* Set the direction to workaround
52 progression: true53 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
53 text: modelData54 might end up in a situation where scrolling doesn't work */
54 onClicked: pageStack.push(Qt.resolvedUrl("ServiceInfo.qml"), {serviceName: modelData, serviceNumber: sim.serviceNumbers[modelData]})55 flickableDirection: Flickable.VerticalFlick
56
57 Column {
58 anchors.left: parent.left
59 anchors.right: parent.right
60 Repeater {
61 model: names
62
63 ListItem.Standard {
64 progression: true
65 text: modelData
66 onClicked: pageStack.push(Qt.resolvedUrl("ServiceInfo.qml"), {serviceName: modelData, serviceNumber: sim.serviceNumbers[modelData]})
67 }
55 }68 }
56 }69 }
57 }70 }
5871
=== modified file 'plugins/security-privacy/AppAccess.qml'
--- plugins/security-privacy/AppAccess.qml 2014-08-05 09:20:11 +0000
+++ plugins/security-privacy/AppAccess.qml 2015-07-16 14:21:51 +0000
@@ -27,46 +27,58 @@
27 id: root27 id: root
28 title: i18n.tr("Other app access")28 title: i18n.tr("Other app access")
2929
30 Column {30 Flickable {
31 anchors.left: parent.left31 anchors.fill: parent
32 anchors.right: parent.right32 contentHeight: contentItem.childrenRect.height
3333 boundsBehavior: (contentHeight > root.height) ?
34 ListItem.Caption {34 Flickable.DragAndOvershootBounds :
35 text: i18n.tr("Apps that you have granted and have requested access to:")35 Flickable.StopAtBounds
36 }36 /* Set the direction to workaround
3737 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
38 ListModel {38 might end up in a situation where scrolling doesn't work */
39 id: appsModel39 flickableDirection: Flickable.VerticalFlick
40 ListElement {40
41 name: QT_TR_NOOP("Camera")41 Column {
42 caption: QT_TR_NOOP("Apps that have requested access to your camera")42 anchors.left: parent.left
43 trustStoreService: "CameraService"43 anchors.right: parent.right
44 }44
45 ListElement {45 ListItem.Caption {
46 name: QT_TR_NOOP("Mic")46 text: i18n.tr("Apps that you have granted and have requested access to:")
47 caption: QT_TR_NOOP("Apps that have requested access to your mic")47 }
48 trustStoreService: "PulseAudio"48
49 }49 ListModel {
50 }50 id: appsModel
5151 ListElement {
52 Repeater {52 name: QT_TR_NOOP("Camera")
53 model: appsModel53 caption: QT_TR_NOOP("Apps that have requested access to your camera")
5454 trustStoreService: "CameraService"
55 ListItem.SingleValue {55 }
56 text: model.name56 ListElement {
57 enabled: trustStoreModel.count > 057 name: QT_TR_NOOP("Mic")
58 value: trustStoreModel.count > 0 ?58 caption: QT_TR_NOOP("Apps that have requested access to your mic")
59 i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :59 trustStoreService: "PulseAudio"
60 i18n.tr("0")60 }
61 onClicked: pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), {61 }
62 "title": i18n.tr(model.name),62
63 "caption": i18n.tr(model.caption),63 Repeater {
64 "model": trustStoreModel,64 model: appsModel
65 })65
6666 ListItem.SingleValue {
67 TrustStoreModel {67 text: model.name
68 id: trustStoreModel68 enabled: trustStoreModel.count > 0
69 serviceName: model.trustStoreService69 value: trustStoreModel.count > 0 ?
70 i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :
71 i18n.tr("0")
72 onClicked: pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), {
73 "title": i18n.tr(model.name),
74 "caption": i18n.tr(model.caption),
75 "model": trustStoreModel,
76 })
77
78 TrustStoreModel {
79 id: trustStoreModel
80 serviceName: model.trustStoreService
81 }
70 }82 }
71 }83 }
72 }84 }
7385
=== modified file 'plugins/security-privacy/AppAccessControl.qml'
--- plugins/security-privacy/AppAccessControl.qml 2014-08-15 12:54:13 +0000
+++ plugins/security-privacy/AppAccessControl.qml 2015-07-16 14:21:51 +0000
@@ -28,24 +28,36 @@
28 property alias model: repeater.model28 property alias model: repeater.model
29 property alias caption: captionLabel.text29 property alias caption: captionLabel.text
3030
31 Column {31 Flickable {
32 anchors.left: parent.left32 anchors.fill: parent
33 anchors.right: parent.right33 contentHeight: contentItem.childrenRect.height
3434 boundsBehavior: (contentHeight > root.height) ?
35 ListItem.Caption {35 Flickable.DragAndOvershootBounds :
36 id: captionLabel36 Flickable.StopAtBounds
37 }37 /* Set the direction to workaround
3838 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
39 Repeater {39 might end up in a situation where scrolling doesn't work */
40 id: repeater40 flickableDirection: Flickable.VerticalFlick
4141
42 ListItem.Standard {42 Column {
43 text: model.applicationName43 anchors.left: parent.left
44 iconSource: model.iconName44 anchors.right: parent.right
45 control: Switch {45
46 id: welcomeStatsSwitch46 ListItem.Caption {
47 checked: model.granted47 id: captionLabel
48 onClicked: root.model.setEnabled(index, !model.granted)48 }
49
50 Repeater {
51 id: repeater
52
53 ListItem.Standard {
54 text: model.applicationName
55 iconSource: model.iconName
56 control: Switch {
57 id: welcomeStatsSwitch
58 checked: model.granted
59 onClicked: root.model.setEnabled(index, !model.granted)
60 }
49 }61 }
50 }62 }
51 }63 }
5264
=== modified file 'plugins/security-privacy/LockSecurity.qml'
--- plugins/security-privacy/LockSecurity.qml 2015-04-15 16:40:16 +0000
+++ plugins/security-privacy/LockSecurity.qml 2015-07-16 14:21:51 +0000
@@ -426,78 +426,90 @@
426 }426 }
427 }427 }
428428
429 Column {429 Flickable {
430 anchors.left: parent.left430 anchors.fill: parent
431 anchors.right: parent.right431 contentHeight: contentItem.childrenRect.height
432432 boundsBehavior: (contentHeight > page.height) ?
433 SettingsItemTitle {433 Flickable.DragAndOvershootBounds :
434 text: i18n.tr("Unlock the phone using:")434 Flickable.StopAtBounds
435 }435 /* Set the direction to workaround
436436 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
437 ListItem.ItemSelector {437 might end up in a situation where scrolling doesn't work */
438 property string swipe: i18n.tr("Swipe (no security)")438 flickableDirection: Flickable.VerticalFlick
439 property string passcode: i18n.tr("4-digit passcode")439
440 property string passphrase: i18n.tr("Passphrase")440 Column {
441 property string swipeAlt: i18n.tr("Swipe (no security)ā€¦ ")441 anchors.left: parent.left
442 property string passcodeAlt: i18n.tr("4-digit passcodeā€¦")442 anchors.right: parent.right
443 property string passphraseAlt: i18n.tr("Passphraseā€¦")443
444444 SettingsItemTitle {
445 id: unlockMethod445 text: i18n.tr("Unlock the phone using:")
446 model: 3446 }
447 delegate: OptionSelectorDelegate {447
448 objectName: {448 ListItem.ItemSelector {
449 switch (index) {449 property string swipe: i18n.tr("Swipe (no security)")
450 case 0:450 property string passcode: i18n.tr("4-digit passcode")
451 return "method_swipe";451 property string passphrase: i18n.tr("Passphrase")
452 case 1:452 property string swipeAlt: i18n.tr("Swipe (no security)ā€¦ ")
453 return "method_code";453 property string passcodeAlt: i18n.tr("4-digit passcodeā€¦")
454 case 2:454 property string passphraseAlt: i18n.tr("Passphraseā€¦")
455 return "method_phrase";455
456 default:456 id: unlockMethod
457 return "method_unknown";457 model: 3
458 delegate: OptionSelectorDelegate {
459 objectName: {
460 switch (index) {
461 case 0:
462 return "method_swipe";
463 case 1:
464 return "method_code";
465 case 2:
466 return "method_phrase";
467 default:
468 return "method_unknown";
469 }
458 }470 }
459 }471 text: index == 0 ? (unlockMethod.selectedIndex == 0 ? unlockMethod.swipe : unlockMethod.swipeAlt) :
460 text: index == 0 ? (unlockMethod.selectedIndex == 0 ? unlockMethod.swipe : unlockMethod.swipeAlt) :472 (index == 1 ? (unlockMethod.selectedIndex == 1 ? unlockMethod.passcode : unlockMethod.passcodeAlt) :
461 (index == 1 ? (unlockMethod.selectedIndex == 1 ? unlockMethod.passcode : unlockMethod.passcodeAlt) :473 (unlockMethod.selectedIndex == 2 ? unlockMethod.passphrase : unlockMethod.passphraseAlt))
462 (unlockMethod.selectedIndex == 2 ? unlockMethod.passphrase : unlockMethod.passphraseAlt))474 }
463 }475 expanded: true
464 expanded: true476 onDelegateClicked: {
465 onDelegateClicked: {477 if (selectedIndex === index && !changeControl.visible)
466 if (selectedIndex === index && !changeControl.visible)478 return // nothing to do
467 return // nothing to do479
468480 selectedIndex = index
469 selectedIndex = index481 openDialog()
470 openDialog()482 }
471 }483 }
472 }484 Binding {
473 Binding {485 target: unlockMethod
474 target: unlockMethod486 property: "selectedIndex"
475 property: "selectedIndex"487 value: methodToIndex(securityPrivacy.securityType)
476 value: methodToIndex(securityPrivacy.securityType)488 }
477 }489
478490 ListItem.SingleControl {
479 ListItem.SingleControl {491
480492 id: changeControl
481 id: changeControl493 visible: securityPrivacy.securityType !==
482 visible: securityPrivacy.securityType !==494 UbuntuSecurityPrivacyPanel.Swipe
483 UbuntuSecurityPrivacyPanel.Swipe495
484496 control: Button {
485 control: Button {497 property string changePasscode: i18n.tr("Change passcodeā€¦")
486 property string changePasscode: i18n.tr("Change passcodeā€¦")498 property string changePassphrase: i18n.tr("Change passphraseā€¦")
487 property string changePassphrase: i18n.tr("Change passphraseā€¦")499
488500 property bool passcode: securityPrivacy.securityType ===
489 property bool passcode: securityPrivacy.securityType ===501 UbuntuSecurityPrivacyPanel.Passcode
490 UbuntuSecurityPrivacyPanel.Passcode502
491503 objectName: "changePass"
492 objectName: "changePass"504 enabled: parent.visible
493 enabled: parent.visible505
494506 text: passcode ? changePasscode : changePassphrase
495 text: passcode ? changePasscode : changePassphrase507 width: parent.width - units.gu(4)
496 width: parent.width - units.gu(4)508
497509 onClicked: openDialog()
498 onClicked: openDialog()510 }
499 }511 showDivider: false
500 showDivider: false512 }
501 }513 }
502 }514 }
503}515}
504516
=== modified file 'plugins/security-privacy/PhoneLocking.qml'
--- plugins/security-privacy/PhoneLocking.qml 2015-04-15 15:29:12 +0000
+++ plugins/security-privacy/PhoneLocking.qml 2015-07-16 14:21:51 +0000
@@ -37,106 +37,118 @@
37 id: securityPrivacy37 id: securityPrivacy
38 }38 }
3939
40 Column {40 Flickable {
41 anchors.left: parent.left41 anchors.fill: parent
42 anchors.right: parent.right42 contentHeight: contentItem.childrenRect.height
4343 boundsBehavior: (contentHeight > root.height) ?
44 ListItem.SingleValue {44 Flickable.DragAndOvershootBounds :
45 property string swipe: i18n.ctr("Unlock with swipe", "None")45 Flickable.StopAtBounds
46 property string passcode: i18n.tr("Passcode")46 /* Set the direction to workaround
47 property string passphrase: i18n.tr("Passphrase")47 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
4848 might end up in a situation where scrolling doesn't work */
49 objectName: "lockSecurity"49 flickableDirection: Flickable.VerticalFlick
50 text: i18n.tr("Lock security")50
51 value: {51 Column {
52 switch (securityPrivacy.securityType) {52 anchors.left: parent.left
53 case UbuntuSecurityPrivacyPanel.Swipe:53 anchors.right: parent.right
54 return swipe54
55 case UbuntuSecurityPrivacyPanel.Passcode:55 ListItem.SingleValue {
56 return passcode56 property string swipe: i18n.ctr("Unlock with swipe", "None")
57 case UbuntuSecurityPrivacyPanel.Passphrase:57 property string passcode: i18n.tr("Passcode")
58 return passphrase58 property string passphrase: i18n.tr("Passphrase")
59 }59
60 }60 objectName: "lockSecurity"
61 progression: true61 text: i18n.tr("Lock security")
62 onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml"))62 value: {
63 }63 switch (securityPrivacy.securityType) {
6464 case UbuntuSecurityPrivacyPanel.Swipe:
65 ListItem.SingleValue {65 return swipe
66 objectName: "lockTimeout"66 case UbuntuSecurityPrivacyPanel.Passcode:
67 property bool lockOnSuspend: securityPrivacy.securityType !==67 return passcode
68 UbuntuSecurityPrivacyPanel.Swipe68 case UbuntuSecurityPrivacyPanel.Passphrase:
69 text: lockOnSuspend ? i18n.tr("Lock when idle")69 return passphrase
70 : i18n.tr("Sleep when idle")70 }
71 value: {71 }
72 if (usePowerd) {72 progression: true
73 var timeout = Math.round(powerSettings.activityTimeout/60)73 onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml"))
74 return (powerSettings.activityTimeout != 0) ?74 }
75 // TRANSLATORS: %1 is the number of minutes75
76 i18n.tr("%1 minute",76 ListItem.SingleValue {
77 "%1 minutes",77 objectName: "lockTimeout"
78 timeout).arg(timeout) :78 property bool lockOnSuspend: securityPrivacy.securityType !==
79 i18n.tr("Never")79 UbuntuSecurityPrivacyPanel.Swipe
80 }80 text: lockOnSuspend ? i18n.tr("Lock when idle")
81 else {81 : i18n.tr("Sleep when idle")
82 var timeout = Math.round(powerSettings.idleDelay/60)82 value: {
83 return (powerSettings.idleDelay != 0) ?83 if (usePowerd) {
84 // TRANSLATORS: %1 is the number of minutes84 var timeout = Math.round(powerSettings.activityTimeout/60)
85 i18n.tr("%1 minute",85 return (powerSettings.activityTimeout != 0) ?
86 "%1 minutes",86 // TRANSLATORS: %1 is the number of minutes
87 timeout).arg(timeout) :87 i18n.tr("%1 minute",
88 i18n.tr("Never")88 "%1 minutes",
89 }89 timeout).arg(timeout) :
90 }90 i18n.tr("Never")
91 progression: true91 }
92 onClicked:92 else {
93 pageStack.push(93 var timeout = Math.round(powerSettings.idleDelay/60)
94 Qt.resolvedUrl("../battery/SleepValues.qml"),94 return (powerSettings.idleDelay != 0) ?
95 { title: text, lockOnSuspend: lockOnSuspend } )95 // TRANSLATORS: %1 is the number of minutes
96 }96 i18n.tr("%1 minute",
9797 "%1 minutes",
98 ListItem.Standard {98 timeout).arg(timeout) :
99 control: CheckBox {99 i18n.tr("Never")
100 checked: true100 }
101 }101 }
102 text: i18n.tr("Sleep locks immediately")102 progression: true
103 visible: showAllUI103 onClicked:
104 }104 pageStack.push(
105105 Qt.resolvedUrl("../battery/SleepValues.qml"),
106 SettingsItemTitle {106 { title: text, lockOnSuspend: lockOnSuspend } )
107 text: i18n.tr("When locked, allow:")107 }
108 }108
109109 ListItem.Standard {
110 ListItem.Standard {110 control: CheckBox {
111 text: i18n.tr("Launcher")111 checked: true
112 control: CheckBox {112 }
113 id: launcherCheck113 text: i18n.tr("Sleep locks immediately")
114 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe114 visible: showAllUI
115115 }
116 property bool serverChecked: securityPrivacy.enableLauncherWhileLocked || !enabled116
117 onServerCheckedChanged: checked = serverChecked117 SettingsItemTitle {
118 Component.onCompleted: checked = serverChecked118 text: i18n.tr("When locked, allow:")
119 onTriggered: securityPrivacy.enableLauncherWhileLocked = checked119 }
120 }120
121 }121 ListItem.Standard {
122122 text: i18n.tr("Launcher")
123 ListItem.Standard {123 control: CheckBox {
124 text: i18n.tr("Notifications and quick settings")124 id: launcherCheck
125 control: CheckBox {125 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
126 id: indicatorsCheck126
127 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe127 property bool serverChecked: securityPrivacy.enableLauncherWhileLocked || !enabled
128128 onServerCheckedChanged: checked = serverChecked
129 property bool serverChecked: securityPrivacy.enableIndicatorsWhileLocked || !enabled129 Component.onCompleted: checked = serverChecked
130 onServerCheckedChanged: checked = serverChecked130 onTriggered: securityPrivacy.enableLauncherWhileLocked = checked
131 Component.onCompleted: checked = serverChecked131 }
132 onTriggered: securityPrivacy.enableIndicatorsWhileLocked = checked132 }
133 }133
134 }134 ListItem.Standard {
135135 text: i18n.tr("Notifications and quick settings")
136 ListItem.Caption {136 control: CheckBox {
137 text: securityPrivacy.securityType === UbuntuSecurityPrivacyPanel.Swipe ?137 id: indicatorsCheck
138 i18n.tr("Turn on lock security to restrict access when the phone is locked.") :138 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
139 i18n.tr("Other apps and functions will prompt you to unlock.")139
140 property bool serverChecked: securityPrivacy.enableIndicatorsWhileLocked || !enabled
141 onServerCheckedChanged: checked = serverChecked
142 Component.onCompleted: checked = serverChecked
143 onTriggered: securityPrivacy.enableIndicatorsWhileLocked = checked
144 }
145 }
146
147 ListItem.Caption {
148 text: securityPrivacy.securityType === UbuntuSecurityPrivacyPanel.Swipe ?
149 i18n.tr("Turn on lock security to restrict access when the phone is locked.") :
150 i18n.tr("Other apps and functions will prompt you to unlock.")
151 }
140 }152 }
141 }153 }
142}154}
143155
=== modified file 'plugins/security-privacy/SimPin.qml'
--- plugins/security-privacy/SimPin.qml 2015-04-01 18:25:32 +0000
+++ plugins/security-privacy/SimPin.qml 2015-07-16 14:21:51 +0000
@@ -345,96 +345,108 @@
345 }345 }
346 }346 }
347347
348 Column {348 Flickable {
349 anchors.left: parent.left349 anchors.fill: parent
350 anchors.right: parent.right350 contentHeight: contentItem.childrenRect.height
351351 boundsBehavior: (contentHeight > root.height) ?
352 Repeater {352 Flickable.DragAndOvershootBounds :
353 model: sims.length353 Flickable.StopAtBounds
354 Column {354 /* Set the direction to workaround
355 id: sim355 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
356 anchors {356 might end up in a situation where scrolling doesn't work */
357 left: parent.left357 flickableDirection: Flickable.VerticalFlick
358 right: parent.right358
359 }359 Column {
360360 anchors.left: parent.left
361 states: [361 anchors.right: parent.right
362 StateĀ {362
363 name: "locked"363 Repeater {
364 when: sims[index].simMng.pinRequired !== OfonoSimManager.NoPin364 model: sims.length
365 },365 Column {
366 StateĀ {366 id: sim
367 name: "unlocked"367 anchors {
368 when: sims[index].simMng.pinRequired === OfonoSimManager.NoPin368 left: parent.left
369 }369 right: parent.right
370 ]370 }
371371
372 Connections {372 states: [
373 target: sims[index].simMng373 StateĀ {
374 onLockedPinsChanged: {374 name: "locked"
375 simPinSwitch.checked =375 when: sims[index].simMng.pinRequired !== OfonoSimManager.NoPin
376 sims[index].simMng.lockedPins.length > 0;376 },
377 }377 StateĀ {
378 }378 name: "unlocked"
379379 when: sims[index].simMng.pinRequired === OfonoSimManager.NoPin
380 ListItem.Standard {380 }
381 text: sims[index].title381 ]
382 visible: sims.length > 1382
383 }383 Connections {
384384 target: sims[index].simMng
385 ListItem.Standard {385 onLockedPinsChanged: {
386 text: i18n.tr("SIM PIN")386 simPinSwitch.checked =
387 control: Switch {387 sims[index].simMng.lockedPins.length > 0;
388 id: simPinSwitch388 }
389 objectName: "simPinSwitch"389 }
390 checked: sims[index].simMng.lockedPins.length > 0390
391 onClicked: {391 ListItem.Standard {
392 curSim = sims[index].simMng;392 text: sims[index].title
393 PopupUtils.open(lockDialogComponent, simPinSwitch);393 visible: sims.length > 1
394 }394 }
395 }395
396 }396 ListItem.Standard {
397397 text: i18n.tr("SIM PIN")
398 ListItem.Standard {398 control: Switch {
399 id: changeControl399 id: simPinSwitch
400 visible: sim.state === "unlocked"400 objectName: "simPinSwitch"
401 text: i18n.tr("Unlocked")401 checked: sims[index].simMng.lockedPins.length > 0
402 control: Button {402 onClicked: {
403 enabled: parent.visible403 curSim = sims[index].simMng;
404 text: i18n.tr("Change PINā€¦")404 PopupUtils.open(lockDialogComponent, simPinSwitch);
405 onClicked: {405 }
406 curSim = sims[index].simMng;406 }
407 PopupUtils.open(dialogComponent);407 }
408 }408
409 }409 ListItem.Standard {
410 }410 id: changeControl
411411 visible: sim.state === "unlocked"
412 ListItem.Standard {412 text: i18n.tr("Unlocked")
413 id: lockControl413 control: Button {
414 visible: sim.state === "locked"414 enabled: parent.visible
415 text: i18n.tr("Locked")415 text: i18n.tr("Change PINā€¦")
416 control: Button {416 onClicked: {
417 objectName: "unlock"417 curSim = sims[index].simMng;
418 enabled: sims[index].simMng.pinRequired !== 'none'418 PopupUtils.open(dialogComponent);
419 text: i18n.tr("Unlockā€¦")419 }
420 color: UbuntuColors.green420 }
421 onClicked: Connectivity.unlockModem(sims[index].path)421 }
422 }422
423 }423 ListItem.Standard {
424424 id: lockControl
425 ListItem.Divider {425 visible: sim.state === "locked"
426 visible: index < (sims.length - 1)426 text: i18n.tr("Locked")
427 }427 control: Button {
428428 objectName: "unlock"
429 }429 enabled: sims[index].simMng.pinRequired !== 'none'
430 }430 text: i18n.tr("Unlockā€¦")
431431 color: UbuntuColors.green
432 ListItem.Caption {432 onClicked: Connectivity.unlockModem(sims[index].path)
433 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.")433 }
434 }434 }
435435
436 ListItem.Caption {436 ListItem.Divider {
437 text: i18n.tr("Entering an incorrect PIN repeatedly may lock the SIM permanently.")437 visible: index < (sims.length - 1)
438 }
439
440 }
441 }
442
443 ListItem.Caption {
444 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.")
445 }
446
447 ListItem.Caption {
448 text: i18n.tr("Entering an incorrect PIN repeatedly may lock the SIM permanently.")
449 }
438 }450 }
439 }451 }
440}452}
441453
=== modified file 'plugins/security-privacy/diagnostics/PageComponent.qml'
--- plugins/security-privacy/diagnostics/PageComponent.qml 2013-07-29 15:04:03 +0000
+++ plugins/security-privacy/diagnostics/PageComponent.qml 2015-07-16 14:21:51 +0000
@@ -37,11 +37,18 @@
37 }37 }
38 onReportCrashesChanged: maybeUpdate()38 onReportCrashesChanged: maybeUpdate()
39 }39 }
40
40 Flickable {41 Flickable {
41 id: scrollWidget42 id: scrollWidget
42 anchors.fill: parent43 anchors.fill: parent
43 contentHeight: contentItem.childrenRect.height44 contentHeight: contentItem.childrenRect.height
44 boundsBehavior: Flickable.StopAtBounds45 boundsBehavior: (contentHeight > root.height) ?
46 Flickable.DragAndOvershootBounds :
47 Flickable.StopAtBounds
48 /* Set the direction to workaround
49 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
50 might end up in a situation where scrolling doesn't work */
51 flickableDirection: Flickable.VerticalFlick
4552
46 Column {53 Column {
47 anchors.left: parent.left54 anchors.left: parent.left
4855
=== modified file 'plugins/wifi/NetworkDetails.qml'
--- plugins/wifi/NetworkDetails.qml 2015-01-20 14:11:24 +0000
+++ plugins/wifi/NetworkDetails.qml 2015-07-16 14:21:51 +0000
@@ -37,63 +37,76 @@
3737
38 title: i18n.tr("Network details")38 title: i18n.tr("Network details")
3939
40 Column {40 Flickable {
41
42 anchors.fill: parent41 anchors.fill: parent
4342 contentHeight: contentItem.childrenRect.height
44 ListItem.Standard {43 boundsBehavior: (contentHeight > networkDetails.height) ?
45 text: i18n.tr("Name")44 Flickable.DragAndOvershootBounds :
46 control: Label {45 Flickable.StopAtBounds
47 text: networkName46 /* Set the direction to workaround
48 }47 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
49 }48 might end up in a situation where scrolling doesn't work */
5049 flickableDirection: Flickable.VerticalFlick
51 ListItem.Standard {50
52 id: lastLabel51 Column {
53 text: i18n.tr("Last connected")52
54 control: Label {53 anchors.left: parent.left
55 id: lastField54 anchors.right: parent.right
5655
57 text: networkDetails.lastUsed.length !== 0 ?56 ListItem.Standard {
58 networkDetails.lastUsed : i18n.tr("Never")57 text: i18n.tr("Name")
59 }58 control: Label {
60 }59 text: networkName
6160 }
62 ListItem.Standard {61 }
63 id: passwordLabel62
64 text: i18n.tr("Password")63 ListItem.Standard {
65 visible: networkDetails.password.length !== 064 id: lastLabel
66 control: TextInput {65 text: i18n.tr("Last connected")
67 id: passwordField66 control: Label {
68 readOnly: true67 id: lastField
69 text: networkDetails.password68
70 echoMode: passwordVisibleSwitch.checked ?69 text: networkDetails.lastUsed.length !== 0 ?
71 TextInput.Normal : TextInput.Password70 networkDetails.lastUsed : i18n.tr("Never")
72 }71 }
73 }72 }
7473
75 ListItem.Standard {74 ListItem.Standard {
76 id: passwordVisible75 id: passwordLabel
77 text: i18n.tr("Show password")76 text: i18n.tr("Password")
78 visible: networkDetails.password.length !== 077 visible: networkDetails.password.length !== 0
79 control: Switch {78 control: TextInput {
80 id: passwordVisibleSwitch79 id: passwordField
81 }80 readOnly: true
82 }81 text: networkDetails.password
8382 echoMode: passwordVisibleSwitch.checked ?
84 ListItem.Divider {}83 TextInput.Normal : TextInput.Password
8584 }
86 Button {85 }
87 objectName: "forgetNetwork"86
88 text : i18n.tr("Forget this network")87 ListItem.Standard {
89 anchors {88 id: passwordVisible
90 left: parent.left89 text: i18n.tr("Show password")
91 right: parent.right90 visible: networkDetails.password.length !== 0
92 margins: units.gu(2)91 control: Switch {
93 }92 id: passwordVisibleSwitch
94 onClicked : {93 }
95 DbusHelper.forgetConnection(dbusPath);94 }
96 pageStack.pop();95
96 ListItem.Divider {}
97
98 Button {
99 objectName: "forgetNetwork"
100 text : i18n.tr("Forget this network")
101 anchors {
102 left: parent.left
103 right: parent.right
104 margins: units.gu(2)
105 }
106 onClicked : {
107 DbusHelper.forgetConnection(dbusPath);
108 pageStack.pop();
109 }
97 }110 }
98 }111 }
99 }112 }
100113
=== modified file 'plugins/wifi/NetworkDetailsBrief.qml'
--- plugins/wifi/NetworkDetailsBrief.qml 2015-01-20 14:11:24 +0000
+++ plugins/wifi/NetworkDetailsBrief.qml 2015-07-16 14:21:51 +0000
@@ -26,53 +26,65 @@
26import Ubuntu.SystemSettings.Wifi 1.026import Ubuntu.SystemSettings.Wifi 1.0
2727
28ItemPage {28ItemPage {
2929 id: root
30 property string networkName30 property string networkName
31 property var accessPoint31 property var accessPoint
3232
33 title: networkName33 title: networkName
3434
35 Column {35 Flickable {
36
37 anchors.fill: parent36 anchors.fill: parent
3837 contentHeight: contentItem.childrenRect.height
39 ListItem.Divider {}38 boundsBehavior: (contentHeight > root.height) ?
4039 Flickable.DragAndOvershootBounds :
41 Button {40 Flickable.StopAtBounds
42 text : i18n.tr("Forget this network")41 /* Set the direction to workaround
43 anchors {42 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
44 left: parent.left43 might end up in a situation where scrolling doesn't work */
45 right: parent.right44 flickableDirection: Flickable.VerticalFlick
46 margins: units.gu(2)45
47 }46 Column {
48 onClicked: {47
49 if (DbusHelper.forgetActiveDevice()) {48 anchors.left: parent.left
50 accessPoint.checked = false;49 anchors.right: parent.right
51 accessPoint.checkedChanged(false)50
52 }51 ListItem.Divider {}
5352
54 }53 Button {
55 }54 text : i18n.tr("Forget this network")
5655 anchors {
57 ListItem.Standard {56 left: parent.left
58 text: i18n.tr("IP address")57 right: parent.right
59 id: addressItem58 margins: units.gu(2)
60 control: TextField {59 }
61 text: DbusHelper.wifiIp4Address60 onClicked: {
62 readOnly: true61 if (DbusHelper.forgetActiveDevice()) {
63 horizontalAlignment: TextInput.AlignRight62 accessPoint.checked = false;
64 width: addressItem.width/263 accessPoint.checkedChanged(false)
65 persistentSelection: true64 }
66 font.pixelSize: units.dp(16)65 }
67 font.weight: Font.Light66 }
68 font.family: "Ubuntu"67
69 color: "#AAAAAA"68 ListItem.Standard {
70 maximumLength: 2069 text: i18n.tr("IP address")
71 focus: true70 id: addressItem
72 clip: true71 control: TextField {
73 opacity: 0.972 text: DbusHelper.wifiIp4Address
74 cursorVisible: false73 readOnly: true
75 hasClearButton: false74 horizontalAlignment: TextInput.AlignRight
75 width: addressItem.width/2
76 persistentSelection: true
77 font.pixelSize: units.dp(16)
78 font.weight: Font.Light
79 font.family: "Ubuntu"
80 color: "#AAAAAA"
81 maximumLength: 20
82 focus: true
83 clip: true
84 opacity: 0.9
85 cursorVisible: false
86 hasClearButton: false
87 }
76 }88 }
77 }89 }
78 }90 }

Subscribers

People subscribed via source and target branches