]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-chat.c
Do not use mission_control_request_channel as we don't use MC's dispatcher anymore...
[empathy.git] / libempathy-gtk / empathy-chat.c
index a3aa6de3549f52f4ae47f2ae0f0c52d7c05d71ac..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) {
+               TpConnection *connection;
+
                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);
@@ -946,6 +950,7 @@ chat_input_populate_popup_cb (GtkTextView *view,
        gchar           *str = NULL;
        EmpathyChatSpell *chat_spell;
        GtkWidget       *smiley_menu;
+       GtkWidget       *image;
 
        priv = GET_PRIV (chat);
        buffer = gtk_text_view_get_buffer (view);
@@ -955,7 +960,10 @@ chat_input_populate_popup_cb (GtkTextView *view,
        gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item);
        gtk_widget_show (item);
 
-       item = gtk_menu_item_new_with_mnemonic (_("Insert Smiley"));
+       item = gtk_image_menu_item_new_with_mnemonic (_("Insert Smiley"));
+       image = gtk_image_new_from_icon_name ("face-smile",
+                                             GTK_ICON_SIZE_MENU);
+       gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
        gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item);
        gtk_widget_show (item);
 
@@ -1002,7 +1010,10 @@ chat_input_populate_popup_cb (GtkTextView *view,
                gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item);
                gtk_widget_show (item);
 
-               item = gtk_menu_item_new_with_mnemonic (_("_Check Word Spelling..."));
+               item = gtk_image_menu_item_new_with_mnemonic (_("_Check Word Spelling..."));
+               image = gtk_image_new_from_icon_name (GTK_STOCK_SPELL_CHECK,
+                                                     GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
                g_signal_connect (item,
                                  "activate",
                                  G_CALLBACK (chat_text_check_word_spelling_cb),