Ejemplo n.º 1
0
    def _set_new_theme(self):
        """ 
        Identify saved theme for next orientation in utility.cfg
        If theme not found, default ones will be applied.        
        """
        p_sTheme = None
        p_sTail = self.sTailSideH

        if self.iCurSide != 0:
            p_sTail = self.sTailSideV
        p_sIniTheme = str(self.iToRes) + p_sTail
        p_sTheme = ini_get(CRT_UTILITY_FILE, p_sIniTheme)
        """ If theme was not found then apply by default """
        # by default vertical theme
        if self.iCurSide != 0 and not p_sTheme:
            if self.RES_Y == 270: p_sTheme = "V270P-CRT-BASE"
            elif self.RES_Y == 240: p_sTheme = "V270P-CRT-BASE"
            else: p_sTheme = "V270P-CRT-BASE"
        # by default horizontal theme
        elif self.iCurSide == 0 and not p_sTheme:
            if self.RES_Y == 270: p_sTheme = "270P-CRT-SNES-MINI"
            elif self.RES_Y == 240: p_sTheme = "240P-CRT-BUBBLEGUM"
            else: p_sTheme = "270P-CRT-BASE"
        # no change if current configuration is the same
        if p_sTheme != get_xml_value_esconfig("ThemeSet"):
            set_xml_value_esconfig("ThemeSet", p_sTheme)
Ejemplo n.º 2
0
 def opt6(self, p_iJoy=None, p_iLine=None):
     p_lLines = {}
     if p_iJoy == None:
         return self.opt6_datas()
     if p_iJoy & CRT_OK:
         list = self.m_lLines[p_iLine]['options']
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value, list)
         if new == False: set_xml_value_esconfig("VideoOmxPlayer", "false")
         elif new == True: set_xml_value_esconfig("VideoOmxPlayer", "true")
         self.m_lLines[p_iLine].update({'value': new})
Ejemplo n.º 3
0
 def opt3(self, p_iJoy=None, p_iLine=None):
     p_lLines = {}
     if p_iJoy == None:
         return self.opt3_datas()
     if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT:
         list = self.m_lLines[p_iLine]['options']
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value, list)
         if new:
             value = new.lower()
             set_xml_value_esconfig("ScreenSaverBehavior", value)
             self.m_lLines[p_iLine].update({'value': new})
Ejemplo n.º 4
0
 def opt7(self, p_iJoy=None, p_iLine=None):
     p_lLines = {}
     if p_iJoy == None:
         return self.opt7_datas()
     if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT:
         list = self.m_lLines[p_iLine]['options']
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value, list)
         if new:
             self.info("Please Wait," "icon_clock")
             set_xml_value_esconfig("ThemeSet", new)
             value = get_xml_value_esconfig("ThemeSet")
             self.m_lLines[p_iLine].update({'value': value})
             self.info()
Ejemplo n.º 5
0
 def opt7_datas(self):
     p_lLines = {
         'text': "ES Theme",
         'color_val': "type_color_1",
         'es_restart': True
     }
     list = get_themes()
     if not list:
         p_lLines.update({'options': None})
         p_lLines.update({'value': "Updating..."})
     else:
         value = get_xml_value_esconfig("ThemeSet")
         if not value in list: list.append(value)
         set_xml_value_esconfig("ThemeSet", value)
         p_lLines.update({'options': list})
         p_lLines.update({'value': value})
     return p_lLines
Ejemplo n.º 6
0
 def opt5(self, p_iJoy=None, p_iLine=None):
     p_lLines = {}
     if p_iJoy == None:
         return self.opt5_datas()
     if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT:
         list = self.m_lLines[p_iLine]['options']
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value, list)
         if new:
             value = new.replace('m', '')
             value = str(int(value) * 60000)
             set_xml_value_esconfig("ScreenSaverTime", value)
             self.m_lLines[p_iLine].update({'value': new})
             if int(value) == 0:
                 self.info([
                     "Long exposure to a", "static image could",
                     "damage your CRT"
                 ], "icon_info")
                 time.sleep(2)
                 self.info()
Ejemplo n.º 7
0
    def _set_new_theme(self):
        """
        Identify saved theme for next orientation in utility.cfg
        If theme not found, default ones will be applied.
        """
        #p_sTheme = None

        p_sIni = "h_theme"
        if self.iToMode != 0:
            p_sIni = "v_theme"
        p_sTheme = ini_get(CRT_UTILITY_FILE, p_sIni)
        """ If theme was not found then apply by default """
        # by default vertical theme
        if self.iToMode != 0 and not p_sTheme:
            p_sTheme = "UniFlyered-Dark"
        # by default horizontal theme
        elif self.iToMode == 0 and not p_sTheme:
            p_sTheme = "UniFlyered-Color"
        # no change if current configuration is the same
        if p_sTheme != get_xml_value_esconfig("ThemeSet"):
            set_xml_value_esconfig("ThemeSet", p_sTheme)