How to use the ko/prefs.setString function in ko

To help you get started, we’ve selected a few ko examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Komodo / KomodoEdit / src / chrome / komodo / content / startupWizard / startupWizard.js View on Github external
this.onFinish = () =>
    {
        var koCS = require("ko/colorscheme");
        
        prefs.setString("widget-scheme", fields.colorScheme.value());
        
        koCS.applyEditor(fields.colorScheme.value());
        koCS.applyInterface(fields.colorScheme.value(), true);
        
        prefs.setString("keybinding-scheme", fields.keybinding.value());
        prefs.setString("selectedbrowser", fields.browser.value());
        prefs.setBoolean("ui.classic.mode", fields.classicMode.checked());
        prefs.setBoolean("ui.classic.toolbar", fields.classicMode.checked());
        prefs.setBoolean("ui.classic.statusbar", fields.classicMode.checked());
        prefs.setBoolean("ui.hide.chrome", ! fields.nativeBorders.checked());
        prefs.setBoolean("editShowMinimap", fields.minimap.checked());
        prefs.setBoolean("useTabs", fields.taborspace.checked());
        prefs.setLong("editWrapType", fields.wrapping.checked() ? 2 : 0);
        prefs.setBoolean("editSmartWrapSelection", fields.autoDelimiters.checked());
        prefs.setBoolean("codeintel_completion_auto_fillups_enabled", fields.autofill.checked());
        prefs.setBoolean("showLineNumbers", fields.showLineNumbers.checked());
github Komodo / KomodoEdit / src / chrome / komodo / content / startupWizard / startupWizard.js View on Github external
prefs.setBoolean("useTabs", fields.taborspace.checked());
        prefs.setLong("editWrapType", fields.wrapping.checked() ? 2 : 0);
        prefs.setBoolean("editSmartWrapSelection", fields.autoDelimiters.checked());
        prefs.setBoolean("codeintel_completion_auto_fillups_enabled", fields.autofill.checked());
        prefs.setBoolean("showLineNumbers", fields.showLineNumbers.checked());
        prefs.setBoolean("codeintelAutoInsertEndTag", fields.softchars.checked());
        prefs.setBoolean("editSmartSoftCharacters", fields.softchars.checked());
        prefs.setLong("tabWidth", fields.indentWidth.value());
        prefs.setLong("indentWidth", fields.indentWidth.value());
        prefs.setBoolean("analytics_enabled", fields.analytics.checked());
        
        prefs.setBoolean("enableAutoAbbreviations", true);
        if (fields.snippetBehavior.value() == "auto")
            prefs.deletePref("autoAbbreviationTriggerCharacters");
        else
            prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
        
        return true;
    };
github Komodo / KomodoEdit / src / modules / console / content / jsconsole / console.js View on Github external
function setHistory(history) {
        var prefs = require("ko/prefs");
        prefs.setString("console_history", JSON.stringify(history));
    }
