()
| 13 | ) |
| 14 | |
| 15 | func (m *RootModel) catMgrBeginAdd() { |
| 16 | newCat := config.Category{Name: "New Category"} |
| 17 | m.Settings.Categories.Categories = append(m.Settings.Categories.Categories, newCat) |
| 18 | m.catMgrCursor = len(m.Settings.Categories.Categories) - 1 |
| 19 | m.catMgrIsNew = true |
| 20 | m.catMgrEditing = true |
| 21 | m.catMgrError = "" |
| 22 | m.catMgrEditField = 0 |
| 23 | m.catMgrInputs[0].SetValue(newCat.Name) |
| 24 | m.catMgrInputs[1].SetValue(newCat.Description) |
| 25 | m.catMgrInputs[2].SetValue(newCat.Pattern) |
| 26 | m.catMgrInputs[3].SetValue(newCat.Path) |
| 27 | m.updateCategoryInputWidthsForViewport() |
| 28 | m.catMgrInputs[0].Focus() |
| 29 | } |
| 30 | |
| 31 | func (m *RootModel) blurAllCatInputs() { |
| 32 | for i := range m.catMgrInputs { |
no test coverage detected