From 6fd6f3b1081a5b72054ef135346da0d5eb979590 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 1 Jan 2008 21:29:21 +0000 Subject: Add convinience functions empathy_chat_with_contact() and empathy_chat_with_contact_id() to start a chat with a contact. Make use of it when appropriate. svn path=/trunk/; revision=527 --- libempathy-gtk/empathy-new-message-dialog.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'libempathy-gtk/empathy-new-message-dialog.c') diff --git a/libempathy-gtk/empathy-new-message-dialog.c b/libempathy-gtk/empathy-new-message-dialog.c index 7a3fd9731..80e3b611c 100644 --- a/libempathy-gtk/empathy-new-message-dialog.c +++ b/libempathy-gtk/empathy-new-message-dialog.c @@ -56,8 +56,8 @@ new_message_dialog_response_cb (GtkWidget *widget, gint response, EmpathyNewMessageDialog *dialog) { - McAccount *account; - const gchar *id; + McAccount *account; + const gchar *id; account = empathy_account_chooser_get_account (EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser)); id = gtk_entry_get_text (GTK_ENTRY (dialog->entry_id)); @@ -70,16 +70,7 @@ new_message_dialog_response_cb (GtkWidget *widget, } if (response == GTK_RESPONSE_OK) { - MissionControl *mc; - - mc = empathy_mission_control_new (); - mission_control_request_channel_with_string_handle (mc, - account, - TP_IFACE_CHANNEL_TYPE_TEXT, - id, - TP_HANDLE_TYPE_CONTACT, - NULL, NULL); - g_object_unref (mc); + empathy_chat_with_contact_id (account, id); } else if (response == 3) { EmpathyContactFactory *factory; -- cgit v1.2.3