Пример #1
0
	def __init__(	self, 
					strXMLname, 
					strFallbackPath, 
					strDefaultName, 
					networking_instance, 
					lang_rerun, 
					selected_language,
					testing=False):

		self.testing = testing

		# the order of the panels, this list can be changed depending on the specific need
		self.panel_order 	= sorted(PANEL_MAP.keys(), key=lambda x: PANEL_MAP[x]['order'])

		# the specific controlIDs for the main menu items and others, this is used by onFocus and saves recreating the list every time
		self.menu_controls 	= [v['panel_menu_item_id'] for v in PANEL_MAP.values()]
		self.tz_controls 	= [3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
		self.skin_controls 	= [80010, 80020]

		# switch that identifies whether the internet is connected, there is also a flag to determine if the
		# networking panel has already been revealed.
		self.internet_connected = False
		self.networking_panel_revealed = False

		#start a new thread that begins checking for an internet connection
		self.start_checking_for_internet(networking_instance)

		# this flag tells us whether the GUI has been reloaded due to language selection
		self.lang_rerun = lang_rerun

		# get the list of timezones in /etc/timezone
		self.timezones = osmc_timezones.get_timezones()

		# this attribute denotes the skin the user wants to have applied when the walkthru closes
		self.selected_skin = 'OSMC'

		# this is the default hostname for the device
		self.device_name = 'current name: osmc'

		# this holds the users desired SSH state (True for enabled)
		self.ssh_state = True

		# this holds the users ssh password
		self.ssh_pass = '******'

		# newsletter email address
		self.email = ''

		# get the languages
		self.languages = self.get_languages()
		self.languages = list(set(self.languages))
		self.languages.sort()

		self.tz_control_map = {
						'Africa'	: 30010,
						'America'	: 30020,
						'Asia'		: 30030,		
						'Atlantic'	: 30040,
						'Australia'	: 30050,
						'Europe'	: 30060,
						'Indian'	: 30070,
						'Pacific'	: 30080,
						'UTC'		: 30090,
						}

		self.selected_language = selected_language
		self.selected_region   = None
		self.selected_country  = None

		# textures for the skin image
		media_path = xbmc.translatePath(os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'resources', 'skins', 'Default', 'media'))
		self.osmc_skin_image = os.path.join(media_path, 'osmc_preview.png')
		self.conf_skin_image = os.path.join(media_path, 'conf_preview.jpg')

		# if the device is not recognised as a vero, then remove the warranty panel from the walkthrough
		if not self.is_Vero():
			self.panel_order.remove('warranty')

		# this attribute is used to determine when the user is allowed to exit the walkthru using the Esc or Back buttons
		self.prevent_escape = True
Пример #2
0
	def __init__(	self, 
					strXMLname, 
					strFallbackPath, 
					strDefaultName, 
					networking_instance, 
					lang_rerun, 
					selected_language,
					testing=False):

		# show timezone switch
		self.showtimezone = True

		# switch that identifies whether the internet is connected
		self.internet_connected = False

		#start a new thread that begins checking for an internet connection
		self.net_call = networking_instance

		self.internet_check   = False
		if not testing:
			self.internet_checker = Networking_caller(self, self.net_call)
		else:
			self.internet_checker = mock_Networking_caller(self, self.net_call)
		self.internet_checker.setDaemon(True)
		self.internet_checker.start()

		# this flag tells us whether the GUI has been reloaded due to language selection
		self.lang_rerun = lang_rerun

		# edit the timezone in /etc/timezone
		if self.showtimezone:
			self.timezones = osmc_timezones.get_timezones()

		# this attribute denotes the skin the user wants to have applied when the walkthru closes
		self.selected_skin = 'OSMC'

		# this is the default hostname for the device
		self.device_name = 'current name: osmc'

		# this holds the users desired SSH state (True for enabled)
		self.ssh_state = True

		# this holds the users ssh password
		self.ssh_pass = '******'

		# newsletter email address
		self.email = ''

		# get the languages
		self.languages = self.get_languages()
		self.languages = list(set(self.languages))
		self.languages.sort()

		self.tz_control_map = {
						'Africa'	: 30010,
						'America'	: 30020,
						'Asia'		: 30030,		
						'Atlantic'	: 30040,
						'Australia'	: 30050,
						'Europe'	: 30060,
						'Indian'	: 30070,
						'Pacific'	: 30080,
						'UTC'		: 30090,
						}

		self.selected_language = selected_language
		self.selected_region   = None
		self.selected_country  = None

		# textures for the skin image
		media_path = xbmc.translatePath(os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'resources', 'skins', 'Default', 'media'))
		self.osmc_skin_image = os.path.join(media_path, 'osmc_preview.png')
		self.conf_skin_image = os.path.join(media_path, 'conf_preview.jpg')

		self.vero = self.check_hardware()

		# this attribute is used to determine when the user is allowed to exit the walkthru using the Esc or Back buttons
		self.prevent_escape = True
