@@ -26,7 +26,6 @@ LocalComponents.Page {
26 title: i18n.tr("Country")
26 title: i18n.tr("Country")
27 forwardButtonSourceComponent: forwardButton
27 forwardButtonSourceComponent: forwardButton
29− property string selectedCountry: ""
30 readonly property var preferedCountries: LocalePlugin.countriesForLanguage(root.language)
29 readonly property var preferedCountries: LocalePlugin.countriesForLanguage(root.language)
32 Component.onCompleted: {
31 Component.onCompleted: {
@@ -63,8 +62,10 @@ LocalComponents.Page {
64 function selectCountry(code, index)
63 function selectCountry(code, index)
66− selectedCountry = code
65+ root.country = code
67 regionsListView.currentIndex = index
66 regionsListView.currentIndex = index
67+ print("Selected country: " + root.country)
68+ print("Current index: " + regionsListView.currentIndex)
70 UbuntuLanguagePlugin {
71 UbuntuLanguagePlugin {
@@ -143,8 +144,6 @@ LocalComponents.Page {
144 onClicked: {
145 onClicked: {
145 selectCountry(code, index)
146 selectCountry(code, index)
146− print("Selected country: " + selectedCountry)
147− print("Current index: " + ListView.view.currentIndex)
@@ -154,11 +153,11 @@ LocalComponents.Page {
154 id: forwardButton
153 id: forwardButton
155 LocalComponents.StackButton {
154 LocalComponents.StackButton {
156 text: i18n.tr("Next")
155 text: i18n.tr("Next")
157− enabled: selectedCountry !== ""
156+ enabled: root.country !== ""
158 onClicked: {
157 onClicked: {
159 if (root.language !== plugin.languageCodes[plugin.currentLanguage]) {
158 if (root.language !== plugin.languageCodes[plugin.currentLanguage]) {
160 plugin.currentLanguage = plugin.languageCodes.indexOf(root.language)
159 plugin.currentLanguage = plugin.languageCodes.indexOf(root.language)
161− System.updateSessionLanguage(root.language + "_" + selectedCountry); // also updates the locale
160+ System.updateSessionLanguage(root.language + "_" + root.country); // also updates the locale
163 pageStack.next()
162 pageStack.next()