aboutsummaryrefslogtreecommitdiffstats
path: root/smclient
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:39 +0800
commitc003c99a75587ba39a45d164272760c33f9666b5 (patch)
treead6d0583fa9e8f078fb1c118f994371d2f1f79d8 /smclient
parentf55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff)
downloadgsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.gz
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.bz2
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.lz
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.xz
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.c8
-rw-r--r--smclient/eggsmclient.h3
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