Пример #3
0
    def __init__(self,
                 strXMLname,
                 strFallbackPath,
                 strDefaultName,
                 networking_instance,
                 lang_rerun,
                 selected_language,
                 testing=False):

        self.testing = testing

        # the order of the panels, this list can be changed depending on the specific need
        self.panel_order = sorted(PANEL_MAP.keys(),
                                  key=lambda x: PANEL_MAP[x]['order'])

        # the specific controlIDs for the main menu items and others, this is used by onFocus and saves recreating the list every time
        self.menu_controls = [
            v['panel_menu_item_id'] for v in PANEL_MAP.values()
        ]
        self.tz_controls = [
            3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009
        ]
        self.skin_controls = [80010, 80020]

        # switch that identifies whether the internet is connected, there is also a flag to determine if the
        # networking panel has already been revealed.
        self.internet_connected = False
        self.networking_panel_revealed = False

        #start a new thread that begins checking for an internet connection
        self.start_checking_for_internet(networking_instance)

        # this flag tells us whether the GUI has been reloaded due to language selection
        self.lang_rerun = lang_rerun

        # get the list of timezones in /etc/timezone
        self.timezones = osmc_timezones.get_timezones()

        # this attribute denotes the skin the user wants to have applied when the walkthru closes
        self.selected_skin = 'OSMC'

        # this is the default hostname for the device
        self.device_name = 'current name: osmc'

        # this holds the users desired SSH state (True for enabled)
        self.ssh_state = True

        # this holds the users ssh password
        self.ssh_pass = '******'

        # newsletter email address
        self.email = ''

        # get the languages
        self.languages = self.get_languages()
        self.languages = list(set(self.languages))
        self.languages.sort()

        self.tz_control_map = {
            'Africa': 30010,
            'America': 30020,
            'Asia': 30030,
            'Atlantic': 30040,
            'Australia': 30050,
            'Europe': 30060,
            'Indian': 30070,
            'Pacific': 30080,
            'UTC': 30090,
        }

        self.selected_language = selected_language
        self.selected_region = None
        self.selected_country = None

        # textures for the skin image
        media_path = xbmc.translatePath(
            os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'resources',
                         'skins', 'Default', 'media'))
        self.osmc_skin_image = os.path.join(media_path, 'osmc_preview.jpg')
        self.conf_skin_image = os.path.join(media_path, 'conf_preview.jpg')

        # if the device is not recognised as a vero, then remove the warranty panel from the walkthrough
        if not self.is_Vero():
            self.panel_order.remove('warranty')

        # this attribute is used to determine when the user is allowed to exit the walkthru using the Esc or Back buttons
        self.prevent_escape = True
Пример #4
0
	def __init__(	self, 
					strXMLname, 
					strFallbackPath, 
					strDefaultName, 
					networking_instance, 
					lang_rerun, 
					selected_language):

		# show timezone switch
		self.showtimezone = True

		# switch that identifies whether the internet is connected
		self.internet_connected = False

		#start a new thread that begins checking for an internet connection
		self.net_call = networking_instance

		self.internet_check   = False
		self.internet_checker = Networking_caller(self, self.net_call)
		self.internet_checker.setDaemon(True)
		self.internet_checker.start()

		# this flag tells us whether the GUI has been reloaded due to language selection
		self.lang_rerun = lang_rerun

		# edit the timezone in /etc/timezone
		if self.showtimezone:
			self.timezones = osmc_timezones.get_timezones()

		# this attribute denotes the skin the user wants to have applied when the walkthru closes
		self.selected_skin = 'OSMC'

		# this is the default hostname for the device
		self.device_name = 'current name: osmc'

		# newsletter email address
		self.email = ''

		# get the languages
		self.languages = self.get_languages()
		self.languages = list(set(self.languages))
		self.languages.sort()

		self.tz_control_map = {
						'Africa'	: 30010,
						'America'	: 30020,
						'Asia'		: 30030,		
						'Atlantic'	: 30040,
						'Australia'	: 30050,
						'Europe'	: 30060,
						'Indian'	: 30070,
						'Pacific'	: 30080,
						'UTC'		: 30090,
						}

		self.selected_language = selected_language
		self.selected_region   = None
		self.selected_country  = None

		# textures for the skin image
		media_path = xbmc.translatePath(os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'resources', 'skins', 'Default', 'media'))
		self.osmc_skin_image = os.path.join(media_path, 'osmc_preview.png')
		self.conf_skin_image = os.path.join(media_path, 'conf_preview.jpg')

		self.vero = self.check_hardware()

		# this attribute is used to determine when the user is allowed to exit the walkthru using the Esc or Back buttons
		self.prevent_escape = True