aboutsummaryrefslogtreecommitdiffstats
path: root/smclient/eggsmclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'smclient/eggsmclient.c')
-rw-r--r--smclient/eggsmclient.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/smclient/eggsmclient.c b/smclient/eggsmclient.c
index 91720c2832..a704ead6ce 100644
--- a/smclient/eggsmclient.c
+++ b/smclient/eggsmclient.c
@@ -46,6 +46,10 @@ struct _EggSMClientPrivate {
GKeyFile *state_file;
};
+#define EGG_SM_CLIENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EGG_TYPE_SM_CLIENT, EggSMClientPrivate))
+
G_DEFINE_TYPE (EggSMClient, egg_sm_client, G_TYPE_OBJECT)
static EggSMClient *global_client;
@@ -54,16 +58,15 @@ static EggSMClientMode global_client_mode = EGG_SM_CLIENT_MODE_NORMAL;
static void
egg_sm_client_init (EggSMClient *client)
{
- client->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- client, EGG_TYPE_SM_CLIENT, EggSMClientPrivate);
+ client->priv = EGG_SM_CLIENT_GET_PRIVATE (client);
}
static void
-egg_sm_client_class_init (EggSMClientClass *klass)
+egg_sm_client_class_init (EggSMClientClass *class)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
- g_type_class_add_private (klass, sizeof (EggSMClientPrivate));
+ g_type_class_add_private (class, sizeof (EggSMClientPrivate));
/**
* EggSMClient::save_state:
@@ -391,7 +394,7 @@ egg_sm_client_is_resumed (EggSMClient *client)
GKeyFile *
egg_sm_client_get_state_file (EggSMClient *client)
{
- EggSMClientPrivate *priv = client->priv;
+ EggSMClientPrivate *priv = EGG_SM_CLIENT_GET_PRIVATE (client);
gchar *state_file_path;
GError *err = NULL;