tui: additional fix for 'primary' option

The entry can't be empty. Otherwise removing the value and saving connection
would result in the primary option containing only the first character of the
original value.
This commit is contained in:
Jiří Klimeš 2014-09-22 19:12:16 +02:00
parent 54ed36e3c0
commit 37f12088e4

View file

@ -369,7 +369,7 @@ nmt_page_bond_constructed (GObject *object)
nmt_page_grid_append (grid, _("Mode"), widget, NULL);
priv->mode = NMT_NEWT_POPUP (widget);
widget = nmt_newt_entry_new (40, 0);
widget = nmt_newt_entry_new (40, NMT_NEWT_ENTRY_NONEMPTY);
g_signal_connect (widget, "notify::text",
G_CALLBACK (primary_widget_changed), bond);
nmt_page_grid_append (grid, _("Primary"), widget, NULL);