tui: properly initialize the IP4 and IP6 settings on new connections

We need to initialize the methods.
This commit is contained in:
Dan Winship
2014-01-24 15:54:01 -05:00
parent 54dab9caf9
commit aa1b262091
2 changed files with 6 additions and 0 deletions

View File

@@ -123,6 +123,9 @@ nmt_page_ip4_constructed (GObject *object)
s_ip4 = nm_connection_get_setting_ip4_config (conn);
if (!s_ip4) {
s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
g_object_set (G_OBJECT (s_ip4),
NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO,
NULL);
nm_connection_add_setting (conn, (NMSetting *) s_ip4);
}

View File

@@ -123,6 +123,9 @@ nmt_page_ip6_constructed (GObject *object)
s_ip6 = nm_connection_get_setting_ip6_config (conn);
if (!s_ip6) {
s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new ();
g_object_set (G_OBJECT (s_ip6),
NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO,
NULL);
nm_connection_add_setting (conn, (NMSetting *) s_ip6);
}