[gnome-control-center/gbsneto/cleanup-network-panel: 20/21] net-device-mobile: Turn into a final class
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/cleanup-network-panel: 20/21] net-device-mobile: Turn into a final class
- Date: Thu, 1 Nov 2018 03:16:16 +0000 (UTC)
commit 4f5b2a5f31e7a79f158082acaecc1a4d5a23c4e5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Nov 1 00:07:32 2018 -0300
net-device-mobile: Turn into a final class
Exact same case of NetVpn and NetDeviceWifi.
panels/network/net-device-mobile.c | 8 +++++++-
panels/network/net-device-mobile.h | 25 ++-----------------------
2 files changed, 9 insertions(+), 24 deletions(-)
---
diff --git a/panels/network/net-device-mobile.c b/panels/network/net-device-mobile.c
index cc2b4f58e..ea7f34eec 100644
--- a/panels/network/net-device-mobile.c
+++ b/panels/network/net-device-mobile.c
@@ -35,7 +35,7 @@
static void nm_device_mobile_refresh_ui (NetDeviceMobile *device_mobile);
-struct _NetDeviceMobilePrivate
+typedef struct
{
GtkBuilder *builder;
gboolean updating_device;
@@ -49,6 +49,12 @@ struct _NetDeviceMobilePrivate
guint operator_name_updated;
NMAMobileProvidersDatabase *mpd;
+} NetDeviceMobilePrivate;
+
+struct _NetDeviceMobile
+{
+ NetDevice parent;
+ NetDeviceMobilePrivate *priv;
};
enum {
diff --git a/panels/network/net-device-mobile.h b/panels/network/net-device-mobile.h
index 4dd2bd8d4..8494af51b 100644
--- a/panels/network/net-device-mobile.h
+++ b/panels/network/net-device-mobile.h
@@ -29,29 +29,8 @@
G_BEGIN_DECLS
-#define NET_TYPE_DEVICE_MOBILE (net_device_mobile_get_type ())
-#define NET_DEVICE_MOBILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NET_TYPE_DEVICE_MOBILE,
NetDeviceMobile))
-#define NET_DEVICE_MOBILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NET_TYPE_DEVICE_MOBILE,
NetDeviceMobileClass))
-#define NET_IS_DEVICE_MOBILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NET_TYPE_DEVICE_MOBILE))
-#define NET_IS_DEVICE_MOBILE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NET_TYPE_DEVICE_MOBILE))
-#define NET_DEVICE_MOBILE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NET_TYPE_DEVICE_MOBILE,
NetDeviceMobileClass))
-
-typedef struct _NetDeviceMobilePrivate NetDeviceMobilePrivate;
-typedef struct _NetDeviceMobile NetDeviceMobile;
-typedef struct _NetDeviceMobileClass NetDeviceMobileClass;
-
-struct _NetDeviceMobile
-{
- NetDevice parent;
- NetDeviceMobilePrivate *priv;
-};
-
-struct _NetDeviceMobileClass
-{
- NetDeviceClass parent_class;
-};
-
-GType net_device_mobile_get_type (void);
+#define NET_TYPE_DEVICE_MOBILE (net_device_mobile_get_type ())
+G_DECLARE_FINAL_TYPE (NetDeviceMobile, net_device_mobile, NET, DEVICE_MOBILE, NetDevice)
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]