Пример #1
0
def InitSetupDevices():
    def timezoneNotifier(configElement):
        timezones.activateTimezone(configElement.index)

    config.timezone = ConfigSubsection()
    config.timezone.val = ConfigSelection(
        default=timezones.getDefaultTimezone(),
        choices=timezones.getTimezoneList())
    config.timezone.val.addNotifier(timezoneNotifier)

    def keyboardNotifier(configElement):
        keyboard.activateKeyboardMap(configElement.index)

    config.keyboard = ConfigSubsection()
    config.keyboard.keymap = ConfigSelection(
        default=keyboard.getDefaultKeyboardMap(),
        choices=keyboard.getKeyboardMaplist())
    config.keyboard.keymap.addNotifier(keyboardNotifier)

    def languageNotifier(configElement):
        language.activateLanguage(configElement.value)

    config.osd = ConfigSubsection()
    config.osd.language = ConfigText(default='it_IT')
    config.osd.language.addNotifier(languageNotifier)
    config.parental = ConfigSubsection()
    config.parental.lock = ConfigOnOff(default=False)
    config.parental.setuplock = ConfigOnOff(default=False)
    config.expert = ConfigSubsection()
    config.expert.satpos = ConfigOnOff(default=True)
    config.expert.fastzap = ConfigOnOff(default=True)
    config.expert.skipconfirm = ConfigOnOff(default=False)
    config.expert.hideerrors = ConfigOnOff(default=False)
    config.expert.autoinfo = ConfigOnOff(default=True)
Пример #2
0
def InitSetupDevices():
    def timezoneNotifier(configElement):
        timezones.activateTimezone(configElement.index)

    config.timezone = ConfigSubsection()
    config.timezone.val = ConfigSelection(
        default=timezones.getDefaultTimezone(),
        choices=timezones.getTimezoneList())
    config.timezone.val.addNotifier(timezoneNotifier)

    def keyboardNotifier(configElement):
        keyboard.activateKeyboardMap(configElement.index)

    config.keyboard = ConfigSubsection()
    config.keyboard.keymap = ConfigSelection(
        default=keyboard.getDefaultKeyboardMap(),
        choices=keyboard.getKeyboardMaplist())
    config.keyboard.keymap.addNotifier(keyboardNotifier)

    def languageNotifier(configElement):
        language.activateLanguage(configElement.value)

    config.osd = ConfigSubsection()
    if getMachineBrand() in ('Vimastec'):
        config.osd.language = ConfigText(default="fr_FR")
    elif getMachineBrand() in ('Zgemma',
                               'Beyonwiz') or getBrandOEM() in ('airdigital'):
        config.osd.language = ConfigText(default="en_US")
    else:
        config.osd.language = ConfigText(default="de_DE")
    config.osd.language.addNotifier(languageNotifier)

    config.parental = ConfigSubsection()
    config.parental.lock = ConfigOnOff(default=False)
    config.parental.setuplock = ConfigOnOff(default=False)

    config.expert = ConfigSubsection()
    config.expert.satpos = ConfigOnOff(default=True)
    config.expert.fastzap = ConfigOnOff(default=True)
    config.expert.skipconfirm = ConfigOnOff(default=False)
    config.expert.hideerrors = ConfigOnOff(default=False)
    config.expert.autoinfo = ConfigOnOff(default=True)