github Komodo / KomodoEdit / src / chrome / komodo / content / startupWizard / startupWizard.js View on Github external
this.onFinish = () =>
    {
        var koCS = require("ko/colorscheme");
        
        prefs.setString("widget-scheme", fields.colorScheme.value());
        
        koCS.applyEditor(fields.colorScheme.value());
        koCS.applyInterface(fields.colorScheme.value(), true);
        
        prefs.setString("keybinding-scheme", fields.keybinding.value());
        prefs.setString("selectedbrowser", fields.browser.value());
        prefs.setBoolean("ui.classic.mode", fields.classicMode.checked());
        prefs.setBoolean("ui.classic.toolbar", fields.classicMode.checked());
        prefs.setBoolean("ui.classic.statusbar", fields.classicMode.checked());
        prefs.setBoolean("ui.hide.chrome", ! fields.nativeBorders.checked());
        prefs.setBoolean("editShowMinimap", fields.minimap.checked());
        prefs.setBoolean("useTabs", fields.taborspace.checked());
        prefs.setLong("editWrapType", fields.wrapping.checked() ? 2 : 0);
        prefs.setBoolean("editSmartWrapSelection", fields.autoDelimiters.checked());
        prefs.setBoolean("codeintel_completion_auto_fillups_enabled", fields.autofill.checked());
        prefs.setBoolean("showLineNumbers", fields.showLineNumbers.checked());
        prefs.setBoolean("codeintelAutoInsertEndTag", fields.softchars.checked());
        prefs.setBoolean("editSmartSoftCharacters", fields.softchars.checked());
        prefs.setLong("tabWidth", fields.indentWidth.value());
        prefs.setLong("indentWidth", fields.indentWidth.value());
        prefs.setBoolean("analytics_enabled", fields.analytics.checked());
github Komodo / KomodoEdit / src / chrome / komodo / content / sdk / colorscheme.js View on Github external
this.applyEditor = (name) =>
    {
        prefs.setString("editor-scheme", name);
        var observerSvc = Cc["@mozilla.org/observer-service;1"].
                            getService(Ci.nsIObserverService);
        observerSvc.notifyObservers(null, 'scheme-changed', name);
    }
github Komodo / KomodoEdit / src / chrome / komodo / content / sdk / colorscheme.js View on Github external
this.applyInterface = (name, noDelay = false) =>
    {
        prefs.setString("interface-scheme", name);
        
        var timers = require("sdk/timers");
        timers.clearTimeout(_applyInterface.timer);
        
        if (noDelay)
            _applyInterface();
        else
            _applyInterface.timer = timers.setTimeout(_applyInterface, 50);
    }
github Komodo / KomodoEdit / src / chrome / komodo / content / dialogs / colorscheme.js View on Github external
this.populatePropertiesList();
            prefs.deletePref(p);
        }
        else if (language == -2)
        {
            selectedLanguage = language;
            this.loadSample();
            this.populateInterfacePropertiesList();
            prefs.deletePref(p);
        }
        else
        {
            selectedLanguage = language;
            this.loadSample();
            this.populateLanguagePropertiesList();
            prefs.setString(p, language);
        }
    };
github Komodo / KomodoEdit / src / chrome / komodo / content / startupWizard / startupWizard.js View on Github external
this.onFinish = () =>
    {
        var koCS = require("ko/colorscheme");
        
        prefs.setString("widget-scheme", fields.colorScheme.value());
        
        koCS.applyEditor(fields.colorScheme.value());
        koCS.applyInterface(fields.colorScheme.value(), true);
        
        prefs.setString("keybinding-scheme", fields.keybinding.value());
        prefs.setString("selectedbrowser", fields.browser.value());
        prefs.setBoolean("ui.classic.mode", fields.classicMode.checked());
        prefs.setBoolean("ui.classic.toolbar", fields.classicMode.checked());
        prefs.setBoolean("ui.classic.statusbar", fields.classicMode.checked());
        prefs.setBoolean("ui.hide.chrome", ! fields.nativeBorders.checked());
        prefs.setBoolean("editShowMinimap", fields.minimap.checked());
        prefs.setBoolean("useTabs", fields.taborspace.checked());
        prefs.setLong("editWrapType", fields.wrapping.checked() ? 2 : 0);
        prefs.setBoolean("editSmartWrapSelection", fields.autoDelimiters.checked());
        prefs.setBoolean("codeintel_completion_auto_fillups_enabled", fields.autofill.checked());
        prefs.setBoolean("showLineNumbers", fields.showLineNumbers.checked());
        prefs.setBoolean("codeintelAutoInsertEndTag", fields.softchars.checked());
        prefs.setBoolean("editSmartSoftCharacters", fields.softchars.checked());
        prefs.setLong("tabWidth", fields.indentWidth.value());
        prefs.setLong("indentWidth", fields.indentWidth.value());
        prefs.setBoolean("analytics_enabled", fields.analytics.checked());
github Komodo / KomodoEdit / src / chrome / komodo / content / sdk / colorscheme.js View on Github external
this.applyWidgets = (name, noDelay = false) =>
    {
        prefs.setString("widget-scheme", name);
        
        var timers = require("sdk/timers");
        timers.clearTimeout(_applyInterface.timer);
        
        if (noDelay)
            _applyInterface();
        else
            _applyInterface.timer = timers.setTimeout(_applyInterface, 50);
    }
github Defman21 / komodo-terminal-butterfly / content / widget.js View on Github external
this._savePinnedObject = () => {
        require('ko/prefs').setString('komodo_terminal_pinned_tabs', JSON.stringify(pinned));
    };