ui/ncurses: Add help to sysinfo screen
authorJeremy Kerr <jk@ozlabs.org>
Fri, 13 Dec 2013 07:18:07 +0000 (15:18 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 31 Jan 2014 00:46:34 +0000 (08:46 +0800)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/Makefile.am
ui/ncurses/nc-sysinfo-help.c [new file with mode: 0644]
ui/ncurses/nc-sysinfo.c

index 5389ed9b9a9c28e119830a7ccce25dd7597b32ce..3251489fbb335f018610b915ac57fb47df585590 100644 (file)
@@ -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 (file)
index 0000000..22b470d
--- /dev/null
@@ -0,0 +1,3 @@
+const char *sysinfo_help_text = "\
+This screen shows general information about the system, for use when \
+configuring boot behaviour.\n";
index e907e3dc88ae6836affdc0bf312780f47da446f8..aa1daea612354618fe23b387fd8184056a4b13dd 100644 (file)
@@ -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);