From a61d692fcc93b406476c8ee5548470900d8bf42f Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 17 Jul 2006 12:13:28 +0000 Subject: [PATCH] let _new return ModestConf*, ModestAccountMgr* instead of GObject pmo-trunk-r382 --- src/modest-account-mgr.c | 6 ++++-- src/modest-account-mgr.h | 2 +- src/modest-conf.c | 4 ++-- src/modest-conf.h | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/modest-account-mgr.c b/src/modest-account-mgr.c index 76d042b..60209b1 100644 --- a/src/modest-account-mgr.c +++ b/src/modest-account-mgr.c @@ -220,7 +220,8 @@ modest_account_mgr_finalize (GObject * obj) priv->modest_conf = NULL; } -GObject * + +ModestAccountMgr * modest_account_mgr_new (ModestConf * conf) { GObject *obj; @@ -236,7 +237,8 @@ modest_account_mgr_new (ModestConf * conf) g_signal_connect (G_OBJECT (conf), "key_changed", G_CALLBACK (on_key_change), obj); - return obj; + + return MODEST_ACCOUNT_MGR (obj); } diff --git a/src/modest-account-mgr.h b/src/modest-account-mgr.h index e6cba5b..7298fac 100644 --- a/src/modest-account-mgr.h +++ b/src/modest-account-mgr.h @@ -79,7 +79,7 @@ GType modest_account_mgr_get_type (void) G_GNUC_CONST; * * Returns: a new ModestAccountMgr, or NULL in case of error */ -GObject* modest_account_mgr_new (ModestConf *modest_conf); +ModestAccountMgr* modest_account_mgr_new (ModestConf *modest_conf); diff --git a/src/modest-conf.c b/src/modest-conf.c index 5e7f894..d9c2c68 100644 --- a/src/modest-conf.c +++ b/src/modest-conf.c @@ -152,7 +152,7 @@ modest_conf_finalize (GObject *obj) } } -GObject* +ModestConf* modest_conf_new (void) { ModestConf *conf = MODEST_CONF(g_object_new(MODEST_TYPE_CONF, NULL)); @@ -168,7 +168,7 @@ modest_conf_new (void) return NULL; } - return G_OBJECT(conf); + return conf; } diff --git a/src/modest-conf.h b/src/modest-conf.h index b79db31..7dd2514 100644 --- a/src/modest-conf.h +++ b/src/modest-conf.h @@ -79,7 +79,7 @@ GType modest_conf_get_type (void) G_GNUC_CONST; * Returns: a new ModestConf instance, or NULL in case * of any error */ -GObject* modest_conf_new (void); +ModestConf* modest_conf_new (void); /** -- 1.7.9.5