aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-30 16:44:02 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-09-02 21:21:16 +0800
commit8d3d11d5e3866cf4cfd730af4252c10fdd5783ed (patch)
treeb3f8782cf5f3475d50a294ba62b9888ae1135e48 /libempathy
parent01086a035fcf1b128bd9547219aa00c8768e0118 (diff)
downloadgsoc2013-empathy-8d3d11d5e3866cf4cfd730af4252c10fdd5783ed.tar
gsoc2013-empathy-8d3d11d5e3866cf4cfd730af4252c10fdd5783ed.tar.gz
gsoc2013-empathy-8d3d11d5e3866cf4cfd730af4252c10fdd5783ed.tar.bz2
gsoc2013-empathy-8d3d11d5e3866cf4cfd730af4252c10fdd5783ed.tar.lz
gsoc2013-empathy-8d3d11d5e3866cf4cfd730af4252c10fdd5783ed.tar.xz
gsoc2013-empathy-8d3d11d5e3866cf4cfd730af4252c10fdd5783ed.tar.zst
gsoc2013-empathy-8d3d11d5e3866cf4cfd730af4252c10fdd5783ed.zip
empathy_connection_can_*_personas: check if connection is connected
https://bugzilla.gnome.org/show_bug.cgi?id=657266
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index f0ecc0ddf..ec41f9b38 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -780,6 +780,10 @@ empathy_connection_can_add_personas (TpConnection *connection)
g_return_val_if_fail (TP_IS_CONNECTION (connection), FALSE);
+ if (tp_connection_get_status (connection, NULL) !=
+ TP_CONNECTION_STATUS_CONNECTED)
+ return FALSE;
+
persona_store = FOLKS_PERSONA_STORE (
empathy_dup_persona_store_for_connection (connection));
@@ -799,6 +803,10 @@ empathy_connection_can_alias_personas (TpConnection *connection)
g_return_val_if_fail (TP_IS_CONNECTION (connection), FALSE);
+ if (tp_connection_get_status (connection, NULL) !=
+ TP_CONNECTION_STATUS_CONNECTED)
+ return FALSE;
+
persona_store = FOLKS_PERSONA_STORE (
empathy_dup_persona_store_for_connection (connection));
@@ -818,6 +826,10 @@ empathy_connection_can_group_personas (TpConnection *connection)
g_return_val_if_fail (TP_IS_CONNECTION (connection), FALSE);
+ if (tp_connection_get_status (connection, NULL) !=
+ TP_CONNECTION_STATUS_CONNECTED)
+ return FALSE;
+
persona_store = FOLKS_PERSONA_STORE (
empathy_dup_persona_store_for_connection (connection));