]> git.ozlabs.org Git - petitboot/blobdiff - ui/ncurses/nc-boot-editor.c
configure: Use AC_GNU_SOURCE
[petitboot] / ui / ncurses / nc-boot-editor.c
index bd2bf6e6abe9898779b9a1c364191957534b4874..90bd0037fca9f65c662c1d91e6f6afec983e000f 100644 (file)
@@ -16,9 +16,9 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#if defined(HAVE_CONFIG_H)
 #include "config.h"
-
-#define _GNU_SOURCE
+#endif
 
 #include <assert.h>
 #include <string.h>
@@ -136,7 +136,7 @@ static char *conditional_prefix(struct pb_boot_data *ctx,
        if (!value || !*value)
                return NULL;
 
-       sep = NULL;
+       sep = "";
        if (!prefix)
                prefix = "";
        else if (prefix[strlen(prefix)] != '/')
@@ -513,6 +513,7 @@ struct boot_editor *boot_editor_init(struct cui *cui,
        boot_editor->scr.frame.rtitle = NULL;
        boot_editor->scr.frame.help = talloc_strdup(boot_editor,
                        "Enter=accept");
+       nc_scr_frame_draw(&boot_editor->scr);
 
        if (item) {
                struct pb_boot_data *bd = cod_from_item(item)->bd;
@@ -533,6 +534,7 @@ struct boot_editor *boot_editor_init(struct cui *cui,
        boot_editor_setup_widgets(boot_editor, sysinfo);
 
        boot_editor_layout_widgets(boot_editor);
+       wrefresh(boot_editor->scr.main_ncw);
 
        return boot_editor;
 }