eggsmclient: avoid deprecated 'g_type_class_add_private'

master-1.22
Pablo Barciela 2019-01-20 14:45:46 +01:00 committed by lukefromdc
parent 29536a9f07
commit f4bb74203b
1 changed files with 2 additions and 6 deletions

View File

@ -46,9 +46,7 @@ struct _EggSMClientPrivate
GKeyFile *state_file; GKeyFile *state_file;
}; };
#define EGG_SM_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_SM_CLIENT, EggSMClientPrivate)) G_DEFINE_TYPE_WITH_PRIVATE (EggSMClient, egg_sm_client, G_TYPE_OBJECT)
G_DEFINE_TYPE (EggSMClient, egg_sm_client, G_TYPE_OBJECT)
static EggSMClient *global_client; static EggSMClient *global_client;
static EggSMClientMode global_client_mode = EGG_SM_CLIENT_MODE_NORMAL; 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); GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (EggSMClientPrivate));
/** /**
* EggSMClient::save_state: * EggSMClient::save_state:
* @client: the client * @client: the client
@ -387,7 +383,7 @@ egg_sm_client_is_resumed (EggSMClient *client)
GKeyFile * GKeyFile *
egg_sm_client_get_state_file (EggSMClient *client) 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; char *state_file_path;
GError *err = NULL; GError *err = NULL;