aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-26 19:52:47 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-30 17:20:59 +0800
commit5c93e102dc5ac20a01a805e1f8bfc5d1986fedb0 (patch)
tree2f901270d74494d6ad77f2b14750744958c7d67d
parent57cbda8c31761ad2cc577c6139199ef57a9e2976 (diff)
downloadgsoc2013-empathy-5c93e102dc5ac20a01a805e1f8bfc5d1986fedb0.tar
gsoc2013-empathy-5c93e102dc5ac20a01a805e1f8bfc5d1986fedb0.tar.gz
gsoc2013-empathy-5c93e102dc5ac20a01a805e1f8bfc5d1986fedb0.tar.bz2
gsoc2013-empathy-5c93e102dc5ac20a01a805e1f8bfc5d1986fedb0.tar.lz
gsoc2013-empathy-5c93e102dc5ac20a01a805e1f8bfc5d1986fedb0.tar.xz
gsoc2013-empathy-5c93e102dc5ac20a01a805e1f8bfc5d1986fedb0.tar.zst
gsoc2013-empathy-5c93e102dc5ac20a01a805e1f8bfc5d1986fedb0.zip
Don't request roomlist channel if not supported (#614002)
-rw-r--r--src/empathy-new-chatroom-dialog.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index d12a9b0a1..d4302dc55 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -482,6 +482,8 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
EmpathyAccountChooser *account_chooser;
gboolean listing = FALSE;
gboolean expanded = FALSE;
+ TpConnection *connection;
+ EmpathyDispatcher *dispatcher;
if (dialog->room_list) {
g_object_unref (dialog->room_list);
@@ -498,13 +500,24 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser);
dialog->account = empathy_account_chooser_dup_account (account_chooser);
+ connection = empathy_account_chooser_get_connection (account_chooser);
if (dialog->account == NULL)
goto out;
dialog->status_changed_id = g_signal_connect (dialog->account,
"status-changed", G_CALLBACK (account_status_changed_cb), dialog);
- dialog->room_list = empathy_tp_roomlist_new (dialog->account);
+ dispatcher = empathy_dispatcher_dup_singleton ();
+
+ if (connection != NULL &&
+ empathy_dispatcher_find_requestable_channel_classes (dispatcher,
+ connection, TP_IFACE_CHANNEL_TYPE_ROOM_LIST,
+ TP_HANDLE_TYPE_NONE, NULL) != NULL) {
+ /* Roomlist channels are supported */
+ dialog->room_list = empathy_tp_roomlist_new (dialog->account);
+ }
+
+ g_object_unref (dispatcher);
if (dialog->room_list) {
g_signal_connect (dialog->room_list, "destroy",