diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2016-01-23 15:55:35 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2016-01-23 15:56:07 +0100 |
commit | afde0983df2248be32092e3872aa65181f5fc3c2 (patch) | |
tree | 613bb0d4aa18bac5667bc835b6fac40539a69801 | |
parent | gui: add language selection to several pages (diff) | |
download | android_bootable_recovery-afde0983df2248be32092e3872aa65181f5fc3c2.tar android_bootable_recovery-afde0983df2248be32092e3872aa65181f5fc3c2.tar.gz android_bootable_recovery-afde0983df2248be32092e3872aa65181f5fc3c2.tar.bz2 android_bootable_recovery-afde0983df2248be32092e3872aa65181f5fc3c2.tar.lz android_bootable_recovery-afde0983df2248be32092e3872aa65181f5fc3c2.tar.xz android_bootable_recovery-afde0983df2248be32092e3872aa65181f5fc3c2.tar.zst android_bootable_recovery-afde0983df2248be32092e3872aa65181f5fc3c2.zip |
Diffstat (limited to '')
-rw-r--r-- | gui/gui.cpp | 6 | ||||
-rw-r--r-- | gui/pages.cpp | 4 | ||||
-rw-r--r-- | gui/pages.hpp | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/gui/gui.cpp b/gui/gui.cpp index 08178fc17..d99764aea 100644 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -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) diff --git a/gui/pages.cpp b/gui/pages.cpp index ddf53a92c..def262998 100644 --- a/gui/pages.cpp +++ b/gui/pages.cpp @@ -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); diff --git a/gui/pages.hpp b/gui/pages.hpp index b2f25801f..bb521c1d2 100644 --- a/gui/pages.hpp +++ b/gui/pages.hpp @@ -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); |