Esempio n. 1
0
    def Wait(self):
        """ Main entry point to wait """

        Logger.debug("Checking for permissions")
        self.bIsWaiting = True
        self.bCancel = False
        self.bHasPermissions = OS_CheckPermissions()
        if self.bHasPermissions:
            Globals.bHasPermissions = True
            return True

        StartWait()

        bLangLoaded: bool = ExistLVar('5042')
        if bLangLoaded:
            uMessage: str = u'$lvar(5042)'
            uGrant: str = u'$lvar(5043)'
        else:
            uMessage: str = "ORCA requires write access, please grant"
            uGrant: str = "Grant Access"

        self.oPopup = ShowQuestionPopUp(uTitle=u'$lvar(5010)',
                                        uMessage=uMessage,
                                        fktYes=self.GrantAccess,
                                        fktNo=self.StopApp,
                                        uStringYes=uGrant,
                                        uStringNo=u'$lvar(5005)',
                                        uSound=u'message')
        Clock.schedule_once(self.StartNextThread, 0)
        return False
Esempio n. 2
0
 def On_ConfigChange(self, oSettings: KivySettings,
                     oConfig: KivyConfigParser, uSection: str, uKey: str,
                     uValue: str):
     """ reacts, if user changes a setting """
     if uKey == u'configchangebuttons':
         self.uCurrentSection = uSection
         if uValue == u'button_add':
             SetVar(uVarName=u'SCRIPTINPUT', oVarValue=u'DEVICE_dummy')
             self.oInputKeyboard = ShowKeyBoard(uDestVar=u'SCRIPTINPUT',
                                                oFktNotify=self.On_InputAdd)
         if uValue == u'button_delete':
             ShowQuestionPopUp(uTitle=u'$lvar(5003)',
                               uMessage=u'$lvar(5044)',
                               fktYes=self.On_InputDel,
                               uStringYes=u'$lvar(5001)',
                               uStringNo=u'$lvar(5002)')
         if uValue == u'button_rename':
             SetVar(uVarName=u'SCRIPTINPUT', oVarValue=uSection)
             self.oInputKeyboard = ShowKeyBoard(uDestVar=u'SCRIPTINPUT',
                                                oFktNotify=self.On_InputRen)
     else:
         oSetting = self.oObject.GetSettingObjectForConfigName(
             uConfigName=uSection)
         if uKey in self.dSettingsCombined:
             uType = self.dSettingsCombined[uKey].get("type")
             if uType == "numeric" or uType == "numericslider":
                 oSetting.aIniSettings[uKey] = ToInt(uValue)
             elif uType == "numericfloat":
                 oSetting.aIniSettings[uKey] = ToFloat(uValue)
             elif uType == "bool":
                 oSetting.aIniSettings[uKey] = ToBool(uValue)
             else:
                 oSetting.aIniSettings[uKey] = uValue
Esempio n. 3
0
    def Wait(self):
        """ Main entry point to wait """
        Logger.debug("Checking for network connectivity")
        self.bIsWaiting = True
        self.bCancel = False
        StartWait()
        self.bIsOnline = False

        bLangLoaded = ExistLVar('5012')
        if bLangLoaded:
            uMessage = u'$lvar(5012)'
        else:
            uMessage = "Waiting for network connectivity"

        self.oPopup = ShowQuestionPopUp(uTitle=u'$lvar(5010)',
                                        uMessage=uMessage,
                                        fktYes=self.CancelWaitForConnectivity,
                                        uStringYes=u'$lvar(5009)',
                                        uSound=u'message')
        Clock.schedule_once(self.StartNextThread, 0)
        return False
