Skip to content

Commit

Permalink
eggsmclient: avoid deprecated 'g_type_class_add_private'
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0w authored and lukefromdc committed Jan 22, 2019
1 parent ab4812a commit 793cc25
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions mate-panel/libegg/eggsmclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -399,7 +395,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;

Expand Down

0 comments on commit 793cc25

Please sign in to comment.