summaryrefslogtreecommitdiff
path: root/copy-n-paste
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-01-20 13:07:41 +0100
committerZenWalker <[email protected]>2019-01-22 10:00:48 +0100
commitb0a7135ca277556e9794cb5d9f2dc05555896d89 (patch)
tree03682d1f8d8d8a3a5052c659024523fc033178bb /copy-n-paste
parente929b84516cc8deafb3bb2731ca8783bcfe30c8d (diff)
downloadengrampa-b0a7135ca277556e9794cb5d9f2dc05555896d89.tar.bz2
engrampa-b0a7135ca277556e9794cb5d9f2dc05555896d89.tar.xz
eggsmclient: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'copy-n-paste')
-rw-r--r--copy-n-paste/eggsmclient.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/copy-n-paste/eggsmclient.c b/copy-n-paste/eggsmclient.c
index 0cc3818..0f8d458 100644
--- a/copy-n-paste/eggsmclient.c
+++ b/copy-n-paste/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
@@ -390,7 +386,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;