1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Reimpliments the module configuration validation

Now supports displaying errors from multiple widgets.
This commit is contained in:
Chris Cummer
2019-07-05 23:01:25 -07:00
parent c308d1b6c2
commit b07f3c5e67
65 changed files with 371 additions and 363 deletions

View File

@@ -32,7 +32,7 @@ func (widget *Widget) contentFrom(data []*transmissionrpc.Torrent) string {
func (widget *Widget) display() {
content := widget.contentFrom(widget.torrents)
widget.ScrollableWidget.Redraw(widget.CommonSettings.Title, content, false)
widget.ScrollableWidget.Redraw(widget.CommonSettings().Title, content, false)
}
func (widget *Widget) prettyTorrentName(name string) string {

View File

@@ -64,7 +64,7 @@ func (widget *Widget) Refresh() {
torrents, err := widget.Fetch()
if err != nil {
widget.SetItemCount(0)
widget.ScrollableWidget.Redraw(widget.CommonSettings.Title, err.Error(), false)
widget.ScrollableWidget.Redraw(widget.CommonSettings().Title, err.Error(), false)
return
}