[telepathy-mission-control/master] Revert "McdAccount: always pass static strings to mcd_account_changed_property"
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Jun 26 05:03:32 PDT 2009
This reverts commit eee23bb66e83cb61546c2710279cb3d4f0d10829.
Alberto points out:
> Our property names are indeed static, because
> they are taken from the static structure that defines the property.
> See the last few lines in mcd_dbusprop_set_property:
>
> /* we pass property->name, because we know it's a static value and there
> * will be no need to care about its lifetime */
> return property->setprop (self, property->name, value, error);
Conflicts:
src/mcd-account.c
---
src/mcd-account.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/mcd-account.c b/src/mcd-account.c
index a8832fc..8b0f668 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -888,7 +888,7 @@ set_display_name (TpSvcDBusProperties *self, const gchar *name,
McdAccountPrivate *priv = account->priv;
DEBUG ("called for %s", priv->unique_name);
- return (mcd_account_set_string_val (account, "DisplayName", value, error)
+ return (mcd_account_set_string_val (account, name, value, error)
!= SET_RESULT_ERROR);
}
@@ -908,7 +908,7 @@ set_icon (TpSvcDBusProperties *self, const gchar *name, const GValue *value,
McdAccountPrivate *priv = account->priv;
DEBUG ("called for %s", priv->unique_name);
- return (mcd_account_set_string_val (account, "Icon", value, error)
+ return (mcd_account_set_string_val (account, name, value, error)
!= SET_RESULT_ERROR);
}
@@ -973,7 +973,7 @@ set_enabled (TpSvcDBusProperties *self, const gchar *name, const GValue *value,
enabled);
priv->enabled = enabled;
mcd_account_manager_write_conf (priv->account_manager);
- mcd_account_changed_property (account, "Enabled", value);
+ mcd_account_changed_property (account, name, value);
if (enabled)
{
@@ -1007,7 +1007,7 @@ set_nickname (TpSvcDBusProperties *self, const gchar *name,
SetResult ret;
DEBUG ("called for %s", priv->unique_name);
- ret = mcd_account_set_string_val (account, "Nickname", value, error);
+ ret = mcd_account_set_string_val (account, name, value, error);
if (ret == SET_RESULT_CHANGED && priv->connection != NULL)
{
@@ -1197,7 +1197,7 @@ set_automatic_presence (TpSvcDBusProperties *self,
if (changed)
{
mcd_account_manager_write_conf (priv->account_manager);
- mcd_account_changed_property (account, "AutomaticPresence", value);
+ mcd_account_changed_property (account, name, value);
}
return TRUE;
@@ -1254,7 +1254,7 @@ set_connect_automatically (TpSvcDBusProperties *self,
connect_automatically);
priv->connect_automatically = connect_automatically;
mcd_account_manager_write_conf (priv->account_manager);
- mcd_account_changed_property (account, "ConnectAutomatically", value);
+ mcd_account_changed_property (account, name, value);
if (connect_automatically)
{
@@ -1373,7 +1373,7 @@ set_requested_presence (TpSvcDBusProperties *self,
if (mcd_account_request_presence_int (account, type, status, message))
{
- mcd_account_changed_property (account, "RequestedPresence", value);
+ mcd_account_changed_property (account, name, value);
}
return TRUE;
--
1.5.6.5
More information about the telepathy-commits
mailing list