on xenial help sign in
fix white-on-white text, delay the language page init after the animation
f990f14Lukáš Tinkl
qml/Wizard/Pages/10-language.qml+2−21
@@ -31,25 +31,6 @@ LocalComponents.Page {
31 id: plugin
31 id: plugin
32 }
32 }
33
33
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−
53 function init()
34 function init()
54 {
35 {
55 var detectedLang = "";
36 var detectedLang = "";
@@ -61,7 +42,7 @@ LocalComponents.Page {
61 detectedLang = simManager1.preferredLanguages[0] + "_" + LocalePlugin.mccToCountryCode(simManager1.mobileCountryCode);
42 detectedLang = simManager1.preferredLanguages[0] + "_" + LocalePlugin.mccToCountryCode(simManager1.mobileCountryCode);
62 print("SIM 1 detected lang:", detectedLang);
43 print("SIM 1 detected lang:", detectedLang);
63 } else if (plugin.currentLanguage != -1) {
44 } 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)
65 print("Using current language", detectedLang, "as default");
46 print("Using current language", detectedLang, "as default");
66 } else {
47 } else {
67 print("No lang detected, falling back to default (en_US)");
48 print("No lang detected, falling back to default (en_US)");
@@ -109,6 +90,7 @@ LocalComponents.Page {
109 from: 1
90 from: 1
110 to: 0
91 to: 0
111 }
92 }
93+ onStopped: init();
112 }
94 }
113
95
114 Column {
96 Column {
@@ -119,7 +101,6 @@ LocalComponents.Page {
119 id: languagesListView
101 id: languagesListView
120 boundsBehavior: Flickable.StopAtBounds
102 boundsBehavior: Flickable.StopAtBounds
121 clip: true
103 clip: true
122− currentIndex: plugin.currentLanguage
123 snapMode: ListView.SnapToItem
104 snapMode: ListView.SnapToItem
124
105
125 anchors {
106 anchors {
qml/Wizard/Pages/passcode-confirm.qml+2−2
@@ -58,9 +58,9 @@ LocalComponents.Page {
58
58
59 onEntered: {
59 onEntered: {
60 if (passphrase === root.password) {
60 if (passphrase === root.password) {
61− confirmTimer.start()
61+ confirmTimer.start();
62 } else {
62 } else {
63− clear(true)
63+ clear(true);
64 }
64 }
65 }
65 }
66
66
qml/Wizard/Pages/passcode-set.qml+1−1
@@ -75,7 +75,7 @@ LocalComponents.Page {
75 if (passphrase.length >= 4) {
75 if (passphrase.length >= 4) {
76 passcodeSetPage.confirm();
76 passcodeSetPage.confirm();
77 } else {
77 } else {
78− lockscreen.clear(true)
78+ lockscreen.clear(true);
79 }
79 }
80 }
80 }
81 }
81 }