summaryrefslogtreecommitdiff
path: root/gsearchtool
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-01-19 18:12:52 +0100
committerlukefromdc <[email protected]>2019-01-22 06:04:08 +0000
commit7f711993eb6234951a25c6c0dca01fb90bd43fa9 (patch)
tree9f3dfcc7f50d63020d2327858756bed7e44ecfaf /gsearchtool
parent846b61f8d2e73178895024a6e29b48fb9a392947 (diff)
downloadmate-utils-7f711993eb6234951a25c6c0dca01fb90bd43fa9.tar.bz2
mate-utils-7f711993eb6234951a25c6c0dca01fb90bd43fa9.tar.xz
eggsmclient: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'gsearchtool')
-rw-r--r--gsearchtool/libeggsmclient/eggsmclient.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gsearchtool/libeggsmclient/eggsmclient.c b/gsearchtool/libeggsmclient/eggsmclient.c
index c1720381..da0a0f2d 100644
--- a/gsearchtool/libeggsmclient/eggsmclient.c
+++ b/gsearchtool/libeggsmclient/eggsmclient.c
@@ -44,9 +44,7 @@ struct _EggSMClientPrivate {
GKeyFile *state_file;
};
-#define EGG_SM_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_SM_CLIENT, EggSMClientPrivate))
-
-G_DEFINE_TYPE (EggSMClient, egg_sm_client, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (EggSMClient, egg_sm_client, G_TYPE_OBJECT)
static EggSMClient *global_client;
static EggSMClientMode global_client_mode = EGG_SM_CLIENT_MODE_NORMAL;
@@ -62,8 +60,6 @@ egg_sm_client_class_init (EggSMClientClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (EggSMClientPrivate));
-
/**
* EggSMClient::save_state:
* @client: the client
@@ -384,7 +380,7 @@ egg_sm_client_is_resumed (EggSMClient *client)
GKeyFile *
egg_sm_client_get_state_file (EggSMClient *client)
{
- EggSMClientPrivate *priv = EGG_SM_CLIENT_GET_PRIVATE (client);
+ EggSMClientPrivate *priv = egg_sm_client_get_instance_private (client);
char *state_file_path;
GError *err = NULL;