Chris Cummer
cde904ff08
Use errcheck to find unhandled errors ( #795 )
...
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-17 08:26:16 -08:00
Chris Cummer
3a388fba23
20191215 code improvements ( #790 )
...
* Upgrade godo to latest
* Fix a bunch of issues found by
* Running staticcheck on a codebase for the first time is a sobering experience
* go mod tidy
* More static improvements
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:25:29 -08:00
Chris Cummer
bf877f5fa7
Constantize the defaultFocus value for each module
2019-09-22 18:12:29 -07:00
Sean Smith
14e7619075
Renormalize the redraw function
...
Have all instances take a function
Update the remaining modules to take this into account
Numerous smaller refactors to make some widgets work more or less the same
2019-08-27 21:51:37 -04:00
Sean Smith
3a716bcf9a
Convert the bulk of modules over to RedrawFunc
2019-08-26 23:07:02 -04:00
Chris Cummer
523a0bec2c
Remove the need for every module to define a widget.Refresh keyboard control
2019-08-23 21:18:51 -07:00
Chris Cummer
5337656c58
Remove the need for every module to define a widget.ShowHelp keyboard control
...
This common functionality is moved up to KeyboardWidget. Modules now
include widget.InitializeCommonControls() instead.
2019-08-23 21:18:51 -07:00
Chris Cummer
4e46fff145
Move the utils.go file into the /utils directory
2019-08-05 10:50:12 -07:00
Chris Cummer
dbc047516d
Move all components responsible for module composition into /view
2019-08-04 21:42:40 -07:00
Chris Cummer
7234f83073
Remove stray Log() statements from SpotifyWeb
2019-08-02 02:11:05 -07:00
Chris Cummer
b07f3c5e67
Reimpliments the module configuration validation
...
Now supports displaying errors from multiple widgets.
2019-07-07 16:04:43 -07:00
Sean Smith
a2f5db7847
Harmonize keyboard controls
...
Make sure everyone has a refresh option
Have specific ordering:
- Help
- Refresh
- Select next
- Select prev
- ...
Add unselect where applicable
2019-05-20 18:45:08 -04:00
Chris Cummer
a2e67fa498
Merge branch 'master' into autohelp
2019-05-12 10:48:29 -07:00
Sean Smith
cd35d1e0a3
Re-add command line help
2019-05-11 19:47:59 -04:00
Sean Smith
7f3daaac59
Have keyboard widget manage its own help
...
Define help with keys
This means that keys and help are automatically in sync
This means that you can't define keys, but forget help
This unfortunately also means that formatting may not be quite as good
2019-05-11 12:15:52 -04:00
Sean Smith
42821b3102
Clean up drawing functionality
...
Fix up a bunch of missed places that can use the standardized `Redraw` method
2019-05-11 12:11:26 -04:00
Sean Smith
018d2af3ae
Add a global Redraw method for TextWidget
...
Partially addresses #429 , by centralizing widget drawing
2019-05-10 08:42:37 -07:00
Chris Cummer
2d0706c40b
WTF-427 Use new keyboard implementation for widgets. Closes #427
2019-05-06 12:54:07 -07:00
Sean Smith
14abd422b2
Add default titles, to mimic original behavior
...
Have the modules set their own titles
If no title is specified, use this title, rather than default to name
2019-04-30 23:38:37 -04:00
Sean Smith
5abd701b40
Decouple modules from global config
...
Rather than referencing wtc.Config, instead pass the global config
Also, look up config for the module early and pass that in sooner, to deal with fewer long paths and get rid of the
ConfigKey variable
2019-04-27 22:26:23 -04:00
Chris Cummer
5445309aa0
WTF-315 Fix race conditions caused by writing to view
2019-04-25 19:39:49 -07:00
Chris Cummer
f09d08bda2
WTF-400 Common settings implemented
2019-04-18 18:22:19 -07:00
Chris Cummer
b50c762dab
WTF-400 Move name and configKey values from widget to settings
2019-04-17 17:16:26 -07:00
Chris Cummer
b4868a54e6
WTF-400 SpotifyWeb extracted to new config format
2019-04-16 02:54:10 -07:00
Sean Smith
8030380f89
Migrate all modules to their own subfolder
...
Handles #375
2019-02-18 11:16:34 -05:00