Explorar o código

switching status wallpaper during updating,remove confirmation while deleting in game favourite list

cuu %!s(int64=6) %!d(string=hai) anos
pai
achega
d131352291

+ 2 - 1
Menu/GameShell/10_Settings/Storage/__init__.py

@@ -28,6 +28,7 @@ class StoragePage(Page):
     _DskUsg   = None
 
     _HighColor = pygame.Color(51,166,255)
+    _FootMsg    = ["Nav.","","","Back",""]
     
     def __init__(self):
         Page.__init__(self)
@@ -97,7 +98,7 @@ class StoragePage(Page):
 
         rect_ = midRect(self._Width/2,self._Height-30,170,17, Width,Height)
 
-        aa_round_rect(self._CanvasHWND,rect_, (238,238,238),5,0,(238,238,238))
+        aa_round_rect(self._CanvasHWND,rect_, (193,193,193),5,0,(193,193,193))
 
         
         rect2 = midRect(self._Width/2,self._Height-30,int(170*(1.0-usage_percent)),17, Width,Height)

+ 1 - 1
Menu/GameShell/10_Settings/Update/__init__.py

@@ -111,7 +111,7 @@ class UpdateConfirmPage(ConfirmPage):
             
         if event.key == CurKeys["B"]:
             if self._GIT == True:
-                cmdpath = "cd /home/cpi/apps/launcher ;git pull; git reset --hard %s " % self._Version
+                cmdpath = "feh --bg-center /home/cpi/apps/launcher/sys.py/gameshell/wallpaper/updating.png; cd /home/cpi/apps/launcher ;git pull; git reset --hard %s ; feh --bg-center /home/cpi/apps/launcher/sys.py/gameshell/wallpaper/loading.png " % self._Version
                 pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath))
                 self._GIT = False
                 return

+ 1 - 1
Menu/GameShell/10_Settings/Wifi/keyboard.py

@@ -52,7 +52,7 @@ class KeyboardSelector(PageSelector):
         if rect.width <=0 or rect.height <= 0 :
             return
 
-        aa_round_rect(self._Parent._CanvasHWND,rect, (126,206,244),4,1,(255,255,255))
+        aa_round_rect(self._Parent._CanvasHWND,rect, (126,206,244),3,0,(126,206,244))
 #        pygame.draw.rect(self._Parent._CanvasHWND,(0,0,0),rect,1)
 
 class Keyboard(Page):

+ 1 - 1
Menu/GameShell/10_Settings/list_page.py

@@ -82,7 +82,7 @@ class ListPage(Page):
                          ["","Storage",""],
                          ["","Update", ""],
                          ["","About",  "About"],
-                         ["","PowerOFF","PowerOFF"]]
+                         ["","PowerOFF","Power off"]]
 
         start_x  = 0
         start_y  = 0

+ 18 - 7
sys.py/UI/Emulator/fav_list_page.py

@@ -383,15 +383,26 @@ class FavListPage(Page):
             
             cur_li = self._MyList[self._PsIndex]
             if cur_li.IsFile():
-                
-                self._Parent.FavDeleteConfirmPage.SetFileName(cur_li._Path)
-                self._Parent.FavDeleteConfirmPage.SetTrashDir(self._Emulator["ROM"])## Fav delete,return to ROM dir,not .Trash
-                
-                self._Screen.PushCurPage()
-                self._Screen.SetCurPage(self._Parent.FavDeleteConfirmPage)
+                """
+                #self._Parent.FavDeleteConfirmPage.SetFileName(cur_li._Path)
+                #self._Parent.FavDeleteConfirmPage.SetTrashDir(self._Emulator["ROM"])## Fav delete,return to ROM dir,not .Trash
+                #self._Screen.PushCurPage()
+                #self._Screen.SetCurPage(self._Parent.FavDeleteConfirmPage)
+                #self._Screen.Draw()
+                #self._Screen.SwapAndShow()
+                """
+
+                #delete directly without confirm dialog
+                stats = os.stat(cur_li._Path)
+                os.chown(self._FileName, stats.st_uid,stats.st_uid) ## normally uid and gid should be the same 
+                self._Screen._MsgBox.SetText("Deleting...")
+                self._Screen._MsgBox.Draw()
+                self._Screen.SwapAndShow()
+                pygame.time.delay(600)
+                self.ReScan()                    
                 self._Screen.Draw()
                 self._Screen.SwapAndShow()
-            
+                
     def Draw(self):
         self.ClearCanvas()