Esempio n. 4
0
    def On_ConfigChange(self, oSettings, oConfig, uSection, uKey, uValue):
        """
        reacts, if user changes a setting

        :param setting oSettings: The kivy settings object
        :param ConfigParser oConfig: The Kivy config parser
        :param string uSection: The section of the change
        :param string uKey: The key name
        :param string uValue: The value
        """
        if uKey == u'configchangebuttons':
            self.uCurrentSection = uSection
            if uValue == u'button_add':
                SetVar(uVarName=u'INTERFACEINPUT', oVarValue=u'DEVICE_dummy')
                self.oInputKeyboard = ShowKeyBoard(u'INTERFACEINPUT',
                                                   self.On_InputAdd)
            if uValue == u'button_delete':
                ShowQuestionPopUp(
                    uTitle=u'$lvar(5003)',
                    uMessage=u'Do you really want to delete this setting?',
                    fktYes=self.On_InputDel,
                    uStringYes=u'$lvar(5001)',
                    uStringNo=u'$lvar(5002)')
            if uValue == u'button_rename':
                SetVar(uVarName=u'INTERFACEINPUT', oVarValue=uSection)
                self.oInputKeyboard = ShowKeyBoard(u'INTERFACEINPUT',
                                                   self.On_InputRen)
        elif uKey == u'DiscoverSettings':
            Globals.oTheScreen.uConfigToConfig = uSection
            Globals.oTheScreen.AddActionShowPageToQueue(
                uPageName=u'Page_InterfaceSettingsDiscover')
        elif uKey == u'FNCodeset':
            oSetting = self.oInterFace.GetSettingObjectForConfigName(
                uConfigName=uSection)
            oSetting.aInterFaceIniSettings[uKey] = uValue
            oSetting.ReadCodeset()
        else:
            oSetting = self.oInterFace.GetSettingObjectForConfigName(
                uConfigName=uSection)
            oSetting.aInterFaceIniSettings[uKey] = uValue
            # ShowMessagePopUp(uMessage=u'$lvar(5011)')
            if uKey == u'FNCodeset':
                oSetting.ReadCodeset()
Esempio n. 5
0
 def On_ConfigChange(self, oSettings, oConfig, uSection, uKey, uValue):
     """ reacts, if user changes a setting """
     if uKey == u'configchangebuttons':
         self.uCurrentSection = uSection
         if uValue == u'button_add':
             SetVar(uVarName=u'SCRIPTINPUT', oVarValue=u'DEVICE_dummy')
             self.oInputKeyboard = ShowKeyBoard(u'SCRIPTINPUT',
                                                self.On_InputAdd)
         if uValue == u'button_delete':
             ShowQuestionPopUp(
                 uTitle=u'$lvar(5003)',
                 uMessage=u'Do you really want to delete this setting?',
                 fktYes=self.On_InputDel,
                 uStringYes=u'$lvar(5001)',
                 uStringNo=u'$lvar(5002)')
         if uValue == u'button_rename':
             SetVar(uVarName=u'SCRIPTINPUT', oVarValue=uSection)
             self.oInputKeyboard = ShowKeyBoard(u'SCRIPTINPUT',
                                                self.On_InputRen)
     else:
         oSetting = self.oScript.GetSettingObjectForConfigName(
             uConfigName=uSection)
         oSetting.aScriptIniSettings[uKey] = uValue
