Commit 96a5ad51 authored by Dan Winship's avatar Dan Winship
Browse files

tui: fix using Escape from main menu

We weren't checking whether the form closed because the menu was
activated or because the user hit Escape
parent a3de4283
......@@ -83,7 +83,7 @@ nmtui_main (int argc, char **argv)
NmtNewtGrid *grid;
NmtNewtListbox *listbox;
NmtNewtButtonBox *bbox;
NmtuiSubprogram subprogram;
NmtuiSubprogram subprogram = NULL;
int i;
form = g_object_new (NMT_TYPE_NEWT_FORM,
......@@ -121,7 +121,8 @@ nmtui_main (int argc, char **argv)
ok = nmt_newt_button_box_add_end (bbox, _("OK"));
nmt_newt_widget_set_exit_on_activate (ok, TRUE);
nmt_newt_form_run_sync (form);
widget = nmt_newt_form_run_sync (form);
if (widget)
subprogram = nmt_newt_listbox_get_active_key (listbox);
g_object_unref (form);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment