diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2016-11-09 18:02:13 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2016-12-20 15:51:27 +0100 |
commit | 9cd3b31c738e7d1136a6cede0d41c81ae56de296 (patch) | |
tree | 1d0717e1e700590f10f3c91c8aefdbaff2650bda | |
parent | 027882f420219edd3e1a94040bd0d5f12bbc0791 (diff) | |
download | network-manager-applet-lr/ipv6-sharing.tar.gz |
editor/ip6: allow method=sharedlr/ipv6-sharing
NetworkManager supports it now.
-rw-r--r-- | src/connection-editor/ce-page.h | 3 | ||||
-rw-r--r-- | src/connection-editor/page-ip6.c | 17 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/connection-editor/ce-page.h b/src/connection-editor/ce-page.h index 537f4687..1dedd442 100644 --- a/src/connection-editor/ce-page.h +++ b/src/connection-editor/ce-page.h @@ -116,8 +116,7 @@ typedef CEPage* (*CEPageNewFunc)(NMConnectionEditor *editor, #define CE_TOOLTIP_ADDR_SHARED _("The IP address identify your computer on the network and " \ "determines the address range distributed to other computers. " \ "Click the “Add” button to add an IP address. "\ - "If no address is provided, one in the 10.42.x.x range will " \ - "be used.") + "If no address is provided, range will be determined automatically.") #define CE_LABEL_ADDR_AUTO _("Additional static addresses") #define CE_LABEL_ADDR_MANUAL _("Addresses") diff --git a/src/connection-editor/page-ip6.c b/src/connection-editor/page-ip6.c index b591bc04..d6478850 100644 --- a/src/connection-editor/page-ip6.c +++ b/src/connection-editor/page-ip6.c @@ -204,7 +204,7 @@ ip6_private_init (CEPageIP6 *self, NMConnection *connection) gtk_list_store_set (priv->method_store, &iter, METHOD_COL_NAME, _("Shared to other computers"), METHOD_COL_NUM, IP6_METHOD_SHARED, - METHOD_COL_ENABLED, FALSE, + METHOD_COL_ENABLED, TRUE, -1); } @@ -283,6 +283,11 @@ method_changed (GtkComboBox *combo, gpointer user_data) tooltip = CE_TOOLTIP_ADDR_MANUAL; label = CE_LABEL_ADDR_MANUAL; break; + case IP6_METHOD_SHARED: + addr_enabled = dns_enabled = routes_enabled = TRUE; + tooltip = CE_TOOLTIP_ADDR_SHARED; + label = CE_LABEL_ADDR_SHARED; + break; case IP6_METHOD_IGNORE: ip6_required_enabled = FALSE; break; @@ -1446,10 +1451,14 @@ change_method_combo (CEPage *page, gboolean is_hotspot) /* Set active method */ if (is_hotspot) { - if (priv->hotspot_method_idx != -1) + if (priv->hotspot_method_idx == -1) { + int method = IP6_METHOD_SHARED; + if (g_strcmp0 (nm_setting_ip_config_get_method (priv->setting), + NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0) + method = IP6_METHOD_IGNORE; + gtk_combo_box_set_active (priv->method, method); + } else gtk_combo_box_set_active (priv->method, priv->hotspot_method_idx); - else - gtk_combo_box_set_active (priv->method, IP6_METHOD_IGNORE); } else { if (priv->normal_method_idx != -1) gtk_combo_box_set_active (priv->method, priv->normal_method_idx); |