Esempio n. 6
0
class cCheckPermissions(EventDispatcher):
    """ Waits, unitl we have the permissions """
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.bCancel: bool = False
        self.bIsWaiting: bool = False
        self.bHasPermissions: bool = False
        self.oPopup = None
        self.oThread = None
        # noinspection PyUnresolvedReferences
        self.register_event_type('on_checkpermissions_finished')

    # noinspection PyUnusedLocal
    def HasPermissions(self, *largs):
        """ sub function to test, if we have permissions """
        self.bHasPermissions = OS_CheckPermissions()
        # noinspection PyUnresolvedReferences
        self.dispatch('on_permissionschecked')

    # noinspection PyUnusedLocal
    def on_permissionschecked(self, *largs):
        """ called, wehn the tsated has been checked """
        # Logger.debug("Checking permissions")
        if not self.bIsWaiting:
            return
        if not self.bHasPermissions:
            Clock.schedule_once(self.StartNextThread, 0)
            fSleep(fSeconds=0.6)
            return
        self.StopWait()

    # noinspection PyUnusedLocal
    def StartNextThread(self, *largs):
        """ Starts the next thread to check, if online """
        #Logger.debug("Checking for network connectivity start thread")
        #fSleep(0.01)
        #Clock.schedule_once(IsOnline, 0)
        #return

        if self.oThread is not None:
            self.oThread.join()

        self.oThread = threading.Thread(target=HasPermissions(),
                                        name="CheckPermissionsThread")
        self.oThread.start()

    def Wait(self):
        """ Main entry point to wait """

        Logger.debug("Checking for permissions")
        self.bIsWaiting = True
        self.bCancel = False
        self.bHasPermissions = OS_CheckPermissions()
        if self.bHasPermissions:
            Globals.bHasPermissions = True
            return True

        StartWait()

        bLangLoaded: bool = ExistLVar('5042')
        if bLangLoaded:
            uMessage: str = u'$lvar(5042)'
            uGrant: str = u'$lvar(5043)'
        else:
            uMessage: str = "ORCA requires write access, please grant"
            uGrant: str = "Grant Access"

        self.oPopup = ShowQuestionPopUp(uTitle=u'$lvar(5010)',
                                        uMessage=uMessage,
                                        fktYes=self.GrantAccess,
                                        fktNo=self.StopApp,
                                        uStringYes=uGrant,
                                        uStringNo=u'$lvar(5005)',
                                        uSound=u'message')
        Clock.schedule_once(self.StartNextThread, 0)
        return False

    def StopWait(self):
        """ MAin entry point to stop waiting """
        if self.oPopup:
            self.oPopup.ClosePopup()

        Globals.bHasPermissions = self.bHasPermissions
        self.CancelCheckPermissions()

    # noinspection PyUnusedLocal
    def CancelCheckPermissions(self, *largs):
        """ Called, when the user pushes the cancel button """
        if self.oThread is not None:
            self.oThread.join()
        self.bCancel = True
        self.bIsWaiting = False
        self.oPopup = None
        StopWait()
        self.bIsWaiting = False  #
        # noinspection PyUnresolvedReferences
        self.dispatch('on_checkpermissions_finished')

    # noinspection PyMethodMayBeStatic,PyUnusedLocal
    def StopApp(self, *largs):
        Globals.oApp.StopApp()
        pass

    # noinspection PyUnusedLocal
    def GrantAccess(self, *largs):
        """ Called, when the user pushes the grant accces button """
        self.StopWait()
        self.Wait()
        OS_RequestPermissions()
        return

    def on_checkpermissions_finished(self):
        """  Dummy for the event dispatcher """
        pass
Esempio n. 7
0
    def ExecuteActionShowQuestion(self, oAction):
        """
        WikiDoc:Doc
        WikiDoc:Context:ActionsDetails
        WikiDoc:Page:Actions-ShowQuestion
        WikiDoc:TOCTitle:showquestion
        = showquestion =
        This actions open a separate page where the user can answer a question. Can be used to show a popup message as well

        <div style="overflow:auto; ">
        {| class="wikitable"
        ! align="left" | Attribute
        ! align="left" | Description
        |-
        |string
        |showquestion
        |-
        |title
        |Title of the question-popup
        |-
        |message
        |Message for the question bar popup (normally the question)
        |-
        |actionyes
        |Name of the action to called, if the user presses the Yes button
        |-
        |actionno
        |Name of the action to called, if the user presses the No button
        |-
        |dontstopqueue
        |Doesn't stop the queue (if set to any value). As standard, the queue will be stopped until the answer to the question has been given.
        |-
        |close
        |Closes the question popup. Use it only, when you used the dontstopqueue flag
        |}</div>

        A short example:
        <div style="overflow-x: auto;"><syntaxhighlight  lang="xml">
        <action name="My Qustion" string="showquestion" title="Mytitle" message="MyMessage" actionyes="myYesAction" actionno="myNoAction"/>
        </syntaxhighlight></div>
        WikiDoc:End
        """

        self.oEvenDispatcher.LogAction(u'ShowQuestion', oAction)

        oAction.uTitle = ReplaceVars(oAction.dActionPars.get("title", ""))
        oAction.uMessage = ReplaceVars(oAction.dActionPars.get("message", ""))
        oAction.uActionYes = ReplaceVars(
            oAction.dActionPars.get("actionyes", ""))
        oAction.uActionNo = ReplaceVars(oAction.dActionPars.get(
            "actionno", ""))
        uClose = ReplaceVars(oAction.dActionPars.get("close", ""))
        uDontStopQueue = ReplaceVars(
            oAction.dActionPars.get("dontstopqueue", ""))

        if uClose:
            if self.oQuestionAction:
                StopWait()
                self.oQuestionAction.oQuestionPopup.ClosePopup()
                return -2
        if uDontStopQueue == "":
            StartWait()
        self.oQuestionAction = oAction
        if oAction.uActionYes == '' and oAction.uActionNo == '':
            self.oQuestionAction.oQuestionPopup = ShowQuestionPopUp(
                uTitle=oAction.uTitle,
                uMessage=oAction.uMessage,
                uSound=u'message')
        elif oAction.uActionNo == '':
            self.oQuestionAction.oQuestionPopup = ShowQuestionPopUp(
                uTitle=oAction.uTitle,
                uMessage=oAction.uMessage,
                fktYes=self.__fktExecuteActionShowQuestionOption1,
                uStringYes='$lvar(5000)',
                uSound=u'message')
        else:
            self.oQuestionAction.oQuestionPopup = ShowQuestionPopUp(
                uTitle=oAction.uTitle,
                uMessage=oAction.uMessage,
                fktYes=self.__fktExecuteActionShowQuestionOption1,
                fktNo=self.__fktExecuteActionShowQuestionOption2,
                uStringYes='$lvar(5001)',
                uStringNo='$lvar(5002)',
                uSound=u'message')
        self.oQuestionAction.oQuestionPopup.bPreventCloseOnEscKey = True
        return -2
