net-device-simple: Remove GObject boilerplate
Now that NetDeviceSimple is cleaned up, switch to G_DECLARE_DERIVABLE_TYPE() and remove the old style GObject boilerplate.
This commit is contained in:
parent
f72e6d2012
commit
66ed8916f0
2 changed files with 4 additions and 19 deletions
|
@ -31,11 +31,11 @@
|
|||
|
||||
#include "net-device-simple.h"
|
||||
|
||||
struct _NetDeviceSimplePrivate
|
||||
typedef struct
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
gboolean updating_device;
|
||||
};
|
||||
} NetDeviceSimplePrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (NetDeviceSimple, net_device_simple, NET_TYPE_DEVICE)
|
||||
|
||||
|
|
|
@ -30,20 +30,7 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
#define NET_TYPE_DEVICE_SIMPLE (net_device_simple_get_type ())
|
||||
#define NET_DEVICE_SIMPLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NET_TYPE_DEVICE_SIMPLE, NetDeviceSimple))
|
||||
#define NET_DEVICE_SIMPLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NET_TYPE_DEVICE_SIMPLE, NetDeviceSimpleClass))
|
||||
#define NET_IS_DEVICE_SIMPLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NET_TYPE_DEVICE_SIMPLE))
|
||||
#define NET_IS_DEVICE_SIMPLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NET_TYPE_DEVICE_SIMPLE))
|
||||
#define NET_DEVICE_SIMPLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NET_TYPE_DEVICE_SIMPLE, NetDeviceSimpleClass))
|
||||
|
||||
typedef struct _NetDeviceSimplePrivate NetDeviceSimplePrivate;
|
||||
typedef struct _NetDeviceSimple NetDeviceSimple;
|
||||
typedef struct _NetDeviceSimpleClass NetDeviceSimpleClass;
|
||||
|
||||
struct _NetDeviceSimple
|
||||
{
|
||||
NetDevice parent;
|
||||
};
|
||||
G_DECLARE_DERIVABLE_TYPE (NetDeviceSimple, net_device_simple, NET, DEVICE_SIMPLE, NetDevice)
|
||||
|
||||
struct _NetDeviceSimpleClass
|
||||
{
|
||||
|
@ -52,8 +39,6 @@ struct _NetDeviceSimpleClass
|
|||
char *(*get_speed) (NetDeviceSimple *device_simple);
|
||||
};
|
||||
|
||||
GType net_device_simple_get_type (void);
|
||||
|
||||
char *net_device_simple_get_speed (NetDeviceSimple *device_simple);
|
||||
|
||||
void net_device_simple_add_row (NetDeviceSimple *device_simple,
|
||||
|
|
Loading…
Add table
Reference in a new issue