mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Constantize the defaultFocus value for each module
This commit is contained in:
@@ -5,7 +5,10 @@ import (
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
)
|
||||
|
||||
const defaultTitle = "Calendar"
|
||||
const (
|
||||
defaultFocusable = true
|
||||
defaultTitle = "Calendar"
|
||||
)
|
||||
|
||||
type colors struct {
|
||||
day string
|
||||
@@ -37,9 +40,8 @@ type Settings struct {
|
||||
|
||||
// NewSettingsFromYAML creates and returns an instance of Settings with configuration options populated
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
|
||||
settings := Settings{
|
||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, ymlConfig, globalConfig),
|
||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
||||
|
||||
conflictIcon: ymlConfig.UString("conflictIcon", "🚨"),
|
||||
currentIcon: ymlConfig.UString("currentIcon", "🔸"),
|
||||
|
||||
@@ -16,7 +16,7 @@ type Widget struct {
|
||||
|
||||
func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: view.NewTextWidget(app, settings.common, true),
|
||||
TextWidget: view.NewTextWidget(app, settings.common),
|
||||
|
||||
app: app,
|
||||
settings: settings,
|
||||
|
||||
Reference in New Issue
Block a user