Esempio n. 8
0
def OrcaConfigParser_On_Setting_Change(config: kivyConfig, section: str,
                                       key: str, value: str) -> None:

    uSection: str = section
    uKey: str = key
    uValue: str = value

    # uValue = ToUnicode(value)

    if uSection == "ORCA":
        if uKey == u'button_clear_atlas':
            ClearAtlas()
        elif uKey == u"button_notification":
            uNotification = uValue.split("_")[-1]
            Globals.oNotifications.SendNotification(
                uNotification=uNotification, **{
                    "key": uKey,
                    "value": uValue
                })
        elif uKey == u'button_discover_rediscover':
            if uValue == u'button_discover_rediscover':
                Globals.oInterFaces.DiscoverAll()
            else:
                Globals.oInterFaces.DiscoverAll(bForce=True)
        elif uKey == u'button_discover_results':
            from ORCA.utils.Discover import cDiscover_List
            Globals.oApp.oDiscoverList = cDiscover_List()
            Globals.oApp.oDiscoverList.ShowList()
        elif uKey == u'button_installed_reps':
            Globals.oDownLoadSettings.LoadDirect(uDirect=uValue, bForce=True)
        elif uKey == u'button_show_installationhint':
            Var_DeleteCookie(uVarName='SHOWINSTALLATIONHINT',
                             uPrefix=Globals.uDefinitionName)
            Globals.oTheScreen.AddActionToQueue(
                aActions=[{
                    'string': 'call',
                    'actionname': 'Fkt ShowInstallationHint'
                }])
        elif uKey == u'button_show_powerstati':
            Globals.oTheScreen.AddActionShowPageToQueue(
                uPageName=u'Page_PowerStati')
        elif uKey == u'button_updateallreps':
            Globals.oDownLoadSettings.UpdateAllInstalledRepositories(
                bForce=True)
        elif uKey == u'showborders':
            Globals.bShowBorders = not Globals.bShowBorders
            Globals.oTheScreen.AddActionToQueue(
                aActions=[{
                    'string': 'updatewidget *@*'
                }])
        elif uKey == u'language':
            # Changes the languages, reloads all strings and reloads the settings dialog
            Globals.uLanguage = uValue
            Globals.oApp.InitPathes()
            Globals.oNotifications.SendNotification(
                uNotification="on_language_change")
        elif uKey == u'locales':
            Globals.uLocalesName = uValue
            Globals.oTheScreen.LoadLocales()
        elif uKey == u'startrepeatdelay':
            Globals.fStartRepeatDelay = float(uValue)
        elif uKey == u'longpresstime':
            Globals.fLongPressTime = float(uValue)
        elif uKey == u'contrepeatdelay':
            Globals.fContRepeatDelay = float(uValue)
        elif uKey == u'clockwithseconds':
            Globals.bClockWithSeconds = (uValue == '1')
        elif uKey == u'longdate':
            Globals.bLongDate = (uValue == '1')
        elif uKey == u'longday':
            Globals.bLongDay = (uValue == '1')
        elif uKey == u'longmonth':
            Globals.bLongMonth = (uValue == '1')
        elif uKey == u'checkfornetwork':
            Globals.bConfigCheckForNetwork = (uValue == '1')
        elif uKey == u'vibrate':
            Globals.bVibrate = (uValue == '1')
        elif uKey == u'button_configureinterface':
            uButton, Globals.oTheScreen.uInterFaceToConfig, Globals.oTheScreen.uConfigToConfig = uValue.split(
                ':')
            Globals.oTheScreen.AddActionShowPageToQueue(
                uPageName=u'Page_InterfaceSettings')
        elif uKey == u'button_configurescripts':
            uAction: str
            uScriptName: str
            uAction, uScriptName = uValue.split(':')
            if uAction == "button_configure":
                Globals.oTheScreen.uScriptToConfig = uScriptName
                Globals.oTheScreen.AddActionShowPageToQueue(
                    uPageName=u'Page_ScriptSettings')
            elif uAction == "button_run":
                kwargs = {"caller": "settings"}
                Globals.oScripts.RunScript(uScriptName, **kwargs)

        elif uKey == u'definition':
            ShowQuestionPopUp(
                uTitle='$lvar(599)',
                uMessage='$lvar(5026)',
                fktYes=Globals.oApp.on_config_change_change_definition,
                uStringYes='$lvar(5001)',
                uStringNo='$lvar(5002)')
        elif uKey == u'skin':
            Globals.oApp.ReStart()
        elif uKey == u'rootpath':
            if not Globals.bInit:
                Globals.oApp.close_settings()
                Globals.oApp._app_settings = None
                kivyConfig.write()
                Clock.schedule_once(Globals.oApp.Init_ReadConfig, 0)
            else:
                ShowMessagePopUp(uMessage=u'$lvar(5011)')
        elif uKey == u'sound_muteall':
            Globals.oSound.bMute = ToBool(uValue)
        elif uKey.startswith(u'soundvolume_'):
            uSoundName = uKey[12:]
            Globals.oSound.SetSoundVolume(uSoundName=uSoundName,
                                          iValue=ToInt(uValue))
            Globals.oSound.PlaySound(uSoundName=uSoundName)
        elif uKey == u'button_changedefinitionsetting':
            Globals.uDefinitionToConfigure = uValue[7:]
            Globals.oTheScreen.AddActionShowPageToQueue(
                uPageName=u'Page_DefinitionSettings')
            if uKey in Globals.oDefinitions.aDefinitionSettingVars:
                SetVar(uVarName=uKey, oVarValue=uValue)
        else:
            pass
