diff options
author | Pablo Barciela <[email protected]> | 2019-08-14 04:21:47 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-08-20 13:34:13 -0400 |
commit | 3f621733493cf37357de552d8e8d9e0a06a5a34a (patch) | |
tree | 682405f1bfca67b7646e7e0a4b1ac3316972f232 /src | |
parent | ab5c7f6af6afb3b80ae683c1da98ed0f7384c841 (diff) | |
download | mate-power-manager-3f621733493cf37357de552d8e8d9e0a06a5a34a.tar.bz2 mate-power-manager-3f621733493cf37357de552d8e8d9e0a06a5a34a.tar.xz |
gpm-control: avoid 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r-- | src/gpm-control.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gpm-control.c b/src/gpm-control.c index 05bd85d..25bc392 100644 --- a/src/gpm-control.c +++ b/src/gpm-control.c @@ -51,8 +51,6 @@ #include "gpm-control.h" #include "gpm-networkmanager.h" -#define GPM_CONTROL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_CONTROL, GpmControlPrivate)) - struct GpmControlPrivate { GSettings *settings; @@ -67,7 +65,7 @@ enum { static guint signals [LAST_SIGNAL] = { 0 }; static gpointer gpm_control_object = NULL; -G_DEFINE_TYPE (GpmControl, gpm_control, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (GpmControl, gpm_control, G_TYPE_OBJECT) /** * gpm_control_error_quark: @@ -480,8 +478,6 @@ gpm_control_class_init (GpmControlClass *klass) NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); - - g_type_class_add_private (klass, sizeof (GpmControlPrivate)); } /** @@ -491,7 +487,7 @@ gpm_control_class_init (GpmControlClass *klass) static void gpm_control_init (GpmControl *control) { - control->priv = GPM_CONTROL_GET_PRIVATE (control); + control->priv = gpm_control_get_instance_private (control); control->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA); } |