Merge pull request #7 from cuu/master

switching status wallpaper during updating,remove confirmation while …
This commit is contained in:
clockworkpi 2018-05-28 13:26:02 +08:00 committed by GitHub
commit f0e75a522e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 11 deletions

View File

@ -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)

View File

@ -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

View File

@ -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):

View File

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

View File

@ -383,12 +383,23 @@ 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._Screen.Draw()
#self._Screen.SwapAndShow()
"""
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)
#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()