Пример #3
0
def InitSetupDevices():

	def timezoneNotifier(configElement):
		timezones.activateTimezone(configElement.index)

	config.timezone = ConfigSubsection();
	config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList())
	config.timezone.val.addNotifier(timezoneNotifier)

	def keyboardNotifier(configElement):
		keyboard.activateKeyboardMap(configElement.index)

	config.keyboard = ConfigSubsection();
	config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist())
	config.keyboard.keymap.addNotifier(keyboardNotifier)

	def languageNotifier(configElement):
		language.activateLanguage(configElement.value)

	config.osd = ConfigSubsection()
	config.osd.language = ConfigText(default = "es_ES");
	config.osd.language.addNotifier(languageNotifier)

	config.parental = ConfigSubsection();
	config.parental.lock = ConfigOnOff(default = False)
	config.parental.setuplock = ConfigOnOff(default = False)

	config.expert = ConfigSubsection();
	config.expert.satpos = ConfigOnOff(default = True)
	config.expert.fastzap = ConfigOnOff(default = True)
	config.expert.skipconfirm = ConfigOnOff(default = False)
	config.expert.hideerrors = ConfigOnOff(default = False)
	config.expert.autoinfo = ConfigOnOff(default = True)
Пример #4
0
def InitSetupDevices():

	def timezoneNotifier(configElement):
		timezones.activateTimezone(configElement.index)

	config.timezone = ConfigSubsection()
	config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList())
	config.timezone.val.addNotifier(timezoneNotifier)

	def keyboardNotifier(configElement):
		keyboard.activateKeyboardMap(configElement.index)

	config.keyboard = ConfigSubsection()
	config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist())
	config.keyboard.keymap.addNotifier(keyboardNotifier)

	def languageNotifier(configElement):
		language.activateLanguage(configElement.value)

	config.osd = ConfigSubsection();
	
	if open("/proc/stb/info/boxtype").read().strip() == "ini-9000ru":
		config.osd.language = ConfigText(default = "ru_RU");
	elif open("/proc/stb/info/boxtype").read().strip() == "ini-5000ru":
		config.osd.language = ConfigText(default = "ru_RU");
	elif open("/proc/stb/info/boxtype").read().strip() == "ini-1000ru":
		config.osd.language = ConfigText(default = "ru_RU");
	else:
		config.osd.language = ConfigText(default = "en_GB");

	config.osd.language.addNotifier(languageNotifier)

	config.parental = ConfigSubsection()
	config.parental.lock = ConfigOnOff(default = False)
	config.parental.setuplock = ConfigOnOff(default = False)

	config.expert = ConfigSubsection()
	config.expert.satpos = ConfigOnOff(default = True)
	config.expert.fastzap = ConfigOnOff(default = True)
	config.expert.skipconfirm = ConfigOnOff(default = False)
	config.expert.hideerrors = ConfigOnOff(default = False)
	config.expert.autoinfo = ConfigOnOff(default = True)
Пример #5
0
def InitSetupDevices():
	
	def timezoneNotifier(configElement):
		timezones.activateTimezone(configElement.index)
		
	config.timezone = ConfigSubsection();
	config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList())
#+++>
#	import os
#	tz_list = timezones.getTimezoneList()
#	try:
#		p = os.popen("/bin/cubefpctl --getgmtoffset")
#	except OSError:
#		print "no memory"
#	finally:
#		st = p.close()
#		result = {
#			0: tz_list[0],
#			1: tz_list[1],
#			2: tz_list[2],
#			3: tz_list[3],
#			4: tz_list[4],
#			5: tz_list[5],
#			6: tz_list[8],
#			7: tz_list[12],
#			8: tz_list[15],
#			9: tz_list[18],
#			10: tz_list[19],
#			11: tz_list[22],
#			12: tz_list[23],
#			13: tz_list[25],
#			14: tz_list[27],
#			15: tz_list[32],
#			16: tz_list[38],
#			17: tz_list[42],
#			18: tz_list[43],
#			19: tz_list[45],
#			20: tz_list[46],
#			21: tz_list[48],
#			22: tz_list[50],
#			23: tz_list[53],
#			24: tz_list[54],
#			25: tz_list[56],
#			26: tz_list[61],
#			27: tz_list[64],
#			28: tz_list[66],
#			29: tz_list[71],
#			30: tz_list[72],
#			31: tz_list[73],
#			32: tz_list[74],
#			33: tz_list[76],
#			34: tz_list[49],
#		}.get((st>>8), tz_list[27])
#		config.timezone.val.setValue(result)
#+++<
	config.timezone.val.addNotifier(timezoneNotifier)

	def keyboardNotifier(configElement):
		keyboard.activateKeyboardMap(configElement.index)

	config.keyboard = ConfigSubsection();
	config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist())
	config.keyboard.keymap.addNotifier(keyboardNotifier)

	def languageNotifier(configElement):
		language.activateLanguage(configElement.value)
	
	config.osd = ConfigSubsection()
	config.osd.language = ConfigText(default = "en_EN");
	config.osd.language.addNotifier(languageNotifier)

	config.parental = ConfigSubsection();
	config.parental.lock = ConfigOnOff(default = False)
	config.parental.setuplock = ConfigOnOff(default = False)

	config.expert = ConfigSubsection();
	config.expert.satpos = ConfigOnOff(default = True)
	config.expert.fastzap = ConfigOnOff(default = True)
	config.expert.skipconfirm = ConfigOnOff(default = False)
	config.expert.hideerrors = ConfigOnOff(default = False)
	config.expert.autoinfo = ConfigOnOff(default = True)
