From a68cae0b9d1b165eef07011011a163b906e0587c Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Fri, 13 Dec 2013 15:18:07 +0800 Subject: ui/ncurses: Add help to sysinfo screen Signed-off-by: Jeremy Kerr --- ui/ncurses/Makefile.am | 1 + ui/ncurses/nc-sysinfo-help.c | 3 +++ ui/ncurses/nc-sysinfo.c | 4 ++++ 3 files changed, 8 insertions(+) create mode 100644 ui/ncurses/nc-sysinfo-help.c diff --git a/ui/ncurses/Makefile.am b/ui/ncurses/Makefile.am index 5389ed9..3251489 100644 --- a/ui/ncurses/Makefile.am +++ b/ui/ncurses/Makefile.am @@ -43,6 +43,7 @@ libpbnc_la_SOURCES = \ nc-scr.h \ nc-sysinfo.c \ nc-sysinfo.h \ + nc-sysinfo-help.c \ nc-textscreen.c \ nc-textscreen.h \ nc-widgets.c \ diff --git a/ui/ncurses/nc-sysinfo-help.c b/ui/ncurses/nc-sysinfo-help.c new file mode 100644 index 0000000..22b470d --- /dev/null +++ b/ui/ncurses/nc-sysinfo-help.c @@ -0,0 +1,3 @@ +const char *sysinfo_help_text = "\ +This screen shows general information about the system, for use when \ +configuring boot behaviour.\n"; diff --git a/ui/ncurses/nc-sysinfo.c b/ui/ncurses/nc-sysinfo.c index e907e3d..aa1daea 100644 --- a/ui/ncurses/nc-sysinfo.c +++ b/ui/ncurses/nc-sysinfo.c @@ -34,6 +34,8 @@ struct sysinfo_screen { struct text_screen text_scr; }; +extern const char *sysinfo_help_text; + struct nc_scr *sysinfo_screen_scr(struct sysinfo_screen *screen) { return text_screen_scr(&screen->text_scr); @@ -111,6 +113,8 @@ struct sysinfo_screen *sysinfo_screen_init(struct cui *cui, screen = talloc_zero(cui, struct sysinfo_screen); text_screen_init(&screen->text_scr, cui, "Petitboot System Information", on_exit); + text_screen_set_help(&screen->text_scr, + "System Information", sysinfo_help_text); sysinfo_screen_update(screen, sysinfo); -- cgit v1.2.1