[network-manager-applet] applet: do not skip wifi slave connections



commit 15187f557234ee63d2d4730a16ba1c78bc43a516
Author: Nikolay Martynov <mar kolya gmail com>
Date:   Tue May 16 22:13:34 2017 -0400

    applet: do not skip wifi slave connections
    
    If slave connection is a wifi connection we should still display it
    Otherwise this AP gets scanned regardless, but when user clicks it new
    network is created in NM's configuation - which is unlikely what user desired
    
    Signed-off-by: Nikolay Martynov <mar kolya gmail com>
    
    https://mail.gnome.org/archives/networkmanager-list/2017-May/msg00041.html
    https://github.com/NetworkManager/network-manager-applet/pull/1

 src/applet.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 0ee9eb8..2929863 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -286,12 +286,13 @@ applet_get_all_connections (NMApplet *applet)
        all_connections = nm_client_get_connections (applet->nm_client);
        connections = g_ptr_array_new_full (all_connections->len, g_object_unref);
 
-       /* Ignore slave connections */
+       /* Ignore slave connections unless they are wifi connections */
        for (i = 0; i < all_connections->len; i++) {
                connection = all_connections->pdata[i];
 
                s_con = nm_connection_get_setting_connection (connection);
-               if (s_con && !nm_setting_connection_get_master (s_con))
+               if (s_con && (!nm_setting_connection_get_master (s_con)
+                                       || nm_connection_get_setting_wireless (connection)))
                        g_ptr_array_add (connections, g_object_ref (connection));
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]