Пример #6
0
def InitSetupDevices():

	def timezoneNotifier(configElement):
		timezones.activateTimezone(configElement.index)

	config.timezone = ConfigSubsection()
	config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList())
	config.timezone.val.addNotifier(timezoneNotifier)

	def keyboardNotifier(configElement):
		keyboard.activateKeyboardMap(configElement.index)

	config.keyboard = ConfigSubsection()
	config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist())
	config.keyboard.keymap.addNotifier(keyboardNotifier)

	def languageNotifier(configElement):
		language.activateLanguage(configElement.value)

	config.osd = ConfigSubsection()
	if getMachineBrand() == 'Atto.TV':
		defaultLanguage = "pt_BR"
	elif getMachineBrand() == 'Zgemma':
		defaultLanguage = "en_US"
	elif getMachineBrand() == 'Beyonwiz':
		defaultLanguage = "en_GB"
	else:
		defaultLanguage = "de_DE"
	config.osd.language = ConfigText(default = defaultLanguage)
	config.osd.language.addNotifier(languageNotifier)

	config.parental = ConfigSubsection()
	config.parental.lock = ConfigOnOff(default = False)
	config.parental.setuplock = ConfigOnOff(default = False)

	config.expert = ConfigSubsection()
	config.expert.satpos = ConfigOnOff(default = True)
	config.expert.fastzap = ConfigOnOff(default = True)
	config.expert.skipconfirm = ConfigOnOff(default = False)
	config.expert.hideerrors = ConfigOnOff(default = False)
	config.expert.autoinfo = ConfigOnOff(default = True)
Пример #7
0
from Components.Sources.StaticText import StaticText
from datetime import datetime
from Components.Timezones import timezones
import timer
import time
import math
from time import localtime, mktime, time, strftime
from datetime import timedelta
import os
from os import popen
config.plugins.TimeSet = ConfigSubsection()
config.plugins.TimeSet.OSDsize = ConfigSlider(default = 425, increment = 5, limits = (320, 500))
config.plugins.TimeSet.Helligkeit = ConfigSlider(default = 5, limits = (0, 7))
config.plugins.timezone = ConfigSubsection()
config.timezone = ConfigSubsection()
config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList())

