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 = "Bittrex"
|
||||
const (
|
||||
defaultFocusable = false
|
||||
defaultTitle = "Bittrex"
|
||||
)
|
||||
|
||||
type colors struct {
|
||||
base struct {
|
||||
@@ -37,7 +40,7 @@ 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),
|
||||
}
|
||||
|
||||
settings.colors.base.name = ymlConfig.UString("colors.base.name")
|
||||
|
||||
@@ -11,10 +11,14 @@ import (
|
||||
"github.com/wtfutil/wtf/view"
|
||||
)
|
||||
|
||||
var ok = true
|
||||
var errorText = ""
|
||||
const (
|
||||
baseURL = "https://bittrex.com/api/v1.1/public/getmarketsummary"
|
||||
)
|
||||
|
||||
const baseURL = "https://bittrex.com/api/v1.1/public/getmarketsummary"
|
||||
var (
|
||||
errorText = ""
|
||||
ok = true
|
||||
)
|
||||
|
||||
// Widget define wtf widget to register widget later
|
||||
type Widget struct {
|
||||
@@ -27,7 +31,7 @@ type Widget struct {
|
||||
// NewWidget Make new instance of widget
|
||||
func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: view.NewTextWidget(app, settings.common, false),
|
||||
TextWidget: view.NewTextWidget(app, settings.common),
|
||||
|
||||
settings: settings,
|
||||
summaryList: summaryList{},
|
||||
|
||||
Reference in New Issue
Block a user