Esempio n. 9
0
class cWaitForConnectivity(EventDispatcher):
    """ Waits, if device is connected to the network """
    def __init__(self, *args, **kwargs):
        super(cWaitForConnectivity, self).__init__(*args, **kwargs)
        self.bCancel = False
        self.pNotifyFunction = None
        self.bIsWaiting = False
        self.bIsOnline = False
        self.oPopup = None
        self.oThread = None
        #self.register_event_type('on_onlinestatechecked')
        self.register_event_type('on_waitforconnectivity_finished')

    def IsOnline(self, *largs):
        """ sub function to test, if online """

        if not Globals.bConfigCheckForNetwork:
            Logger.debug("Skipping wait for connecivity")
            self.bIsOnline = True
        elif Globals.uNetworkCheckType == "ping":
            Logger.debug("Checking for network connectivity (ping)")
            Logger.debug("Pinging " + Globals.uConfigCheckNetWorkAddress)
            self.bIsOnline = Ping(Globals.uConfigCheckNetWorkAddress)
        elif Globals.uNetworkCheckType == "system":
            self.bIsOnline = OS_SystemIsOnline()
        else:
            self.bIsOnline = True
        self.dispatch('on_onlinestatechecked')

    def on_onlinestatechecked(self, *largs):
        """ called, wehn the tsated has been checked """
        Logger.debug("Checking for network connectivity online state checked")
        if not self.bIsWaiting:
            return
        if not self.bIsOnline:
            Clock.schedule_once(self.StartNextThread, 0)
            fSleep(0.6)
            return
        self.StopWait()

    def StartNextThread(self, *largs):
        """ Starts the next thread to check, if online """
        #Logger.debug("Checking for network connectivity start thread")
        #fSleep(0.01)
        #Clock.schedule_once(IsOnline, 0)
        #return

        if self.oThread is not None:
            self.oThread.join()

        self.oThread = threading.Thread(target=IsOnline,
                                        name="WaitNetworkThread")
        self.oThread.start()

    def Wait(self):
        """ Main entry point to wait """
        Logger.debug("Checking for network connectivity")
        self.bIsWaiting = True
        self.bCancel = False
        StartWait()
        self.bIsOnline = False

        bLangLoaded = ExistLVar('5012')
        if bLangLoaded:
            uMessage = u'$lvar(5012)'
        else:
            uMessage = "Waiting for network connectivity"

        self.oPopup = ShowQuestionPopUp(uTitle=u'$lvar(5010)',
                                        uMessage=uMessage,
                                        fktYes=self.CancelWaitForConnectivity,
                                        uStringYes=u'$lvar(5009)',
                                        uSound=u'message')
        Clock.schedule_once(self.StartNextThread, 0)
        return False

    def StopWait(self):
        """ MAin entry point to stop waiting """
        if self.oPopup:
            self.oPopup.ClosePopup()
        self.CancelWaitForConnectivity()

    def CancelWaitForConnectivity(self, *largs):
        """ Called, when the user pushes the cancel button """
        if self.oThread is not None:
            self.oThread.join()
        self.bCancel = True
        self.bIsWaiting = False
        self.oPopup = None
        StopWait()
        self.bIsWaiting = False  #
        self.dispatch('on_waitforconnectivity_finished')

    def on_waitforconnectivity_finished(self):
        """  Dummy for the event dispatcher """
        pass
