aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2009-12-14 11:48:08 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2009-12-21 17:55:02 +0800
commitd8d74645987b0188f437b967c7d88dd3fda2db13 (patch)
treeb8681fb9e94cb2869026b33dc3b3d09add35ee17
parent0ad2641ae9ac96dc082d79feef619ce9572eda63 (diff)
downloadgsoc2013-empathy-d8d74645987b0188f437b967c7d88dd3fda2db13.tar
gsoc2013-empathy-d8d74645987b0188f437b967c7d88dd3fda2db13.tar.gz
gsoc2013-empathy-d8d74645987b0188f437b967c7d88dd3fda2db13.tar.bz2
gsoc2013-empathy-d8d74645987b0188f437b967c7d88dd3fda2db13.tar.lz
gsoc2013-empathy-d8d74645987b0188f437b967c7d88dd3fda2db13.tar.xz
gsoc2013-empathy-d8d74645987b0188f437b967c7d88dd3fda2db13.tar.zst
gsoc2013-empathy-d8d74645987b0188f437b967c7d88dd3fda2db13.zip
Use EmpathyDispatcher to create the PMUC channel
-rw-r--r--src/empathy-chat-window.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index bdc1a0196..26829a3bb 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -820,28 +820,11 @@ chat_window_contacts_toggled_cb (GtkToggleAction *toggle_action,
}
static void
-upgrade_to_muc_cb (TpConnection *connection,
- gboolean yours,
- const char *object_path,
- GHashTable *properties,
- const GError *error,
- gpointer user_data,
- GObject *window)
-{
- if (error)
- {
- g_critical ("%s", error->message);
- return;
- }
-
- g_print ("GOT CHANNEL! %s\n", object_path);
-}
-
-static void
chat_window_invite_participant_activate_cb (GtkAction *action,
EmpathyChatWindow *window)
{
EmpathyChatWindowPriv *priv;
+ EmpathyDispatcher *dispatcher = empathy_dispatcher_dup_singleton ();
EmpathyTpChat *tp_chat;
TpConnection *connection;
TpChannel *channel;
@@ -849,8 +832,6 @@ chat_window_invite_participant_activate_cb (GtkAction *action,
GPtrArray *channels;
char *invitees[3] = { NULL, };
- g_print ("INVITE PARTICIPANT\n");
-
priv = GET_PRIV (window);
g_return_if_fail (priv->current_chat != NULL);
@@ -881,13 +862,14 @@ chat_window_invite_participant_activate_cb (GtkAction *action,
/* FIXME: InvitationMessage ? */
NULL);
- /* FIXME: this probably needs to go through EmpathyDispatcher */
- tp_cli_connection_interface_requests_call_ensure_channel (
- connection, -1, props, upgrade_to_muc_cb, NULL, NULL,
- G_OBJECT (window));
+ /* Although this is a MUC, it's anonymous, so CreateChannel is valid */
+ empathy_dispatcher_create_channel (dispatcher, connection,
+ props, NULL, NULL);
g_hash_table_destroy (props);
g_ptr_array_free (channels, TRUE);
+
+ g_object_unref (dispatcher);
}
static void