summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-cui.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ncurses/nc-cui.c')
-rw-r--r--ui/ncurses/nc-cui.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/ncurses/nc-cui.c b/ui/ncurses/nc-cui.c
index 6aa2a28..d74c1a4 100644
--- a/ui/ncurses/nc-cui.c
+++ b/ui/ncurses/nc-cui.c
@@ -34,6 +34,7 @@
#include "process/process.h"
#include "ui/common/discover-client.h"
#include "nc-cui.h"
+#include "nc-config.h"
#include "nc-sysinfo.h"
static struct cui_opt_data *cod_from_item(struct pmenu_item *item)
@@ -251,6 +252,20 @@ void cui_show_sysinfo(struct cui *cui)
cui_set_current(cui, sysinfo_screen_scr(cui->sysinfo_screen));
}
+static void cui_config_exit(struct cui *cui)
+{
+ cui_set_current(cui, &cui->main->scr);
+ talloc_free(cui->config_screen);
+ cui->config_screen = NULL;
+}
+
+void cui_show_config(struct cui *cui)
+{
+ cui->config_screen = config_screen_init(cui, cui->config,
+ cui->sysinfo, cui_config_exit);
+ cui_set_current(cui, config_screen_scr(cui->config_screen));
+}
+
/**
* cui_set_current - Set the currently active screen and redraw it.
*/
OpenPOWER on IntegriCloud