Restores the files for this menu from the settings.
        
        :param      settings | <QSettings>
970420
def restoreSettings(self, settings):
        
        value = unwrapVariant(settings.value('recent_files'))
        if value:
            self.setFilenames(value.split(os.path.pathsep))
566879
def load_config(self, settings=None):
        
        self._load_defaults()
        if settings:
            self.update(settings)
        else:
            config_paths = _get_config_files()
            for p in config_paths:
                conf = _process_config_file([p])
                self.update(conf)
        self._loaded = True
        self._validate()
1065942
def restoreSettings(self, settings):
        
        levels = unwrapVariant(settings.value('levels'))
        if levels:
            self.setActiveLevels(map(int, levels.split(',')))
        
        logger_levels = unwrapVariant(settings.value('loggerLevels'))
        if logger_levels:
            for key in logger_levels.split(','):
                logger, lvl = key.split(':')
                lvl = int(lvl)
                self.setLoggerLevel(logger, lvl)
        
        filt = unwrapVariant(settings.value('filter'))
        if filt:
            self.uiFilterTXT.setText(filt)
        self.uiRecordTREE.restoreSettings(settings)
1181331
public function restore()
    {
        // Restore settings before last override and delete override from stash
        if ($this->overrides) {
            $old = array_pop($this->overrides);
            $this->apply($old, $purge = true);

            return true;
        }

        return false;
    }
346904
def saveSettings(self, settings):
        
        # save order data
        settings.setValue('headerState', wrapVariant(str(self.header().saveState().toBase64())))
        settings.setValue('sortColumn', wrapVariant(str(self.sortColumn())))
        settings.setValue('sortOrder', wrapVariant(str(int(self.sortOrder()))))
        settings.setValue('sortingEnabled', wrapVariant(str(self.isSortingEnabled())))
522376
public void saveSettings() {
        mCallbacks.printOutput("Saving settings...");
        
        // Clear settings
        mCallbacks.saveExtensionSetting(scan.getSettingsNamespace() + SETTING_URL, null);
        
        // Store settings
        mCallbacks.printOutput("Saving URL: " + urlTextField.getText());
        mCallbacks.saveExtensionSetting(scan.getSettingsNamespace() + SETTING_URL, urlTextField.getText());
    }
845554
def update(self, settings):
        
        settings = self.clean(settings)

        # Update internal dict
        self._settings.update(settings)

        # Push every setting items as class object attributes
        self.set_settings(settings)

        return self._settings
1311428
private static void storeRecentConnectionSettings(Hashtable settings) {

        try {
            if (recentSettings == null) {
                setHomeDir();

                if (homedir == null) {
                    return;
                }

                recentSettings = new File(homedir, fileName);

                if (!recentSettings.exists()) {

//                    recentSettings.createNewFile();
                }
            }

            if (settings == null || settings.size() == 0) {
                return;
            }

            // setup a stream to a physical file on the filesystem
            FileOutputStream   out = new FileOutputStream(recentSettings);
            ObjectOutputStream objStream = new ObjectOutputStream(out);
            Enumeration        en        = settings.elements();

            while (en.hasMoreElements()) {
                objStream.writeObject(en.nextElement());
            }

            objStream.flush();
            objStream.close();
            out.close();
        } catch (Throwable t) {}
    }
634356
private static function restoreIni()
    {
        foreach (self::$origIniSettings as $settingName => $settingValue) {
            switch ($settingName) {
                case 'error_reporting':
                    error_reporting($settingValue);
                    break;
                default:
                    ini_set($settingName, $settingValue);
            }
        }
    }
366499
public function backupFormSettings()
    {
        $settings = array(
            'style'     => $this->style,
            'colSize'   => $this->colSize,
            'widgetCol' => $this->widgetCol,
            'labelCol'  => $this->labelCol,
            'simpleCol' => $this->simpleCol,
        );

        array_push($this->settingsStack, $settings);
    }
540806
def clean_up(self):
        
        self.submenu.join()
        self.menu.clear_screen()
        self.menu.resume()
919493
public function reset(){
    	$originalSettings = $this->settings;
    	$this->settings = array();
    	if(file_put_contents($this->cacheFileName, "{}") === FALSE){
    		$this->settings = $originalSettings;
    		return FALSE;
    	}
    	return TRUE;
    }
665131
def clear(self):
        
        if self._customFormat:
            self._customFormat.clear()
        else:
            super(XSettings, self).clear()
351126
public function restore(array $settings = array())
    {
        $settings = array_values($settings);

        $reflection = new ReflectionMethod(get_class($this), '__construct');
        $alreadySet = $reflection->getNumberOfParameters();

        $index = 0;

        foreach($this->settings as &$setting)
        {
            if($alreadySet > $index)
            {
                continue;
            }

            if(array_key_exists($index, $settings))
            {
                $setting = $settings[$index] === '' ? NULL : $settings[$index];
            }

            $index++;
        }
    }
1129993
def _remove_setting(section, name, configfile, save=False):
    '''
    '''
    removed = False
    config = _load_config(configfile)
    if section in config:
        if name.lower() in config[section]:
            removed = config.remove_option(section, name)

    # Does the user want to save the file?
    if removed and save:
        write_config(configfile, config)

    return removed
1365621
private void resetMenuItems(boolean enable) {
        for (int i = 0; i < severityItemList.length; ++i) {
            MenuItem menuItem = severityItemList[i];
            menuItem.setEnabled(enable);
            menuItem.setSelection(false);
        }
    }
154412
def restoreSettings(self, settings, merge=False, loadProfile=True):
        
        value = unwrapVariant(settings.value('profile_toolbar'))
        if not value:
            return
        
        self.loadString(value, merge, loadProfile=loadProfile)