diff options
author | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-02-23 02:14:07 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-06-09 17:20:05 +0800 |
commit | 5e797f1df68283302038c9723604c87f476a0656 (patch) | |
tree | ce3b7c3d4e7898897de6ba140611575315fdf83a /libempathy-gtk/empathy-new-call-dialog.c | |
parent | 0754b2673f0189e892074189535d3dfb6fd2a662 (diff) | |
download | gsoc2013-empathy-5e797f1df68283302038c9723604c87f476a0656.tar gsoc2013-empathy-5e797f1df68283302038c9723604c87f476a0656.tar.gz gsoc2013-empathy-5e797f1df68283302038c9723604c87f476a0656.tar.bz2 gsoc2013-empathy-5e797f1df68283302038c9723604c87f476a0656.tar.lz gsoc2013-empathy-5e797f1df68283302038c9723604c87f476a0656.tar.xz gsoc2013-empathy-5e797f1df68283302038c9723604c87f476a0656.tar.zst gsoc2013-empathy-5e797f1df68283302038c9723604c87f476a0656.zip |
Don't require EmpathyContacts to start a call
Conflicts:
libempathy-gtk/empathy-contact-menu.c
libempathy-gtk/empathy-individual-menu.c
libempathy-gtk/empathy-new-call-dialog.c
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: |