Beispiel #1
0
        public Keymap getDefaultKeymap()
        {
            List <Keymap>  list     = this.getAllKeymaps();
            KeymapSettings settings = this.getKeymapSettings();

            foreach (Keymap keymap in list)
            {
                if (keymap.Filename == settings.getDefaultKeymap())
                {
                    return(keymap);
                }
            }
            return(null);
        }
Beispiel #2
0
        public void setName(string name)
        {
            this.jsonObj.Remove("Title");
            this.jsonObj.Add("Title", name);

            //Needed to update the name in layout chooser because its names are stored in a different file
            KeymapSettings settings = new KeymapSettings(Settings.Default.keymaps_config);

            if (settings.isInLayoutChooser(this))
            {
                settings.removeFromLayoutChooser(this);
                settings.addToLayoutChooser(this);
            }

            save();
        }
Beispiel #3
0
        public void setName(string name)
        {
            this.jsonObj.Remove("Title");
            this.jsonObj.Add("Title", name);

            //Needed to update the name in layout chooser because its names are stored in a different file
            KeymapSettings settings = new KeymapSettings(Settings.Default.keymaps_config);
            if(settings.isInLayoutChooser(this))
            {
                settings.removeFromLayoutChooser(this);
                settings.addToLayoutChooser(this);
            }

            save();
        }