diff options
author | Pablo Barciela <[email protected]> | 2019-01-20 14:45:46 +0100 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-01-22 06:31:44 +0000 |
commit | f4bb74203bfb1eb06237fd7f581d1953b2f7c0f8 (patch) | |
tree | ea4f6a5674eb541341fc473b2580ea984bad04d3 /src/eggsmclient.c | |
parent | 29536a9f07125091f9a06c435b3e9acf42e26968 (diff) | |
download | mate-terminal-f4bb74203bfb1eb06237fd7f581d1953b2f7c0f8.tar.bz2 mate-terminal-f4bb74203bfb1eb06237fd7f581d1953b2f7c0f8.tar.xz |
eggsmclient: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'src/eggsmclient.c')
-rw-r--r-- | src/eggsmclient.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/eggsmclient.c b/src/eggsmclient.c index 4035060..5ad5ec0 100644 --- a/src/eggsmclient.c +++ b/src/eggsmclient.c @@ -46,9 +46,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; @@ -64,8 +62,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 @@ -387,7 +383,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; |