summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2011-09-29 16:59:10 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2011-09-29 17:07:08 +0100
commit512576d656e37c88cd4f9fc9927ed266a8816202 (patch)
treed1a1c47a8848b6b89c41e9cb71a050701f50d08f
parent04bd96335d179b5671e82536bfc0a31c1fb35d2f (diff)
mission-control: set presence using the name as well as the ID
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--mission-control/mcp-account-manager-ytstenut.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/mission-control/mcp-account-manager-ytstenut.c b/mission-control/mcp-account-manager-ytstenut.c
index 0ab662a..c45f74e 100644
--- a/mission-control/mcp-account-manager-ytstenut.c
+++ b/mission-control/mcp-account-manager-ytstenut.c
@@ -193,7 +193,8 @@ on_account_request_presence_ready (GObject *source, GAsyncResult *res,
static void
account_manager_set_presence (McpAccountManagerYtstenut *self,
- TpConnectionPresenceType presence)
+ TpConnectionPresenceType presence,
+ const gchar *presence_name)
{
McpAccountManagerYtstenutPrivate *priv = self->priv;
GError *error = NULL;
@@ -210,9 +211,10 @@ account_manager_set_presence (McpAccountManagerYtstenut *self,
}
}
- DEBUG ("Requesting that account presence be changed to: %d", (int)presence);
+ DEBUG ("Requesting that account presence be changed to: %d (%s)", (int)presence,
+ presence_name);
- tp_account_request_presence_async (priv->account_proxy, presence, "", "",
+ tp_account_request_presence_async (priv->account_proxy, presence, presence_name, "",
on_account_request_presence_ready, g_object_ref (self));
}
@@ -227,7 +229,7 @@ on_release_timeout (gpointer user_data)
DEBUG ("Release timeout called");
if (g_hash_table_size (priv->hold_requests) == 0)
- account_manager_set_presence (self, TP_CONNECTION_PRESENCE_TYPE_OFFLINE);
+ account_manager_set_presence (self, TP_CONNECTION_PRESENCE_TYPE_OFFLINE, "offline");
/* Remove this source */
return FALSE;
@@ -263,7 +265,7 @@ account_manager_hold (McpAccountManagerYtstenut *self, const gchar *client)
tp_dbus_daemon_watch_name_owner (priv->dbus_daemon, client,
on_name_owner_changed, self, NULL);
- account_manager_set_presence (self, TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);
+ account_manager_set_presence (self, TP_CONNECTION_PRESENCE_TYPE_AVAILABLE, "available");
if (priv->timeout_id != 0)
{
DEBUG ("Cancelling offline timeout");