[gnome-control-center] network: Remove now unused virtual devices support



commit 8861d4409921235c76b8792db42cd6f42d903a7a
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Apr 29 14:20:02 2016 +0200

    network: Remove now unused virtual devices support
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747443

 panels/network/Makefile.am          |    2 -
 panels/network/cc-network-panel.c   |   66 +-----
 panels/network/net-virtual-device.c |  468 -----------------------------------
 panels/network/net-virtual-device.h |   68 -----
 po/POTFILES.in                      |    1 -
 5 files changed, 3 insertions(+), 602 deletions(-)
---
diff --git a/panels/network/Makefile.am b/panels/network/Makefile.am
index 02a1017..ed206d7 100644
--- a/panels/network/Makefile.am
+++ b/panels/network/Makefile.am
@@ -32,8 +32,6 @@ libnetwork_la_SOURCES =                                       \
        net-device-ethernet.h                           \
        net-device-mobile.c                             \
        net-device-mobile.h                             \
-       net-virtual-device.c                            \
-       net-virtual-device.h                            \
        net-vpn.c                                       \
        net-vpn.h                                       \
        net-proxy.c                                     \
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 7c3b250..4640999 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -38,7 +38,6 @@
 #include "net-device-ethernet.h"
 #include "net-object.h"
 #include "net-proxy.h"
-#include "net-virtual-device.h"
 #include "net-vpn.h"
 
 #include "panel-common.h"
@@ -643,7 +642,7 @@ handle_argv (CcNetworkPanel *panel)
                         g_object_get (object_tmp, "nm-device", &device, NULL);
                         done = handle_argv_for_device (panel, device, &iter);
                         g_object_unref (device);
-                } else if (NET_IS_VPN (object_tmp) || NET_IS_VIRTUAL_DEVICE (object_tmp)) {
+                } else if (NET_IS_VPN (object_tmp)) {
                         g_object_get (object_tmp, "connection", &connection, NULL);
                         done = handle_argv_for_connection (panel, connection, &iter);
                         g_object_unref (connection);
@@ -1112,7 +1111,7 @@ panel_add_vpn_device (CcNetworkPanel *panel, NMConnection *connection)
         if (find_in_model_by_id (panel, id, NULL) != NULL)
                 return;
 
-        /* add as a virtual object */
+        /* add as a VPN object */
         net_vpn = g_object_new (NET_TYPE_VPN,
                                 "panel", panel,
                                 "removable", TRUE,
@@ -1150,63 +1149,6 @@ panel_add_vpn_device (CcNetworkPanel *panel, NMConnection *connection)
 }
 
 static void
-panel_add_virtual_device (CcNetworkPanel *panel, NMConnection *connection)
-{
-        gchar *title;
-        GtkListStore *liststore_devices;
-        GtkTreeIter iter;
-        NetVirtualDevice *net_virt;
-        const gchar *id;
-        GtkNotebook *notebook;
-        GtkSizeGroup *size_group;
-        GType device_g_type;
-
-        /* does already exist */
-        id = nm_connection_get_path (connection);
-        if (find_in_model_by_id (panel, id, NULL) != NULL)
-                return;
-
-        /* map the NMConnection to a NetDevice GType */
-        device_g_type = NET_TYPE_VIRTUAL_DEVICE;
-
-        /* add as a virtual object */
-        net_virt = g_object_new (device_g_type,
-                                 "panel", panel,
-                                 "removable", TRUE,
-                                 "id", id,
-                                 "connection", connection,
-                                 "client", panel->priv->client,
-                                 "remote-settings", panel->priv->remote_settings,
-                                 NULL);
-        g_signal_connect_object (net_virt, "removed",
-                                 G_CALLBACK (object_removed_cb), panel, 0);
-
-        /* add as a panel */
-        notebook = GTK_NOTEBOOK (gtk_builder_get_object (panel->priv->builder,
-                                                         "notebook_types"));
-        size_group = GTK_SIZE_GROUP (gtk_builder_get_object (panel->priv->builder,
-                                                             "sizegroup1"));
-        net_object_add_to_notebook (NET_OBJECT (net_virt),
-                                    notebook,
-                                    size_group);
-
-        liststore_devices = GTK_LIST_STORE (gtk_builder_get_object (panel->priv->builder,
-                                            "liststore_devices"));
-        title = nma_utils_get_connection_device_name (connection);
-
-        net_object_set_title (NET_OBJECT (net_virt), title);
-        gtk_list_store_append (liststore_devices, &iter);
-        gtk_list_store_set (liststore_devices,
-                            &iter,
-                            PANEL_DEVICES_COLUMN_ICON, "network-wired-symbolic",
-                            PANEL_DEVICES_COLUMN_SORT, "2",
-                            PANEL_DEVICES_COLUMN_OBJECT, net_virt,
-                            -1);
-        g_free (title);
-        g_object_unref (net_virt);
-}
-
-static void
 add_connection (CcNetworkPanel *panel,
                 NMConnection *connection)
 {
@@ -1227,9 +1169,7 @@ add_connection (CcNetworkPanel *panel,
         g_debug ("add %s/%s remote connection: %s",
                  type, g_type_name_from_instance ((GTypeInstance*)connection),
                  nm_connection_get_path (connection));
-        if (iface)
-                panel_add_virtual_device (panel, connection);
-        else
+        if (!iface)
                 panel_add_vpn_device (panel, connection);
 }
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c287f98..58f34d9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -80,7 +80,6 @@ panels/network/net-device-ethernet.c
 panels/network/net-device-mobile.c
 panels/network/net-device-wifi.c
 panels/network/net-proxy.c
-panels/network/net-virtual-device.c
 panels/network/net-vpn.c
 [type: gettext/glade]panels/network/network-ethernet.ui
 [type: gettext/glade]panels/network/network-mobile.ui


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