diff options
Diffstat (limited to 'libempathy-gtk/empathy-new-call-dialog.c')
-rw-r--r-- | libempathy-gtk/empathy-new-call-dialog.c | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/libempathy-gtk/empathy-new-call-dialog.c b/libempathy-gtk/empathy-new-call-dialog.c index 0c0972de5..8fd273840 100644 --- a/libempathy-gtk/empathy-new-call-dialog.c +++ b/libempathy-gtk/empathy-new-call-dialog.c @@ -59,11 +59,6 @@ typedef struct { gpointer user_data; } FilterCallbackData; -typedef struct { - gboolean video; - gint64 timestamp; -} ContactCallbackData; - struct _EmpathyNewCallDialogPriv { GtkWidget *check_video; }; @@ -83,41 +78,6 @@ struct _EmpathyNewCallDialogPriv { */ static void -got_contact_cb (TpConnection *connection, - EmpathyContact *contact, - const GError *error, - gpointer user_data, - GObject *weak_object) -{ - ContactCallbackData *data = user_data; - - if (error != NULL) - g_warning ("Could not get contact: %s", error->message); - else - empathy_call_new_with_streams (contact, - TRUE, data->video, data->timestamp); - - g_slice_free (ContactCallbackData, data); -} - -static void -call_contact (TpAccount *account, - const gchar *contact_id, - gboolean video, - gint64 timestamp) -{ - ContactCallbackData *data = g_slice_new0 (ContactCallbackData); - - data->video = video; - data->timestamp = timestamp; - - empathy_tp_contact_factory_get_from_id (tp_account_get_connection (account), - contact_id, - got_contact_cb, data, - NULL, NULL); -} - -static void empathy_new_call_dialog_response (GtkDialog *dialog, int response_id) { EmpathyNewCallDialogPriv *priv = GET_PRIV (dialog); @@ -136,7 +96,8 @@ 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)); - call_contact (account, contact_id, video, + empathy_call_new_with_streams (contact_id, + account, TRUE, video, empathy_get_current_action_time ()); out: |