mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
tui/bond: remove primary option if mode is not active-backup (rh #1142864)
Just drop it as we disable the widget in UI. https://bugzilla.redhat.com/show_bug.cgi?id=1142864
This commit is contained in:
parent
8ee53b79f6
commit
a36a3a9a52
|
@ -252,10 +252,14 @@ mode_widget_changed (GObject *object,
|
|||
} else
|
||||
nmt_newt_component_set_sensitive (NMT_NEWT_COMPONENT (priv->monitoring), TRUE);
|
||||
|
||||
if (!strcmp (mode, "active-backup"))
|
||||
if (!strcmp (mode, "active-backup")) {
|
||||
nmt_newt_widget_set_visible (NMT_NEWT_WIDGET (priv->primary), TRUE);
|
||||
else
|
||||
nm_setting_bond_add_option (priv->s_bond, NM_SETTING_BOND_OPTION_PRIMARY,
|
||||
nmt_newt_entry_get_text (priv->primary));
|
||||
} else {
|
||||
nmt_newt_widget_set_visible (NMT_NEWT_WIDGET (priv->primary), FALSE);
|
||||
nm_setting_bond_remove_option (priv->s_bond, NM_SETTING_BOND_OPTION_PRIMARY);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue