Cleanup Network panel
This is a somewhat lengthy but easy cleanup. There are 4 important aspects of this merge request:
- It removes all usages of the deprecated
g_type_class_add_private
from the Network panel; - It ports the
Net*
objects toG_DECLARE_{DERIVABLE|FINAL}_TYPE()
, removing the old style GObject boilerplate; - Final classes had their private struct unified with their regular struct;
- At last,
#pragma once
was used in the headers
With that, we have a net loss of 192 lines of code:
panels/network/cc-network-panel.h | 6 +-----
panels/network/cc-wifi-panel.h | 6 +-----
panels/network/net-device-ethernet.c | 16 ++++++++++++++++
panels/network/net-device-ethernet.h | 39 ++-------------------------------------
panels/network/net-device-mobile.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------
panels/network/net-device-mobile.h | 31 +++----------------------------
panels/network/net-device-simple.c | 42 +++++++++++++++++++++---------------------
panels/network/net-device-simple.h | 26 +++-----------------------
panels/network/net-device-wifi.c | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------
panels/network/net-device-wifi.h | 29 +++--------------------------
panels/network/net-device.c | 28 ++++++++++++++--------------
panels/network/net-device.h | 22 ++--------------------
panels/network/net-object.c | 67 ++++++++++++++++++++++++++++++++++++++++++-------------------------
panels/network/net-object.h | 23 ++---------------------
panels/network/net-proxy.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------
panels/network/net-proxy.h | 30 +++---------------------------
panels/network/net-vpn.c | 81 +++++++++++++++++++++++++++++++++++++--------------------------------------------
panels/network/net-vpn.h | 30 +++---------------------------
panels/network/network-dialogs.h | 5 +----
panels/network/panel-common.h | 5 +----
20 files changed, 344 insertions(+), 536 deletions(-)
Please follow the commit order when reviewing this merge request. Staring at the raw diff won't help the review process. The commits are already obvious and self-contained, and they should substantially ease the review.
Edited by Georges Basile Stavracas Neto