on xenial help sign in
fix white-on-white text, delay the language page init after the animation

fixes long UbuntuLanguagePlugin and modem init sequence

commitf990f148ba7de3697ecf96b501143e0cb996f489 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateFri 27 Nov 2015, 01:44 (11 years ago) parenta6e81c3
3 files changed+5−24
qml/Wizard/Pages/10-language.qml+2−21 qml/Wizard/Pages/passcode-confirm.qml+2−2 qml/Wizard/Pages/passcode-set.qml+1−1
qml/Wizard/Pages/10-language.qml+2−21
@@ -31,25 +31,6 @@ LocalComponents.Page {
3131 id: plugin
3232 }
3333
34− Component.onCompleted: {
35− if (!modemManager.available) { // don't wait for the modem if it's not there
36− print("== Modem manager not available, init language manually")
37− init();
38− }
39− }
40−
41− Connections {
42− target: modemManager
43− onGotSimCardChanged: {
44− print("== Got a usable SIM card, init language page");
45−// print("SIM 1 languages:", simManager0.preferredLanguages);
46−// print("SIM 1 country:", LocalePlugin.mccToCountryCode(simManager0.mobileCountryCode));
47−// print("SIM 2 languages:", simManager1.preferredLanguages);
48−// print("SIM 2 country:", LocalePlugin.mccToCountryCode(simManager1.mobileCountryCode));
49− init();
50− }
51− }
52−
5334 function init()
5435 {
5536 var detectedLang = "";
@@ -61,7 +42,7 @@ LocalComponents.Page {
6142 detectedLang = simManager1.preferredLanguages[0] + "_" + LocalePlugin.mccToCountryCode(simManager1.mobileCountryCode);
6243 print("SIM 1 detected lang:", detectedLang);
6344 } else if (plugin.currentLanguage != -1) {
64− detectedLang = plugin.languageCodes[plugin.currentLanguage];
45+ detectedLang = plugin.languageCodes[plugin.currentLanguage].split(".")[0]; // remove the encoding part, after dot (en_US.utf8 -> en_US)
6546 print("Using current language", detectedLang, "as default");
6647 } else {
6748 print("No lang detected, falling back to default (en_US)");
@@ -109,6 +90,7 @@ LocalComponents.Page {
10990 from: 1
11091 to: 0
11192 }
93+ onStopped: init();
11294 }
11395
11496 Column {
@@ -119,7 +101,6 @@ LocalComponents.Page {
119101 id: languagesListView
120102 boundsBehavior: Flickable.StopAtBounds
121103 clip: true
122− currentIndex: plugin.currentLanguage
123104 snapMode: ListView.SnapToItem
124105
125106 anchors {
qml/Wizard/Pages/passcode-confirm.qml+2−2
@@ -58,9 +58,9 @@ LocalComponents.Page {
5858
5959 onEntered: {
6060 if (passphrase === root.password) {
61− confirmTimer.start()
61+ confirmTimer.start();
6262 } else {
63− clear(true)
63+ clear(true);
6464 }
6565 }
6666
qml/Wizard/Pages/passcode-set.qml+1−1
@@ -75,7 +75,7 @@ LocalComponents.Page {
7575 if (passphrase.length >= 4) {
7676 passcodeSetPage.confirm();
7777 } else {
78− lockscreen.clear(true)
78+ lockscreen.clear(true);
7979 }
8080 }
8181 }