Update mStartPage to make language selection work on other pages
We should offer language selection on any start page such as decrypt or system read only. However, if the mStartPage variable was not being updated properly so selecting a different language was dumping the user back on either the decrypt prompt or the system read only page. This patch set fixes the problem and places the user back on the proper page when they choose a new language. Change-Id: I5153d3b9525d8c93d3863f4b17ecf55b5209e3c7
This commit is contained in:
@@ -613,8 +613,10 @@ static int runPages(const char *page_name, const int stop_on_page_done)
|
||||
DataManager::SetValue("tw_page_done", 0);
|
||||
DataManager::SetValue("tw_gui_done", 0);
|
||||
|
||||
if (page_name)
|
||||
if (page_name) {
|
||||
PageManager::SetStartPage(page_name);
|
||||
gui_changePage(page_name);
|
||||
}
|
||||
|
||||
// Raise the curtain
|
||||
if (gCurtain != NULL)
|
||||
@@ -945,7 +947,7 @@ error:
|
||||
|
||||
extern "C" int gui_start(void)
|
||||
{
|
||||
return gui_startPage(NULL, 1, 0);
|
||||
return gui_startPage("main", 1, 0);
|
||||
}
|
||||
|
||||
extern "C" int gui_startPage(const char *page_name, const int allow_commands, int stop_on_page_done)
|
||||
|
||||
@@ -1565,6 +1565,10 @@ void PageManager::RequestReload() {
|
||||
mReloadTheme = true;
|
||||
}
|
||||
|
||||
void PageManager::SetStartPage(const std::string& page_name) {
|
||||
mStartPage = page_name;
|
||||
}
|
||||
|
||||
int PageManager::ChangePage(std::string name)
|
||||
{
|
||||
DataManager::SetValue("tw_operation_state", 0);
|
||||
|
||||
@@ -140,6 +140,7 @@ public:
|
||||
static void ReleasePackage(std::string name);
|
||||
static int RunReload();
|
||||
static void RequestReload();
|
||||
static void SetStartPage(const std::string& page_name);
|
||||
|
||||
// Used for actions and pages
|
||||
static int ChangePage(std::string name);
|
||||
|
||||
Reference in New Issue
Block a user