[network-manager-applet: 5/14] applet/info-dialog: do not show "Ignore" labels for IPv4/IPv6
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet: 5/14] applet/info-dialog: do not show "Ignore" labels for IPv4/IPv6
- Date: Wed, 27 Feb 2019 09:15:13 +0000 (UTC)
commit 484729a9378ce4db417776c0642f05415e59b16f
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Thu Nov 8 17:55:55 2018 +0100
applet/info-dialog: do not show "Ignore" labels for IPv4/IPv6
Just omit the whole section.
src/applet-dialogs.c | 46 +++++++++++++++++++---------------------------
1 file changed, 19 insertions(+), 27 deletions(-)
---
diff --git a/src/applet-dialogs.c b/src/applet-dialogs.c
index 89915488..052002b1 100644
--- a/src/applet-dialogs.c
+++ b/src/applet-dialogs.c
@@ -652,34 +652,30 @@ info_dialog_add_page (GtkNotebook *notebook,
row++;
/*--- IPv6 ---*/
- gtk_grid_attach (grid, create_info_group_label (_("IPv6"), FALSE),
- 0, row, 1, 1);
- row++;
-
s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (s_ip6)
method = nm_setting_ip_config_get_method (s_ip6);
- if (!method || !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) {
- gtk_grid_attach (grid, create_info_label (_("Ignored"), FALSE),
+ if (method && strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) != 0) {
+ gtk_grid_attach (grid, create_info_group_label (_("IPv6"), FALSE),
0, row, 1, 1);
row++;
- }
- addresses = NULL;
- ip6_config = nm_device_get_ip6_config (device);
- if (ip6_config) {
- addresses = nm_ip_config_get_addresses (ip6_config);
- gateway = nm_ip_config_get_gateway (ip6_config);
- } else {
addresses = NULL;
- gateway = NULL;
- }
+ ip6_config = nm_device_get_ip6_config (device);
+ if (ip6_config) {
+ addresses = nm_ip_config_get_addresses (ip6_config);
+ gateway = nm_ip_config_get_gateway (ip6_config);
+ } else {
+ addresses = NULL;
+ gateway = NULL;
+ }
- if (addresses && addresses->len > 0)
- def6_addr = (NMIPAddress *) g_ptr_array_index (addresses, 0);
+ if (addresses && addresses->len > 0)
+ def6_addr = (NMIPAddress *) g_ptr_array_index (addresses, 0);
- display_ip6_info (def6_addr, addresses, method, grid, &row);
+ display_ip6_info (def6_addr, addresses, method, grid, &row);
+ }
/* Gateway */
if (gateway && *gateway) {
@@ -867,19 +863,15 @@ info_dialog_add_page_for_vpn (GtkNotebook *notebook,
/*--- IPv6 ---*/
ip6_config = nm_active_connection_get_ip6_config (active);
if (ip6_config) {
- gtk_grid_attach (grid, create_info_group_label (_("IPv6"), FALSE),
- 0, row, 1, 1);
- row++;
-
s_ip6 = nm_connection_get_setting_ip6_config (connection);
if (s_ip6)
method = nm_setting_ip_config_get_method (s_ip6);
+ }
- if (!method || !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) {
- gtk_grid_attach (grid, create_info_label (_("Ignored"), FALSE),
- 0, row, 1, 1);
- row++;
- }
+ if (method && strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) != 0) {
+ gtk_grid_attach (grid, create_info_group_label (_("IPv6"), FALSE),
+ 0, row, 1, 1);
+ row++;
addresses = nm_ip_config_get_addresses (ip6_config);
if (addresses && addresses->len > 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]