Esempio n. 1
0
 def _save_current_theme(self):
     # identify element theme to find in CRT config
     p_sIni = "h_theme"
     if self.iCurSide != 0:
         p_sIni = "v_theme"
     # get current saved theme for current side
     p_sTheme = ini_get(CRT_UTILITY_FILE, p_sIni)
     p_sCurTheme = get_xml_value_esconfig("ThemeSet")
     if p_sTheme != p_sCurTheme:
         ini_set(CRT_UTILITY_FILE, p_sIni, p_sCurTheme)
Esempio n. 2
0
 def opt3_datas(self):
     p_lLines = {
         'text': "ES ScreenSaver",
         'options': ["Black", "Dim", "Random Video", "Slideshow"],
         'color_val': "type_color_1",
         'es_restart': True
     }
     value = get_xml_value_esconfig("ScreenSaverBehavior").title()
     p_lLines.update({'value': value})
     return p_lLines
Esempio n. 3
0
 def opt6_datas(self):
     p_lLines = {
         'text': "ES Use OMX Player",
         'color_val': "type_color_1",
         'es_restart': True
     }
     value = get_xml_value_esconfig("VideoOmxPlayer")
     if value.lower() == "true": value = True
     else: value = False
     p_lLines.update({'value': value})
     return p_lLines
Esempio n. 4
0
 def opt5_datas(self):
     p_lLines = {
         'text': "ES ScreenSaver After",
         'es_restart': True,
         'color_val': "type_color_1"
     }
     options = []
     for i in range(0, 31):
         options.append(str(i) + "m")
     p_lLines.update({'options': options})
     value = get_xml_value_esconfig("ScreenSaverTime")
     p_lLines.update({'value': str(int(int(value) / 60000)) + "m"})
     return p_lLines
Esempio n. 5
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)