net-vpn: Turn into a final class
Remove the old style GObject boilerplate and replace it by G_DECLARE_FINAL_TYPE(). Move the NetVpn structure definition to the .c file too.
This commit is contained in:
parent
8509270562
commit
e3d125860b
2 changed files with 9 additions and 23 deletions
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
#include "connection-editor/net-connection-editor.h"
|
#include "connection-editor/net-connection-editor.h"
|
||||||
|
|
||||||
struct _NetVpnPrivate
|
typedef struct
|
||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
NMConnection *connection;
|
NMConnection *connection;
|
||||||
|
@ -39,6 +39,12 @@ struct _NetVpnPrivate
|
||||||
gchar *service_type;
|
gchar *service_type;
|
||||||
gboolean valid;
|
gboolean valid;
|
||||||
gboolean updating_device;
|
gboolean updating_device;
|
||||||
|
} NetVpnPrivate;
|
||||||
|
|
||||||
|
struct _NetVpn
|
||||||
|
{
|
||||||
|
NetObject parent;
|
||||||
|
NetVpnPrivate *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|
|
@ -29,29 +29,9 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define NET_TYPE_VPN (net_vpn_get_type ())
|
#define NET_TYPE_VPN (net_vpn_get_type ())
|
||||||
#define NET_VPN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NET_TYPE_VPN, NetVpn))
|
G_DECLARE_FINAL_TYPE (NetVpn, net_vpn, NET, VPN, NetObject)
|
||||||
#define NET_VPN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NET_TYPE_VPN, NetVpnClass))
|
|
||||||
#define NET_IS_VPN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NET_TYPE_VPN))
|
|
||||||
#define NET_IS_VPN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NET_TYPE_VPN))
|
|
||||||
#define NET_VPN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NET_TYPE_VPN, NetVpnClass))
|
|
||||||
|
|
||||||
typedef struct _NetVpnPrivate NetVpnPrivate;
|
|
||||||
typedef struct _NetVpn NetVpn;
|
|
||||||
typedef struct _NetVpnClass NetVpnClass;
|
|
||||||
|
|
||||||
struct _NetVpn
|
|
||||||
{
|
|
||||||
NetObject parent;
|
|
||||||
NetVpnPrivate *priv;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _NetVpnClass
|
|
||||||
{
|
|
||||||
NetObjectClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType net_vpn_get_type (void);
|
|
||||||
void net_vpn_set_show_separator (NetVpn *self,
|
void net_vpn_set_show_separator (NetVpn *self,
|
||||||
gboolean show_separator);
|
gboolean show_separator);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue