1
0
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:
Chris Cummer
2019-09-18 20:34:53 -07:00
parent d6208b4730
commit bf877f5fa7
120 changed files with 421 additions and 255 deletions

View File

@@ -6,7 +6,10 @@ import (
"github.com/wtfutil/wtf/utils"
)
const defaultTitle = "Clocks"
const (
defaultFocusable = false
defaultTitle = "Clocks"
)
type colors struct {
rows struct {
@@ -26,9 +29,8 @@ type Settings struct {
}
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),
dateFormat: ymlConfig.UString("dateFormat", utils.SimpleDateFormat),
timeFormat: ymlConfig.UString("timeFormat", utils.SimpleTimeFormat),

View File

@@ -20,7 +20,7 @@ type Widget struct {
func NewWidget(app *tview.Application, settings *Settings) *Widget {
widget := Widget{
TextWidget: view.NewTextWidget(app, settings.common, false),
TextWidget: view.NewTextWidget(app, settings.common),
app: app,
settings: settings,