File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ struct _EggSMClientPrivate
48
48
49
49
#define EGG_SM_CLIENT_GET_PRIVATE (o ) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_SM_CLIENT, EggSMClientPrivate))
50
50
51
- G_DEFINE_TYPE (EggSMClient , egg_sm_client , G_TYPE_OBJECT )
51
+ G_DEFINE_TYPE_WITH_CODE (EggSMClient , egg_sm_client , G_TYPE_OBJECT ,
52
+ G_ADD_PRIVATE (EggSMClient ))
52
53
53
54
static EggSMClient * global_client ;
54
55
static EggSMClientMode global_client_mode = EGG_SM_CLIENT_MODE_NORMAL ;
@@ -72,8 +73,6 @@ egg_sm_client_class_init (EggSMClientClass *klass)
72
73
{
73
74
GObjectClass * object_class = G_OBJECT_CLASS (klass );
74
75
75
- g_type_class_add_private (klass , sizeof (EggSMClientPrivate ));
76
-
77
76
/**
78
77
* EggSMClient::save_state:
79
78
* @client: the client
@@ -413,7 +412,7 @@ egg_sm_client_is_resumed (EggSMClient *client)
413
412
GKeyFile *
414
413
egg_sm_client_get_state_file (EggSMClient * client )
415
414
{
416
- EggSMClientPrivate * priv = EGG_SM_CLIENT_GET_PRIVATE (client );
415
+ EggSMClientPrivate * priv = egg_sm_client_get_instance_private (client );
417
416
char * state_file_path ;
418
417
GError * err = NULL ;
419
418
You can’t perform that action at this time.
0 commit comments