Exemplo n.º 1
0
 def _setValue(name, value, setting, force=False):
     if name == _BOOTCAMP_MINIMAP_SIZE_SETTINGS_KEY and setting == KEY_SETTINGS:
         fds = AccountSettings._readSection(
             AccountSettings._readUserSection(), setting)
         fds.write(name, base64.b64encode(pickle.dumps(value)))
         AccountSettings.onSettingsChanging(name, value)
     else:
         AccountSettings._setValue(name, value, setting, force)
Exemplo n.º 2
0
 def _getValue(name, setting, force=False):
     if name == _BOOTCAMP_MINIMAP_SIZE_SETTINGS_KEY and setting == KEY_SETTINGS:
         fds = AccountSettings._readSection(
             AccountSettings._readUserSection(), setting)
         if not fds.has_key(name):
             value = 2 if BigWorld.screenWidth(
             ) < BootcampAccountSettings.__SCREEN_WIDTH and BigWorld.screenHeight(
             ) < BootcampAccountSettings.__SCREEN_HEIGHT else 3
             fds.write(name, base64.b64encode(pickle.dumps(value)))
             return value
     return AccountSettings._getValue(name, setting, force)