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:
@@ -8,11 +8,11 @@ func (widget *Widget) display() {
|
||||
|
||||
project := widget.currentGerritProject()
|
||||
if project == nil {
|
||||
widget.Redraw(widget.CommonSettings.Title, "Gerrit project data is unavailable", true)
|
||||
widget.Redraw(widget.CommonSettings().Title, "Gerrit project data is unavailable", true)
|
||||
return
|
||||
}
|
||||
|
||||
title := fmt.Sprintf("%s- %s", widget.CommonSettings.Title, widget.title(project))
|
||||
title := fmt.Sprintf("%s- %s", widget.CommonSettings().Title, widget.title(project))
|
||||
|
||||
_, _, width, _ := widget.View.GetRect()
|
||||
str := widget.settings.common.SigilStr(len(widget.GerritProjects), widget.Idx, width) + "\n"
|
||||
|
||||
@@ -77,7 +77,7 @@ func (widget *Widget) Refresh() {
|
||||
if err != nil {
|
||||
widget.View.SetWrap(true)
|
||||
|
||||
widget.Redraw(widget.CommonSettings.Title, err.Error(), true)
|
||||
widget.Redraw(widget.CommonSettings().Title, err.Error(), true)
|
||||
return
|
||||
}
|
||||
widget.gerrit = gerrit
|
||||
|
||||
Reference in New Issue
Block a user