aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-22 23:26:10 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-22 23:26:10 +0800
commit09df593e038c3f7bfed05294155dbffeabba6ea0 (patch)
tree8c6fd98335639d995b0bf0a84ebb419221529b5c /libempathy-gtk
parent603a22855ea710b276892654b86a529167f8d32b (diff)
parent89ca74a938a753c1137cc9f008619805622e490c (diff)
downloadgsoc2013-empathy-09df593e038c3f7bfed05294155dbffeabba6ea0.tar
gsoc2013-empathy-09df593e038c3f7bfed05294155dbffeabba6ea0.tar.gz
gsoc2013-empathy-09df593e038c3f7bfed05294155dbffeabba6ea0.tar.bz2
gsoc2013-empathy-09df593e038c3f7bfed05294155dbffeabba6ea0.tar.lz
gsoc2013-empathy-09df593e038c3f7bfed05294155dbffeabba6ea0.tar.xz
gsoc2013-empathy-09df593e038c3f7bfed05294155dbffeabba6ea0.tar.zst
gsoc2013-empathy-09df593e038c3f7bfed05294155dbffeabba6ea0.zip
Merge branch 'av-handler-622368'
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-menu.c6
-rw-r--r--libempathy-gtk/empathy-new-call-dialog.c40
2 files changed, 27 insertions, 19 deletions
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index 6dfe63a6e..7c18694ae 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -248,7 +248,8 @@ empathy_contact_audio_call_menu_item_activated (GtkMenuItem *item,
EmpathyCallFactory *factory;
factory = empathy_call_factory_get ();
- empathy_call_factory_new_call_with_streams (factory, contact, TRUE, FALSE);
+ empathy_call_factory_new_call_with_streams (factory, contact, TRUE, FALSE,
+ gtk_get_current_event_time (), NULL, NULL);
}
GtkWidget *
@@ -280,7 +281,8 @@ empathy_contact_video_call_menu_item_activated (GtkMenuItem *item,
EmpathyCallFactory *factory;
factory = empathy_call_factory_get ();
- empathy_call_factory_new_call_with_streams (factory, contact, TRUE, TRUE);
+ empathy_call_factory_new_call_with_streams (factory, contact, TRUE, TRUE,
+ gtk_get_current_event_time (), NULL, NULL);
}
GtkWidget *
diff --git a/libempathy-gtk/empathy-new-call-dialog.c b/libempathy-gtk/empathy-new-call-dialog.c
index 10d34f36c..27ec3a2cd 100644
--- a/libempathy-gtk/empathy-new-call-dialog.c
+++ b/libempathy-gtk/empathy-new-call-dialog.c
@@ -69,24 +69,31 @@ struct _EmpathyNewCallDialogPriv {
*/
static void
-got_contact_cb (TpConnection *connection,
- EmpathyContact *contact,
- const GError *error,
- gpointer user_data,
- GObject *object)
+call_contact (TpConnection *connection,
+ const gchar *contact_id,
+ gboolean video,
+ gint64 timestamp)
{
- EmpathyCallFactory *call_factory;
- gboolean video = GPOINTER_TO_UINT (user_data);
+ EmpathyDispatcher *dispatcher;
+ GHashTable *request;
+
+ request = tp_asv_new (
+ TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA,
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT,
+ TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING, contact_id,
+ TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_AUDIO, G_TYPE_BOOLEAN,
+ TRUE,
+ TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_VIDEO, G_TYPE_BOOLEAN,
+ video,
+ NULL);
- if (error != NULL)
- {
- DEBUG ("Failed: %s", error->message);
- return;
- }
+ dispatcher = empathy_dispatcher_dup_singleton ();
+
+ empathy_dispatcher_create_channel (dispatcher, connection, request,
+ timestamp, NULL, NULL);
- call_factory = empathy_call_factory_get ();
- empathy_call_factory_new_call_with_streams (call_factory, contact, TRUE,
- video);
+ g_object_unref (dispatcher);
}
static void
@@ -108,8 +115,7 @@ empathy_new_call_dialog_response (GtkDialog *dialog, int response_id)
* we return from this function. */
video = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->check_video));
- empathy_tp_contact_factory_get_from_id (connection, contact_id,
- got_contact_cb, GUINT_TO_POINTER (video), NULL, NULL);
+ call_contact (connection, contact_id, video, gtk_get_current_event_time ());
out:
gtk_widget_destroy (GTK_WIDGET (dialog));