diff --git a/Menu/GameShell/21_Warehouse/__init__.py b/Menu/GameShell/21_Warehouse/__init__.py index fb4638f..0009c1a 100644 --- a/Menu/GameShell/21_Warehouse/__init__.py +++ b/Menu/GameShell/21_Warehouse/__init__.py @@ -817,7 +817,7 @@ class GameStorePage(Page): self._FootMsg[2] = "Remove" self._FootMsg[1] = "UpdateWare" else: - self._FootMsg[2] = "Up" + self._FootMsg[2] = "" self._FootMsg[1] = "" self.SyncList() @@ -831,9 +831,24 @@ class GameStorePage(Page): """ def KeyDown(self,event): if IsKeyMenuOrB(event.key): - self.ReturnToUpLevelPage() - self._Screen.Draw() - self._Screen.SwapAndShow() + + if self._MyStack.Length() > 1: + self._MyStack.Pop() + if self._MyStack.Length() == 1: + self._FootMsg[2] = "Remove" + self._FootMsg[1] = "UpdateWare" + else: + self._FootMsg[2] = "" + self._FootMsg[1] = "Preview" + + self.SyncList() + self._Screen.Draw() + self._Screen.SwapAndShow() + + elif self._MyStack.Length() == 1: + self.ReturnToUpLevelPage() + self._Screen.Draw() + self._Screen.SwapAndShow() if IsKeyStartOrA(event.key): self.Click() @@ -842,7 +857,7 @@ class GameStorePage(Page): self._FootMsg[2] = "Remove" self._FootMsg[1] = "UpdateWare" else: - self._FootMsg[2] = "Up" + self._FootMsg[2] = "" self._FootMsg[1] = "Preview" self._Screen.Draw() @@ -858,6 +873,7 @@ class GameStorePage(Page): self._Screen.SwapAndShow() return + """ if self._MyStack.Length() > 1: self._MyStack.Pop() if self._MyStack.Length() == 1: @@ -866,6 +882,7 @@ class GameStorePage(Page): else: self._FootMsg[2] = "Up" self._FootMsg[1] = "Preview" + """ self.SyncList() self._Screen.Draw() diff --git a/sys.py/UI/title_bar.py b/sys.py/UI/title_bar.py index 14a8894..0fb6ab0 100644 --- a/sys.py/UI/title_bar.py +++ b/sys.py/UI/title_bar.py @@ -183,11 +183,11 @@ class TitleBar(Widget): self._Icons["battery_charging"]._IconIndex = cap_ge self._Icons["battery"] = self._Icons["battery_charging"] - print("Charging %d" % cap_ge) + #print("Charging %d" % cap_ge) else: self._Icons["battery_discharging"]._IconIndex = cap_ge self._Icons["battery"] = self._Icons["battery_discharging"] - print("Discharging %d" % cap_ge) + #print("Discharging %d" % cap_ge) return True diff --git a/sys.py/run.py b/sys.py/run.py index e4e30ed..fba0f89 100644 --- a/sys.py/run.py +++ b/sys.py/run.py @@ -163,11 +163,9 @@ def RestoreLastBackLightBrightness(main_screen): f.seek(0) f.write(str( last_brt )) f.truncate() - f.close() - last_brt = -1 - else: - f.close() + f.close() + last_brt = -1 try: f = open("/proc/driver/led1","w") except IOError: @@ -198,7 +196,6 @@ def InspectionTeam(main_screen): if cur_time - everytime_keydown > time_1 and passout_time_stage == 0: print("timeout, dim screen %d" % int(cur_time - everytime_keydown)) - try: f = open(config.BackLight,"r+") except IOError: @@ -226,7 +223,6 @@ def InspectionTeam(main_screen): elif cur_time - everytime_keydown > time_2 and passout_time_stage == 1: print("timeout, close screen %d" % int(cur_time - everytime_keydown)) - try: f = open(config.BackLight,"r+") except IOError: