Browse Source

add _Closed in main_screen

cuu 5 years ago
parent
commit
048e8aedcb
3 changed files with 9 additions and 2 deletions
  1. 6 0
      sys.py/UI/main_screen.py
  2. 1 1
      sys.py/config.py
  3. 2 1
      sys.py/run.py

+ 6 - 0
sys.py/UI/main_screen.py

@@ -137,6 +137,7 @@ class MainScreen(object):
     _IconFont    = fonts["varela15"]
     _SkinManager = None
 
+    _Closed      = False
     _CounterScreen = None
     
     def __init__(self):
@@ -349,6 +350,8 @@ class MainScreen(object):
         self._CanvasHWND.fill((255,255,255))
         
     def SwapAndShow(self):
+        if self._Closed == True:
+            return
         if self._HWND != None:
             self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width,self._Height))
             pygame.display.update()
@@ -557,6 +560,9 @@ class MainScreen(object):
         self._MsgBox.Draw()
     
     def Draw(self):
+        if self._Closed == True:
+            return
+        
         self._CurrentPage.Draw()
         #if self._HWND != None:
         #    self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width,self._Height))

+ 1 - 1
sys.py/config.py

@@ -12,7 +12,7 @@ MPD_socket = "/tmp/mpd.socket"
 
 UPDATE_URL="https://raw.githubusercontent.com/clockworkpi/CPI/master/launcher_ver.json"
 
-VERSION="stable 1.0"
+VERSION="stable 1.1"
 
 SKIN="default"
 

+ 2 - 1
sys.py/run.py

@@ -119,6 +119,7 @@ def RestoreLastBackLightBrightness(main_screen):
 
     passout_time_stage = 0
     main_screen._TitleBar._InLowBackLight = -1
+    main_screen._Closed = True
     
     if gobject_flash_led1 != -1:
         gobject.source_remove(gobject_flash_led1)
@@ -220,7 +221,7 @@ def InspectionTeam(main_screen):
 
         
         main_screen._TitleBar._InLowBackLight = 0
-
+        main_screen._Closed = True
         if time_3 != 0:
             passout_time_stage = 2 # next