Esempio n. 1
0
 def UpdateSettings(self):
     prefskey = self.prefskey
     if prefskey is None:
         return
     config = prefskey[-1]
     prefstype = prefskey[:-1]
     s = GetAttrs(settings, *prefstype)
     if s:
         s.Set(config, self.GetValue())
Esempio n. 2
0
 def UpdateSettings(self):
     prefskey = self.prefskey
     if prefskey is None:
         return
     config = prefskey[-1]
     prefstype = prefskey[:-1]
     s = GetAttrs(settings, *prefstype)
     try:
         s.Set(config, self.GetValue())
     except:
         log.LogError('Failed to assign setting to: %s, %s' %
                      (prefstype, config))
Esempio n. 3
0
 def OnHandleMouseUp(self, *args):
     uicore.uilib.UnclipCursor()
     self.dragging = 0
     if self.config:
         if len(self.config) == 3:
             cfgName, prefsType, defaultValue = self.config
             if prefsType:
                 si = GetAttrs(settings, *prefsType)
                 if si:
                     value = si.Set(cfgName, self.value)
         settings.user.ui.Set(self.config, self.value)
     if self.EndSetSliderValue:
         self.EndSetSliderValue(self)
Esempio n. 4
0
 def UpdateSettings(self):
     prefstype = self.data.get('prefstype', None)
     if prefstype is None:
         return
     if self._groupName and not self._checked:
         return
     config = self.data.get('config', None)
     value = self.data.get('value', None)
     if value is None:
         value = self._checked
     s = GetAttrs(settings, *prefstype)
     try:
         s.Set(config, value)
     except:
         log.LogError('Failed to assign setting to: %s, %s' %
                      (prefstype, config))