From 39dbcb6c5e6eb3177cce516dae5b39dcc299826a Mon Sep 17 00:00:00 2001 From: David Lechner Date: Fri, 6 Mar 2015 16:27:19 -0600 Subject: [PATCH] [network] Add support for IPv4 sharing The "shared" network connection type was not displayed in the IPv4 address combo. This add it to the combo box and adds support for handling it when it is selected. --- panels/network/connection-editor/ce-page-ip4.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/panels/network/connection-editor/ce-page-ip4.c b/panels/network/connection-editor/ce-page-ip4.c index 30acac3..33656e0 100644 --- a/panels/network/connection-editor/ce-page-ip4.c +++ b/panels/network/connection-editor/ce-page-ip4.c @@ -623,6 +623,10 @@ connect_ip4_page (CEPageIP4 *page) METHOD_COL_NAME, _("Link-Local Only"), METHOD_COL_METHOD, IP4_METHOD_LINK_LOCAL, -1); + gtk_list_store_insert_with_values (store, &iter, -1, + METHOD_COL_NAME, _("Shared to Other Computers"), + METHOD_COL_METHOD, IP4_METHOD_SHARED, + -1); gtk_combo_box_set_model (page->method, GTK_TREE_MODEL (store)); @@ -643,7 +647,7 @@ connect_ip4_page (CEPageIP4 *page) g_signal_connect_swapped (page->never_default, "toggled", G_CALLBACK (ce_page_changed), page); g_signal_connect (page->method, "changed", G_CALLBACK (method_changed), page); - if (method != IP4_METHOD_SHARED && method != IP4_METHOD_DISABLED) + if (method != IP4_METHOD_DISABLED) gtk_combo_box_set_active (page->method, method); } @@ -696,6 +700,9 @@ ui_to_setting (CEPageIP4 *page) case IP4_METHOD_LINK_LOCAL: method = NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL; break; + case IP4_METHOD_SHARED: + method = NM_SETTING_IP4_CONFIG_METHOD_SHARED; + break; default: case IP4_METHOD_AUTO: method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;