mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-12 17:58:50 +01:00
Merge pull request #7 from cuu/master
switching status wallpaper during updating,remove confirmation while …
This commit is contained in:
commit
f0e75a522e
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -82,7 +82,7 @@ class ListPage(Page):
|
||||
["","Storage",""],
|
||||
["","Update", ""],
|
||||
["","About", "About"],
|
||||
["","PowerOFF","PowerOFF"]]
|
||||
["","PowerOFF","Power off"]]
|
||||
|
||||
start_x = 0
|
||||
start_y = 0
|
||||
|
||||
@ -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()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user