]> git.0d.be Git - empathy.git/commitdiff
Do not use mission_control_request_channel as we don't use MC's dispatcher anymore...
authorXavier Claessens <xclaesse@src.gnome.org>
Thu, 7 Aug 2008 14:40:51 +0000 (14:40 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Thu, 7 Aug 2008 14:40:51 +0000 (14:40 +0000)
svn path=/trunk/; revision=1311

libempathy-gtk/empathy-chat.c
src/empathy-main-window.c
src/empathy-new-chatroom-dialog.c

index 9de2c79f66c0faea3ede153bbfb3d93c1af39066..48aa793d5f8f1bfbe09e412a4d7b4ead5f5b1b17 100644 (file)
@@ -179,13 +179,17 @@ chat_status_changed_cb (MissionControl           *mc,
        if (status == TP_CONNECTION_STATUS_CONNECTED && !priv->tp_chat &&
            empathy_account_equal (account, priv->account) &&
            priv->handle_type != TP_HANDLE_TYPE_NONE) {
        if (status == TP_CONNECTION_STATUS_CONNECTED && !priv->tp_chat &&
            empathy_account_equal (account, priv->account) &&
            priv->handle_type != TP_HANDLE_TYPE_NONE) {
+               TpConnection *connection;
+
                DEBUG ("Account reconnected, request a new Text channel");
                DEBUG ("Account reconnected, request a new Text channel");
-               mission_control_request_channel_with_string_handle (mc,
-                                                                   priv->account,
-                                                                   TP_IFACE_CHANNEL_TYPE_TEXT,
-                                                                   priv->id,
-                                                                   priv->handle_type,
-                                                                   NULL, NULL);
+               connection = mission_control_get_tpconnection (mc, account, NULL);
+               tp_connection_run_until_ready (connection, FALSE, NULL, NULL);
+               empathy_connection_request_channel (connection, -1,
+                                                   TP_IFACE_CHANNEL_TYPE_TEXT,
+                                                   priv->handle_type,
+                                                   priv->id, TRUE,
+                                                   NULL, NULL, NULL, NULL);
+               g_object_unref (connection);
        }
 
        g_object_unref (account);
        }
 
        g_object_unref (account);
index dbba3b46b92c0343d32c3fe8d97792ebb5eabd32..e41b3f11ea8d5a6a92539cafc6c51680776cd5fb 100644 (file)
@@ -722,6 +722,7 @@ main_window_favorite_chatroom_join (EmpathyChatroom *chatroom)
 {
        MissionControl *mc;
        McAccount      *account;
 {
        MissionControl *mc;
        McAccount      *account;
+       TpConnection   *connection;
        const gchar    *room;
 
        mc = empathy_mission_control_new ();
        const gchar    *room;
 
        mc = empathy_mission_control_new ();
@@ -730,12 +731,14 @@ main_window_favorite_chatroom_join (EmpathyChatroom *chatroom)
 
        DEBUG ("Requesting channel for '%s'", room);
 
 
        DEBUG ("Requesting channel for '%s'", room);
 
-       mission_control_request_channel_with_string_handle (mc,
-                                                           account,
-                                                           TP_IFACE_CHANNEL_TYPE_TEXT,
-                                                           room,
-                                                           TP_HANDLE_TYPE_ROOM,
-                                                           NULL, NULL);        
+       connection = mission_control_get_tpconnection (mc, account, NULL);
+       tp_connection_run_until_ready (connection, TRUE, NULL, NULL);   
+       empathy_connection_request_channel (connection, -1,
+                                           TP_IFACE_CHANNEL_TYPE_TEXT,
+                                           TP_HANDLE_TYPE_ROOM,
+                                           room, TRUE,
+                                           NULL, NULL, NULL, NULL);
+       g_object_unref (connection);
        g_object_unref (mc);
 }
 
        g_object_unref (mc);
 }
 
index 35a9c327ed1d88eafb2c3d5e99fc2e6c655406a4..4a1fb90df6caa346d396989b4bd6ddaa923cd80d 100644 (file)
@@ -487,12 +487,13 @@ new_chatroom_dialog_model_selection_changed (GtkTreeSelection         *selection
 static void
 new_chatroom_dialog_join (EmpathyNewChatroomDialog *dialog)
 {
 static void
 new_chatroom_dialog_join (EmpathyNewChatroomDialog *dialog)
 {
-       McAccount            *account;
        EmpathyAccountChooser *account_chooser;
        EmpathyAccountChooser *account_chooser;
-       MissionControl       *mc;
-       const gchar          *room;
-       const gchar          *server = NULL;
-       gchar                *room_name = NULL;
+       McAccount             *account;
+       MissionControl        *mc;
+       TpConnection          *connection;
+       const gchar           *room;
+       const gchar           *server = NULL;
+       gchar                 *room_name = NULL;
 
        room = gtk_entry_get_text (GTK_ENTRY (dialog->entry_room));
        server = gtk_entry_get_text (GTK_ENTRY (dialog->entry_server));
 
        room = gtk_entry_get_text (GTK_ENTRY (dialog->entry_room));
        server = gtk_entry_get_text (GTK_ENTRY (dialog->entry_server));
@@ -509,13 +510,15 @@ new_chatroom_dialog_join (EmpathyNewChatroomDialog *dialog)
        DEBUG ("Requesting channel for '%s'", room_name);
 
        mc = empathy_mission_control_new ();
        DEBUG ("Requesting channel for '%s'", room_name);
 
        mc = empathy_mission_control_new ();
-       mission_control_request_channel_with_string_handle (mc,
-                                                           account,
-                                                           TP_IFACE_CHANNEL_TYPE_TEXT,
-                                                           room_name,
-                                                           TP_HANDLE_TYPE_ROOM,
-                                                           NULL, NULL);        
+       connection = mission_control_get_tpconnection (mc, account, NULL);
+       tp_connection_run_until_ready (connection, TRUE, NULL, NULL);   
+       empathy_connection_request_channel (connection, -1,
+                                           TP_IFACE_CHANNEL_TYPE_TEXT,
+                                           TP_HANDLE_TYPE_ROOM,
+                                           room_name, TRUE,
+                                           NULL, NULL, NULL, NULL);
        g_free (room_name);
        g_free (room_name);
+       g_object_unref (connection);
        g_object_unref (mc);
 }
 
        g_object_unref (mc);
 }