[gnome-control-center] network: Remove if statement that is always true



commit 0b481bfb83b52317fae8d5b18f7c2f457f2caccd
Author: Robert Ancell <robert ancell canonical com>
Date:   Wed Oct 23 10:32:02 2019 +1300

    network: Remove if statement that is always true

 panels/network/cc-network-panel.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 2632d5efd..0970bb590 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -452,6 +452,7 @@ panel_add_device (CcNetworkPanel *self, NMDevice *device)
         NetDevice *net_device;
         GType device_g_type;
         const char *udi;
+        GtkWidget *stack;
 
         if (!nm_device_get_managed (device))
                 return;
@@ -523,16 +524,11 @@ panel_add_device (CcNetworkPanel *self, NMDevice *device)
         }
 
         /* add as a panel */
-        if (device_g_type != NET_TYPE_DEVICE) {
-                GtkWidget *stack;
-
-                stack = add_device_stack (self, NET_OBJECT (net_device));
-
-                if (device_g_type == NET_TYPE_DEVICE_SIMPLE)
-                        gtk_container_add (GTK_CONTAINER (self->box_simple), stack);
-                else
-                        gtk_container_add (GTK_CONTAINER (self->box_wired), stack);
-        }
+        stack = add_device_stack (self, NET_OBJECT (net_device));
+        if (device_g_type == NET_TYPE_DEVICE_SIMPLE)
+                gtk_container_add (GTK_CONTAINER (self->box_simple), stack);
+        else
+                gtk_container_add (GTK_CONTAINER (self->box_wired), stack);
 
         /* Add to the devices array */
         g_ptr_array_add (self->devices, net_device);


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