aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-new-message-dialog.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-01-02 05:29:21 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-01-02 05:29:21 +0800
commit6fd6f3b1081a5b72054ef135346da0d5eb979590 (patch)
tree99644087c07e90132cd3c07df505a64e2c3edc24 /libempathy-gtk/empathy-new-message-dialog.c
parentf4d9313a82b4ce88b87bba1427fdbece4f1d00ad (diff)
downloadgsoc2013-empathy-6fd6f3b1081a5b72054ef135346da0d5eb979590.tar
gsoc2013-empathy-6fd6f3b1081a5b72054ef135346da0d5eb979590.tar.gz
gsoc2013-empathy-6fd6f3b1081a5b72054ef135346da0d5eb979590.tar.bz2
gsoc2013-empathy-6fd6f3b1081a5b72054ef135346da0d5eb979590.tar.lz
gsoc2013-empathy-6fd6f3b1081a5b72054ef135346da0d5eb979590.tar.xz
gsoc2013-empathy-6fd6f3b1081a5b72054ef135346da0d5eb979590.tar.zst
gsoc2013-empathy-6fd6f3b1081a5b72054ef135346da0d5eb979590.zip
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
Diffstat (limited to 'libempathy-gtk/empathy-new-message-dialog.c')
-rw-r--r--libempathy-gtk/empathy-new-message-dialog.c15
1 files changed, 3 insertions, 12 deletions
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;