diff options
author | Ted Gould <ted@canonical.com> | 2009-09-10 12:24:16 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-10 12:24:16 -0500 |
commit | 2ad97fd722286b1e9780c10efc3a87e42a0796c4 (patch) | |
tree | e27a851fdd5e9490a45ebe256224e32b890e75f1 | |
parent | 6fa2a0c95d455ba4eb0a310b0314fb493a6148da (diff) | |
download | ayatana-indicator-session-2ad97fd722286b1e9780c10efc3a87e42a0796c4.tar.gz ayatana-indicator-session-2ad97fd722286b1e9780c10efc3a87e42a0796c4.tar.bz2 ayatana-indicator-session-2ad97fd722286b1e9780c10efc3a87e42a0796c4.zip |
Adding disconnected to the telepathy handler.
-rw-r--r-- | src/status-provider-telepathy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/status-provider-telepathy.c b/src/status-provider-telepathy.c index e22c27d..31da224 100644 --- a/src/status-provider-telepathy.c +++ b/src/status-provider-telepathy.c @@ -55,7 +55,8 @@ static mc_status_t sp_to_mc_map[] = { /* STATUS_PROVIDER_STATUS_AWAY, */ MC_STATUS_AWAY, /* STATUS_PROVIDER_STATUS_DND */ MC_STATUS_DND, /* STATUS_PROVIDER_STATUS_INVISIBLE*/ MC_STATUS_HIDDEN, - /* STATUS_PROVIDER_STATUS_OFFLINE */ MC_STATUS_OFFLINE + /* STATUS_PROVIDER_STATUS_OFFLINE */ MC_STATUS_OFFLINE, + /* STATUS_PROVIDER_STATUS_DISCONNECTED*/MC_STATUS_OFFLINE }; typedef struct _StatusProviderTelepathyPrivate StatusProviderTelepathyPrivate; @@ -258,10 +259,11 @@ set_status (StatusProvider * sp, StatusProviderStatus status) static StatusProviderStatus get_status (StatusProvider * sp) { + g_return_val_if_fail(IS_STATUS_PROVIDER_TELEPATHY(sp), STATUS_PROVIDER_STATUS_DISCONNECTED); StatusProviderTelepathyPrivate * priv = STATUS_PROVIDER_TELEPATHY_GET_PRIVATE(sp); if (priv->proxy == NULL) { - return mc_to_sp_map[MC_STATUS_OFFLINE]; + return STATUS_PROVIDER_STATUS_DISCONNECTED; } return mc_to_sp_map[priv->mc_status]; |