File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,7 @@ struct _EggSMClientPrivate {
44
44
GKeyFile * state_file ;
45
45
};
46
46
47
- #define EGG_SM_CLIENT_GET_PRIVATE (o ) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_SM_CLIENT, EggSMClientPrivate))
48
-
49
- G_DEFINE_TYPE (EggSMClient , egg_sm_client , G_TYPE_OBJECT )
47
+ G_DEFINE_TYPE_WITH_PRIVATE (EggSMClient , egg_sm_client , G_TYPE_OBJECT )
50
48
51
49
static EggSMClient * global_client ;
52
50
static EggSMClientMode global_client_mode = EGG_SM_CLIENT_MODE_NORMAL ;
@@ -62,8 +60,6 @@ egg_sm_client_class_init (EggSMClientClass *klass)
62
60
{
63
61
GObjectClass * object_class = G_OBJECT_CLASS (klass );
64
62
65
- g_type_class_add_private (klass , sizeof (EggSMClientPrivate ));
66
-
67
63
/**
68
64
* EggSMClient::save_state:
69
65
* @client: the client
@@ -390,7 +386,7 @@ egg_sm_client_is_resumed (EggSMClient *client)
390
386
GKeyFile *
391
387
egg_sm_client_get_state_file (EggSMClient * client )
392
388
{
393
- EggSMClientPrivate * priv = EGG_SM_CLIENT_GET_PRIVATE (client );
389
+ EggSMClientPrivate * priv = egg_sm_client_get_instance_private (client );
394
390
char * state_file_path ;
395
391
GError * err = NULL ;
396
392
You can’t perform that action at this time.
0 commit comments