aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c7
-rw-r--r--libempathy-gtk/empathy-contact-menu.c15
-rw-r--r--libempathy-gtk/empathy-new-message-dialog.c6
3 files changed, 24 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 0083102f2..b7a6601c6 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -34,6 +34,7 @@
#include <libmissioncontrol/mc-account.h>
+#include <libempathy/empathy-call-factory.h>
#include <libempathy/empathy-contact-factory.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-contact-groups.h>
@@ -571,7 +572,11 @@ contact_list_view_voip_activated_cb (EmpathyCellRendererActivatable *cell,
-1);
if (contact) {
- empathy_start_call_with_contact (contact);
+ EmpathyCallFactory *factory;
+
+ factory = empathy_call_factory_get ();
+ empathy_call_factory_new_call (factory, contact);
+
g_object_unref (contact);
}
}
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index e3fb3c9f7..ca8208374 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -26,6 +26,7 @@
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
+#include <libempathy/empathy-call-factory.h>
#include <libempathy/empathy-log-manager.h>
#include <libempathy/empathy-dispatcher.h>
#include <libempathy/empathy-utils.h>
@@ -131,6 +132,16 @@ empathy_contact_chat_menu_item_new (EmpathyContact *contact)
return item;
}
+static void
+empathy_contact_call_menu_item_activated (GtkMenuItem *item,
+ EmpathyContact *contact)
+{
+ EmpathyCallFactory *factory;
+
+ factory = empathy_call_factory_get ();
+ empathy_call_factory_new_call (factory, contact);
+}
+
GtkWidget *
empathy_contact_call_menu_item_new (EmpathyContact *contact)
{
@@ -146,8 +157,8 @@ empathy_contact_call_menu_item_new (EmpathyContact *contact)
gtk_widget_set_sensitive (item, empathy_contact_can_voip (contact));
gtk_widget_show (image);
- g_signal_connect_swapped (item, "activate",
- G_CALLBACK (empathy_start_call_with_contact),
+ g_signal_connect (item, "activate",
+ G_CALLBACK (empathy_contact_call_menu_item_activated),
contact);
return item;
diff --git a/libempathy-gtk/empathy-new-message-dialog.c b/libempathy-gtk/empathy-new-message-dialog.c
index 9127e2919..1db8db1b6 100644
--- a/libempathy-gtk/empathy-new-message-dialog.c
+++ b/libempathy-gtk/empathy-new-message-dialog.c
@@ -31,6 +31,7 @@
#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mission-control.h>
+#include <libempathy/empathy-call-factory.h>
#include <libempathy/empathy-contact-factory.h>
#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-dispatcher.h>
@@ -186,11 +187,15 @@ new_message_dialog_response_cb (GtkWidget *widget,
if (response == 1) {
EmpathyContactFactory *factory;
EmpathyContact *contact;
+ EmpathyCallFactory *call_factory;
factory = empathy_contact_factory_dup_singleton ();
contact = empathy_contact_factory_get_from_id (factory, account, id);
empathy_start_call_with_contact (contact);
+ call_factory = empathy_call_factory_get();
+ empathy_call_factory_new_call (call_factory, contact);
+
g_object_unref (contact);
g_object_unref (factory);
} else if (response == 2) {
@@ -307,4 +312,3 @@ empathy_new_message_dialog_show (GtkWindow *parent)
return dialog->dialog;
}
-