diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:39 +0800 |
commit | c003c99a75587ba39a45d164272760c33f9666b5 (patch) | |
tree | ad6d0583fa9e8f078fb1c118f994371d2f1f79d8 /smclient | |
parent | f55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff) | |
download | gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.gz gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.zst gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.zip |
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'smclient')
-rw-r--r-- | smclient/eggsmclient.c | 8 | ||||
-rw-r--r-- | smclient/eggsmclient.h | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/smclient/eggsmclient.c b/smclient/eggsmclient.c index e7dda1226c..738be4e9e5 100644 --- a/smclient/eggsmclient.c +++ b/smclient/eggsmclient.c @@ -44,10 +44,6 @@ 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; @@ -56,7 +52,7 @@ 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); } static void @@ -392,7 +388,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 = client->priv; gchar *state_file_path; GError *err = NULL; diff --git a/smclient/eggsmclient.h b/smclient/eggsmclient.h index 5efc486df0..a24ac23b19 100644 --- a/smclient/eggsmclient.h +++ b/smclient/eggsmclient.h @@ -50,8 +50,9 @@ typedef enum { struct _EggSMClient { - GObject parent; + GObject parent; + EggSMClientPrivate *priv; }; struct _EggSMClientClass |