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:
Lubomir Rintel 2014-09-19 12:24:24 +02:00 committed by Jiří Klimeš
parent 8ee53b79f6
commit a36a3a9a52

View file

@ -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