class TimeSetConfig(ConfigListScreen, Screen):
    skin = '\n\t\t\t<screen position="center,center" size="560,190" title="TimeSet Settings v.1.2" >\n\t\t\t<widget name="config" position="10,10" size="540,50" scrollbarMode="showOnDemand" />\n\n\t\t\t<widget source="poraka" render="Label" position="5,265" size="555,30" zPosition="10" font="Regular;14" halign="center" valign="center" backgroundColor="#25062748" transparent="1" />\n\t\t\t<widget source="vreme" render="Label" position="5,65" size="555,30" zPosition="10" font="Regular;22" halign="center" valign="center" backgroundColor="#25062748" transparent="1" />\n\t\t\t<widget source="introduction" render="Label" position="5,95" size="555,30" zPosition="10" font="Regular;16" halign="center" valign="center" backgroundColor="#25062748" transparent="1" />\n\t\t\t<widget source="timez" render="Label" position="5,115" size="555,30" zPosition="10" font="Regular;16" halign="center" valign="center" backgroundColor="#25062748" transparent="1" />\n\t\t\t\n\t\t\t<widget name="key_red" position="0,150" size="140,40" valign="center" halign="center" zPosition="4"  foregroundColor="white" font="Regular;18" transparent="1"/> \n\t\t\t<widget name="key_green" position="140,150" size="140,40" valign="center" halign="center" zPosition="4"  foregroundColor="white" font="Regular;18" transparent="1"/> \n\t\t\t<widget name="key_yellow" position="280,150" size="140,40" valign="center" halign="center" zPosition="4"  foregroundColor="white" font="Regular;18" transparent="1"/> \n\t\t\t<widget name="key_blue" position="420,150" size="140,40" valign="center" halign="center" zPosition="4"  foregroundColor="white" font="Regular;18" transparent="1"/> \n\t\t\t\n\t\t\t<ePixmap name="red"    position="0,150"   zPosition="2" size="140,40" pixmap="skin_default/buttons/red.png" transparent="1" alphatest="on" />\n\t\t\t<ePixmap name="green"  position="140,150" zPosition="2" size="140,40" pixmap="skin_default/buttons/green.png" transparent="1" alphatest="on" />\n\t\t\t<ePixmap name="yellow" position="280,150" zPosition="2" size="140,40" pixmap="skin_default/buttons/yellow.png" transparent="1" alphatest="on" />\n\t\t\t<ePixmap name="blue"   position="420,150" zPosition="2" size="140,40" pixmap="skin_default/buttons/blue.png" transparent="1" alphatest="on" />\n\t\t</screen>'
    
    def __init__(self, session, args = 0):
        self.session = session
        Screen.__init__(self, session)
        z1 = mktime(datetime.utcnow().timetuple())
        z2 = mktime(datetime.now().timetuple())
        z0 = (z2 - z1) // 3600
        if z0 >= 0:
            zz = '+' + str(z0)[:1]
        
        if z0 < 0:
            zz = str(z0)[:2]
Пример #8
0
def InitSetupDevices():

	def timezoneNotifier(configElement):
		timezones.activateTimezone(configElement.index)

	config.timezone = ConfigSubsection()
	config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList())
	config.timezone.val.addNotifier(timezoneNotifier)

	def keyboardNotifier(configElement):
		keyboard.activateKeyboardMap(configElement.index)

	config.keyboard = ConfigSubsection()
	config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist())
	config.keyboard.keymap.addNotifier(keyboardNotifier)

	def languageNotifier(configElement):
		language.activateLanguage(configElement.value)

	config.osd = ConfigSubsection()
	if getMachineBrand() in ('Vimastec'):
		config.osd.language = ConfigText(default = "fr_FR")
	elif getMachineBrand() in ('Zgemma') or getBrandOEM() in ('airdigital'):
		config.osd.language = ConfigText(default = "en_US")
	else:
		config.osd.language = ConfigText(default = "de_DE")
	config.osd.language.addNotifier(languageNotifier)

	config.parental = ConfigSubsection()
	config.parental.lock = ConfigOnOff(default = False)
	config.parental.setuplock = ConfigOnOff(default = False)

	config.expert = ConfigSubsection()
	config.expert.satpos = ConfigOnOff(default = True)
	config.expert.fastzap = ConfigOnOff(default = True)
	config.expert.skipconfirm = ConfigOnOff(default = False)
	config.expert.hideerrors = ConfigOnOff(default = False)
	config.expert.autoinfo = ConfigOnOff(default = True)