From 0d47eb5686d60003759d93165fcadb5f3dfb6b6a Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 9 Jan 2015 11:23:19 -0600 Subject: Improve GUI handling of zip flashing - change the page sooner so that users cannot activate the slider twice - improve GUI messaging if a zip requests a cache wipe - move update of the file count to the end so it is less visible to the user (e.g. during a cache wipe the counter should not read 0) Change-Id: I5d478f07effe61ca37f3521a77c9e9243a9cb692 --- gui/action.cpp | 20 +++++++++----------- gui/objects.hpp | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/gui/action.cpp b/gui/action.cpp index 96f620957..953439906 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -325,7 +325,7 @@ void GUIAction::simulate_progress_bar(void) } } -int GUIAction::flash_zip(std::string filename, std::string pageName, int* wipe_cache) +int GUIAction::flash_zip(std::string filename, int* wipe_cache) { int ret_val = 0; @@ -337,15 +337,9 @@ int GUIAction::flash_zip(std::string filename, std::string pageName, int* wipe_c return -1; } - // We're going to jump to this page first, like a loading page - gui_changePage(pageName); - if (!PartitionManager.Mount_By_Path(filename, true)) return -1; - // TODO: why again? - gui_changePage(pageName); - if (simulate) { simulate_progress_bar(); } else { @@ -944,29 +938,33 @@ void GUIAction::reinject_after_flash() int GUIAction::flash(std::string arg) { int i, ret_val = 0, wipe_cache = 0; + // We're going to jump to this page first, like a loading page + gui_changePage(arg); for (i=0; i