[telepathy-mission-control/master] Signal when the profile is set.
Alberto Mardegan
alberto.mardegan at nokia.com
Tue Mar 31 06:18:42 PDT 2009
---
src/mcd-account-compat.c | 14 ++++++++++++++
src/mcd-account-compat.h | 2 ++
src/mcd-account-priv.h | 1 +
src/mcd-account.c | 1 +
4 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/mcd-account-compat.c b/src/mcd-account-compat.c
index 8e6fdd1..f8e5c61 100644
--- a/src/mcd-account-compat.c
+++ b/src/mcd-account-compat.c
@@ -72,6 +72,8 @@ set_profile (TpSvcDBusProperties *self, const gchar *name,
name, NULL);
}
mcd_account_write_conf (account);
+
+ g_signal_emit (account, _mcd_account_signals[PROFILE_SET], 0);
}
static void
@@ -381,3 +383,15 @@ mcd_account_compat_get_mc_profile (McdAccount *account)
return profile;
}
+inline void
+_mcd_account_compat_class_init (McdAccountClass *klass)
+{
+ _mcd_account_signals[PROFILE_SET] =
+ g_signal_new ("profile-set",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
+ 0,
+ NULL, NULL, g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
+
diff --git a/src/mcd-account-compat.h b/src/mcd-account-compat.h
index d6b1d5a..c18b4cc 100644
--- a/src/mcd-account-compat.h
+++ b/src/mcd-account-compat.h
@@ -55,6 +55,8 @@ McProfile *mcd_account_compat_get_mc_profile (McdAccount *account);
/* not exported */
gboolean _mcd_account_compat_request_channel_nmc4 (McdAccount *account,
const struct mcd_channel_request *req, GError **error);
+G_GNUC_INTERNAL
+inline void _mcd_account_compat_class_init (McdAccountClass *klass);
G_END_DECLS
#endif
diff --git a/src/mcd-account-priv.h b/src/mcd-account-priv.h
index 8017511..96e7b11 100644
--- a/src/mcd-account-priv.h
+++ b/src/mcd-account-priv.h
@@ -37,6 +37,7 @@ enum
AVATAR_CHANGED,
ALIAS_CHANGED,
CONNECTION_PROCESS,
+ PROFILE_SET,
LAST_SIGNAL
};
diff --git a/src/mcd-account.c b/src/mcd-account.c
index cf01f55..12e75f5 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -1642,6 +1642,7 @@ mcd_account_class_init (McdAccountClass * klass)
0,
NULL, NULL, g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
+ _mcd_account_compat_class_init (klass);
_mcd_account_connection_class_init (klass);
account_ready_quark = g_quark_from_static_string ("mcd_account_load");
--
1.5.6.5
More information about the telepathy-commits
mailing list