Esempio n. 10
0
def OrcaConfigParser_On_Setting_Change(config, section, key, value):

    uValue = ToUnicode(value)

    if section == "ORCA":
        if   key == u'button_clear_atlas':
            ClearAtlas()
        elif key == u"button_notification":
            uNotification = value.split("_")[-1]
            Globals.oNotifications.SendNotification(uNotification,**{"key":key,"value":value})
        elif key == u'button_discover_rediscover':
            if uValue == u'button_discover_rediscover':
                Globals.oInterFaces.DiscoverAll()
            else:
                Globals.oInterFaces.DiscoverAll(bForce=True)
        elif key == u'button_discover_results':
            from ORCA.utils.Discover import cDiscover_List
            Globals.oApp.oDiscoverList = cDiscover_List()
            Globals.oApp.oDiscoverList.ShowList()
        elif key == u'button_getonline':
            Globals.oTheScreen.AddActionShowPageToQueue(uPageName=u'Page_Settings_Download')
        elif key == u'button_installed_reps':
            Globals.oDownLoadSettings.LoadDirect(uValue, True)
        elif key == u'button_show_installationhint':
            Var_DeleteCookie('SHOWINSTALLATIONHINT', Globals.uDefinitionName)
            Globals.oTheScreen.AddActionToQueue([{'string': 'call', 'actionname': 'Fkt ShowInstallationHint'}])
        elif key == u'button_show_licensefile':
            SetVar(uVarName="SHOWFILE", oVarValue=ReplaceVars("$var(LICENSEFILE)"))
            Globals.oTheScreen.AddActionShowPageToQueue(uPageName=u'Page_ShowFile')
        elif key == u'button_show_credits':
            SetVar(uVarName="SHOWFILE", oVarValue=ReplaceVars("$var(CREDITSFILE)"))
            Globals.oTheScreen.AddActionShowPageToQueue(uPageName=u'Page_ShowFile')
        elif key == u'button_show_logfile':
            SetVar(uVarName="SHOWFILE", oVarValue=ReplaceVars("$var(LOGFILE)"))
            Globals.oTheScreen.AddActionShowPageToQueue(uPageName=u'Page_ShowFile')
        elif key == u'button_show_powerstati':
            Globals.oTheScreen.AddActionShowPageToQueue(uPageName=u'Page_PowerStati')
        elif key == u'button_updateallreps':
            Globals.oDownLoadSettings.UpdateAllInstalledRepositories(True)
        elif key == u'language':
            # Changes the languages, reloads all strings and reloads the settings dialog
            Globals.uLanguage = uValue
            Globals.oApp.InitPathes()
            Globals.oNotifications.SendNotification("on_language_change")
        elif key == u'locales':
            Globals.uLocalesName = uValue
            Globals.oTheScreen.LoadLocales()
        elif key == u'startrepeatdelay':
            Globals.fStartRepeatDelay = float(uValue)
        elif key == u'longpresstime':
            Globals.fLongPressTime = float(uValue)
        elif key == u'contrepeatdelay':
            Globals.fContRepeatDelay = float(uValue)
        elif key == u'clockwithseconds':
            Globals.bClockWithSeconds = (uValue == '1')
        elif key == u'longdate':
            Globals.bLongDate = (uValue == '1')
        elif key == u'longday':
            Globals.bLongDay = (uValue == '1')
        elif key == u'longmonth':
            Globals.bLongMonth = (uValue == '1')
        elif key == u'checkfornetwork':
            Globals.bConfigCheckForNetwork = (uValue == '1')
        elif key == u'vibrate':
            Globals.bVibrate = (uValue == '1')
        elif key == u'interface':
            if uValue == 'select':
                return
            Globals.oTheScreen.uInterFaceToConfig = uValue
            if Globals.oInterFaces.dInterfaces.get(uValue) is None:
                Globals.oInterFaces.LoadInterface(uValue)
            Globals.oTheScreen.AddActionShowPageToQueue(uPageName=u'Page_InterfaceSettings')
            Globals.oOrcaConfigParser.set(u'ORCA', key, u'select')
            Globals.oOrcaConfigParser.write()
        elif key == u'script':
            if uValue == 'select':
                return
            uScript = u''
            Globals.oOrcaConfigParser.set(u'ORCA', key, 'select')
            Globals.oOrcaConfigParser.write()

            tValue = uValue.split(':')
            uValue = tValue[0]
            if len(tValue) > 1:
                uScript = tValue[1]

            # Configure
            if uValue == ReplaceVars('$lvar(516)'):
                Globals.oTheScreen.uScriptToConfig = uScript
                Globals.oTheScreen.AddActionShowPageToQueue(uPageName=u'Page_ScriptSettings')

            # Run
            if uValue == ReplaceVars('$lvar(517)'):
                kwargs = {"caller": "settings"}
                Globals.oScripts.RunScript(uScript,**kwargs)
            Globals.oOrcaConfigParser.set(u'ORCA', key, u'select')
            Globals.oOrcaConfigParser.write()

        elif key == u'definition':
            ShowQuestionPopUp(uTitle='$lvar(599)', uMessage='$lvar(5026)', fktYes=Globals.oApp.on_config_change_change_definition, uStringYes='$lvar(5001)', uStringNo='$lvar(5002)')
        elif key == u'skin':
            Globals.oApp.ReStart()
        elif key == u'rootpath':
            if not Globals.bInit:
                Globals.oApp.close_settings()
                Globals.oApp._app_settings = None
                kivyConfig.write()
                Clock.schedule_once(Globals.oApp.Init_ReadConfig, 0)
            else:
                ShowMessagePopUp(uMessage=u'$lvar(5011)')
        elif key.startswith(u'soundvolume_'):
            uSoundName = key[12:]
            Globals.oSound.SetSoundVolume(uSoundName, ToInt(uValue))
            Globals.oSound.PlaySound(uSoundName)
        elif key == u'button_changedefinitionsetting':
            Globals.uDefinitionToConfigure = uValue[7:]
            Globals.oTheScreen.AddActionShowPageToQueue(uPageName=u'Page_DefinitionSettings')
        else:
            ShowMessagePopUp(uMessage=u'$lvar(5011)')

        # todo: check , if this required anymore
    elif section == Globals.uDefinitionName:
        if key in Globals.oDefinitions.aDefinitionSettingVars:
            SetVar(uVarName = key, oVarValue = value)
        ShowMessagePopUp(uMessage=u'$lvar(5011)')