How to use the ko/prefs.setBoolean 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());
        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);
github Komodo / KomodoEdit / src / chrome / komodo / content / startupWizard / startupWizard.js View on Github external
{
        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());
        
        prefs.setBoolean("enableAutoAbbreviations", true);
        if (fields.snippetBehavior.value() == "auto")
            prefs.deletePref("autoAbbreviationTriggerCharacters");
        else
            prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
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());
        
        prefs.setBoolean("enableAutoAbbreviations", true);
        if (fields.snippetBehavior.value() == "auto")
            prefs.deletePref("autoAbbreviationTriggerCharacters");
github Komodo / KomodoEdit / src / chrome / komodo / content / startupWizard / startupWizard.js View on Github external
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());
        
        prefs.setBoolean("enableAutoAbbreviations", true);
        if (fields.snippetBehavior.value() == "auto")
            prefs.deletePref("autoAbbreviationTriggerCharacters");
        else
            prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
        
        return true;
    };
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());
        
        prefs.setBoolean("enableAutoAbbreviations", true);
        if (fields.snippetBehavior.value() == "auto")
github Komodo / KomodoEdit / src / chrome / komodo / content / startupWizard / startupWizard.js View on Github external
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());
        
        prefs.setBoolean("enableAutoAbbreviations", true);
        if (fields.snippetBehavior.value() == "auto")
            prefs.deletePref("autoAbbreviationTriggerCharacters");
        else
            prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
        
        return true;
    };
github Komodo / KomodoEdit / src / chrome / komodo / content / startupWizard / startupWizard.js View on Github external
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());
        
        prefs.setBoolean("enableAutoAbbreviations", true);
        if (fields.snippetBehavior.value() == "auto")
            prefs.deletePref("autoAbbreviationTriggerCharacters");
        else
            prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
        
        return true;
    };
github Komodo / KomodoEdit / src / chrome / komodo / content / dialogs / colorscheme.js View on Github external
panel.find('button[label="Ok"]').on("command", () =>
        {
            if (selectedScheme.writeable)
                this.saveScheme();
                
            var applyEditor = !! panel.find('checkbox[name="editor"]').attr("checked");
            var applyInterface = !! panel.find('checkbox[name="interface"]').attr("checked");
            var applyEditorWidgets = !! panel.find('checkbox[name="editor-widgets"]').attr("checked");
            
            prefs.setBoolean("cached.colorscheme-editor.apply.editor", applyEditor);
            prefs.setBoolean("cached.colorscheme-editor.apply.interface", applyInterface);
            prefs.setBoolean("cached.colorscheme-editor.apply.editorwidgets", applyEditorWidgets);
            
            if (applyEditor)
                require("ko/colorscheme").applyEditor(selectedScheme.name);
            
            if (applyInterface)
                require("ko/colorscheme").applyInterface(selectedScheme.name);
            
            if (applyEditorWidgets)
                require("ko/colorscheme").applyWidgets(selectedScheme.name);
            
            panel.element().hidePopup();
            panel.remove();
        });
github Komodo / KomodoEdit / src / chrome / komodo / content / startupWizard / startupWizard.js View on Github external
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());
        
        prefs.setBoolean("enableAutoAbbreviations", true);
        if (fields.snippetBehavior.value() == "auto")
            prefs.deletePref("autoAbbreviationTriggerCharacters");
        else
            prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
        
        return true;
    };
github Komodo / KomodoEdit / src / chrome / komodo / content / dialogs / colorscheme.js View on Github external
panel.find('button[label="Ok"]').on("command", () =>
        {
            if (selectedScheme.writeable)
                this.saveScheme();
                
            var applyEditor = !! panel.find('checkbox[name="editor"]').attr("checked");
            var applyInterface = !! panel.find('checkbox[name="interface"]').attr("checked");
            var applyEditorWidgets = !! panel.find('checkbox[name="editor-widgets"]').attr("checked");
            
            prefs.setBoolean("cached.colorscheme-editor.apply.editor", applyEditor);
            prefs.setBoolean("cached.colorscheme-editor.apply.interface", applyInterface);
            prefs.setBoolean("cached.colorscheme-editor.apply.editorwidgets", applyEditorWidgets);
            
            if (applyEditor)
                require("ko/colorscheme").applyEditor(selectedScheme.name);
            
            if (applyInterface)
                require("ko/colorscheme").applyInterface(selectedScheme.name);
            
            if (applyEditorWidgets)
                require("ko/colorscheme").applyWidgets(selectedScheme.name);
            
            panel.element().hidePopup();
            panel.remove();
        });