mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 05:50:21 +01:00
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
This commit is contained in:
parent
a3de4283ea
commit
96a5ad51c2
1 changed files with 4 additions and 3 deletions
|
|
@ -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,8 +121,9 @@ 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);
|
||||
subprogram = nmt_newt_listbox_get_active_key (listbox);
|
||||
widget = nmt_newt_form_run_sync (form);
|
||||
if (widget)
|
||||
subprogram = nmt_newt_listbox_get_active_key (listbox);
|
||||
g_object_unref (form);
|
||||
|
||||
if (subprogram)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue