Browse Source

Merge pull request #4 from hi80482/master

Sync 200903
GNU 3 years ago
parent
commit
98b0ef91e8

+ 24 - 4
Menu/GameShell/10_Settings/PowerOFF/__init__.py

@@ -1,6 +1,7 @@
 # -*- coding: utf-8 -*- 
 
 import pygame
+import subprocess
 
 #UI lib
 from UI.constants    import RUNSYS
@@ -13,8 +14,18 @@ import config
 
 class PowerOffConfirmPage(ConfirmPage):
     
-    _ConfirmText = MyLangManager.Tr("Confirm Power OFF?")
+    _ConfirmText = MyLangManager.Tr("Awaiting Input")
+    #_FootMsg = ["Nav","Suspend","Reboot","Cancel","Shutdown"]
+    _FootMsg = ["Nav","","Reboot","Cancel","Shutdown"]
     
+    # uname -r
+    st = subprocess.check_output(["uname","-r"])
+    st = st.strip("\n")
+    st = st.strip("\t")
+
+    if "5.7" in st:
+        _FootMsg[1] = "Sleep"
+
     def CheckBattery(self):
         try:
             f = open(config.Battery)
@@ -43,7 +54,6 @@ class PowerOffConfirmPage(ConfirmPage):
     def KeyDown(self,event):
         
         if IsKeyMenuOrB(event.key):
-            
             self.ReturnToUpLevelPage()
             self._Screen.Draw()
             self._Screen.SwapAndShow()
@@ -60,8 +70,19 @@ class PowerOffConfirmPage(ConfirmPage):
             
             cmdpath += "sudo halt -p"
             pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
+            
+        if event.key == CurKeys["X"]:
+            cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("seeyou.png")
+            cmdpath += "sleep 3;"
+            cmdpath += "sudo reboot"
+            pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
 
-
+        if event.key == CurKeys["Y"]:
+            if self._FootMsg[1] != "":
+                cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("seeyou.png")
+                cmdpath += "sleep 3;"
+                cmdpath += "sudo pm-suspend"
+                pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
 
 class APIOBJ(object):
 
@@ -87,4 +108,3 @@ def Init(main_screen):
     OBJ.Init(main_screen)
 def API(main_screen):
     OBJ.API(main_screen)
-    

+ 1 - 1
Menu/GameShell/10_Settings/Sound/pages.py

@@ -9,5 +9,5 @@ def InitSoundPage(main_screen):
     myvars.SoundPage = SoundPage()
     
     myvars.SoundPage._Screen = main_screen
-    myvars.SoundPage._Name = "Sound volume"
+    myvars.SoundPage._Name = "Sound Volume"
     myvars.SoundPage.Init()

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

@@ -27,7 +27,7 @@ class ListPage(Page):
     
     _FootMsg = ["Nav","","","Back","Enter"]
     _MyList = []
-    _ListFontObj = MyLangManager.TrFont("varela15")
+    _ListFontObj = MyLangManager.TrFont("Eurostile15")
 
     _Scroller = None
     
@@ -55,7 +55,7 @@ class ListPage(Page):
                          ["","PowerOptions","Power Options"],
                          ["","Wifi","Wi-Fi"],
                          ["","Bluetooth","Bluetooth"],
-                         ["","Sound","Sound  Volume"],
+                         ["","Sound","Sound Volume"],
                          ["","Brightness","BackLight Brightness"],
                          ["","Storage",""],
                          ["","Time","Timezone"],

+ 3 - 0
load.sh

@@ -7,4 +7,7 @@ cd $BASENAME/sys.py
 # boot sound
 nohup mplayer -volume 75 /home/cpi/music/startup.mp3
 
+# set system volume
+amixer sset 'Master' 50%
+
 python run.py

+ 1 - 1
sys.py/UI/Emulator/fav_list_page.py

@@ -239,7 +239,7 @@ class FavListPage(Page):
         bgpng._ImgSurf = MyIconPool.GiveIconSurface("star")
         bgpng._MyType = ICON_TYPES["STAT"]
         bgpng._Parent = self
-        bgpng.AddLabel(MyLangManager.Tr("MyFavGames"), MyLangManager.TrFont("varela18"))
+        bgpng.AddLabel(MyLangManager.Tr("MyFavGames"), MyLangManager.TrFont("Eurostile18"))
         bgpng.SetLableColor(MySkinManager.GiveColor('Disabled'))
         bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
 

+ 1 - 3
sys.py/UI/Emulator/list_item.py

@@ -62,7 +62,7 @@ class ListItem(object):
     
     def Init(self,text):
 
-        #self._Fonts["normal"] = fonts["veramono12"]
+        #self._Fonts["normal"] = fonts["Eurostile12"]
         
         l = Label()
         l._PosX = 20
@@ -113,5 +113,3 @@ class ListItem(object):
             self._Parent._Icons["sys"].Draw()
         
         pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
-    
-

+ 1 - 1
sys.py/UI/Emulator/rom_list_page.py

@@ -273,7 +273,7 @@ class RomListPage(Page):
         bgpng._ImgSurf = MyIconPool.GiveIconSurface("empty")
         bgpng._MyType = ICON_TYPES["STAT"]
         bgpng._Parent = self
-        bgpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela22"))
+        bgpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("Eurostile22"))
         bgpng.SetLableColor(MySkinManager.GiveColor('Disabled'))
         bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
 

+ 1 - 1
sys.py/UI/Emulator/rom_so_confirm_page.py

@@ -21,7 +21,7 @@ from UI.lang_manager import MyLangManager
 import config
 
 class RomSoConfirmPage(ConfirmPage):
-    _ListFont = MyLangManager.TrFont("veramono18")
+    _ListFont = MyLangManager.TrFont("Eurostile15")
 
     _ConfirmText = MyLangManager.Tr("SetupGameEngineAutoQ")
 

+ 1 - 1
sys.py/config.py

@@ -17,7 +17,7 @@ MPD_socket = "/tmp/mpd.socket"
 #UPDATE_URL="https://raw.githubusercontent.com/clockworkpi/CPI_DEOT/master/version.json"
 UPDATE_URL="https://raw.githubusercontent.com/hi80482/launcher_deot/master/version.json"
 
-VERSION="D.E.O.T. v2+ 200626"
+VERSION="D.E.O.T. v2+ 200903"
 
 SKIN=None
 

+ 1 - 5
sys.py/langs/04_正體中文.ini

@@ -19,7 +19,7 @@ Airplane Mode=飛航模式
 Power Options=電源計畫
 Wi-Fi=無線網路
 Bluetooth=藍牙
-Sound  Volume=音量
+Sound Volume=音量
 BackLight Brightness=背光亮度
 Storage=記憶卡
 Timezone=時區
@@ -101,10 +101,6 @@ Forget=略過
 Forgeting=略過此裝置...
 Device paired=裝置已配對
 
-#音量
-Sound Volume=音量
-Sound volume=音量
-
 #背光亮度
 Brightness=背光亮度
 

+ 0 - 0
sys.py/patches/mame2003_plus_libretro.so.zip/Run.sh → sys.py/patches/.mame2003_plus_libretro.so.zip/Run.sh


+ 1 - 1
update.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-cd /home/cpi/launcher || exit 
+cd /home/cpi/launcher || exit
 feh --bg-center /home/cpi/launcher/sys.py/gameshell/wallpaper/updating.png
 git pull
 git reset --hard "$1"

+ 2 - 2
version.json

@@ -1,4 +1,4 @@
 {
-  "gitversion":"d89f523",
-  "version":"200626"
+  "gitversion":"bb15dce",
+  "version":"200903"
 }