diff options
author | Thomas Haller <thaller@redhat.com> | 2017-09-04 14:32:09 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-09-05 18:44:04 +0200 |
commit | ccc2af0efb4b3c01188552d0d4b041c9cc88d185 (patch) | |
tree | 4b30f227e2266cd7264867620714a7e24aa86541 | |
parent | 9400f0d84d597698f1b969906c318a55df7a786a (diff) | |
download | NetworkManager-ccc2af0efb4b3c01188552d0d4b041c9cc88d185.tar.gz |
tui: allow empty route metric to indicate default
When entering a manual route, the metric defaults internally to "-1".
That is indicated in the TUI as empty entry. We must allow that as
valid configuration.
-rw-r--r-- | clients/tui/nmt-route-entry.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/tui/nmt-route-entry.c b/clients/tui/nmt-route-entry.c index f7c75e0aaa..1f58fc0000 100644 --- a/clients/tui/nmt-route-entry.c +++ b/clients/tui/nmt-route-entry.c @@ -126,7 +126,7 @@ nmt_route_entry_constructed (GObject *object) priv->dest = nmt_ip_entry_new (priv->ip_entry_width, priv->family, TRUE, FALSE); priv->next_hop = nmt_ip_entry_new (priv->ip_entry_width, priv->family, FALSE, TRUE); - priv->metric = nmt_newt_entry_numeric_new (priv->metric_entry_width, 0, 65535); + priv->metric = nmt_newt_entry_numeric_new_full (priv->metric_entry_width, 0, 65535, TRUE); nmt_newt_grid_add (grid, priv->dest, 0, 0); warning_label = create_warning_label (priv->dest); |